定制 streamlike/php-ws-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

streamlike/php-ws-sdk

Composer 安装命令:

composer require streamlike/php-ws-sdk

包简介

Use this toolkit to easily call streamlike.com Webservices endpoints

README 文档

README

Requirements

PHP needs to be a minimum version of PHP 5.4.0.

Installation

Download package and include streamlikeWs.php classe.

Or with composer:

composer require streamlike/php-ws-sdk

Available services

  • playlists
  • playlist
  • media
  • related
  • qr
  • rss
  • languages
  • countries
  • getStreamlikeVersion
  • manifest
  • nowplaying
  • podcast
  • resume
  • videositemap

Samples

Autoloading

<?php

// via composer autoload
require './vendor/autoload.php';

// or basic require
require './src/streamlikeWs.php';


$ws = new streamlikeWs('https://cdn.streamlike.com', 'json');

Get playlists list

<?php

try {
    $params = array(
      'company_id' => '48c6eab371919246',
    );

    $content = $ws->getResult('playlists', $params, streamlikeWs::RESULTTYPE_RAW);

    var_dump($content);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET vote

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com', 'xml', streamlikeWs::VERSION_V2);
    $params = array(
      'company_id' => '48c6eab371919246',
      'media_id' => '4df5ede70f252c07',
      'value' => 3,
    );

    $content = $ws->setVote($params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET Media list with many filters

Get json content about first 6 french media in playlist 983e6509573f4849 sorted by descending creation date:

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com', 'json');
    $params = array(
      'playlist_id' => '983e6509573f4849',
      'lng' => 'fr',
      'pagesize' => 6,
      'orderby' => 'creationdate',
      'sortorder' => 'down'
    );

    $content = $ws->getResult('playlist', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET Media with statistics

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com', 'xml');
    $params = array(
      'media_id' => '4df5ede70f252c07',
      'rate' => 'true',
    );

    $content = $ws->getResult('media', $params, streamlikeWs::RESULTTYPE_RAW);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET Qr code picture

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com');
    $params = array(
      'media_id' => '4df5ede70f252c07',
    );

    $content = $ws->getResult('qr', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET all media file details

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com');
    $params = array(
      'media_id' => '4df5ede70f252c07',
    );

    $content = $ws->getResult('manifest', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET count of users who are currently watching the media

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com');
    $params = array(
      'media_id' => '4df5ede70f252c07',
    );

    $content = $ws->getResult('nowplaying', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET Podcast feed

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com');
    $params = array(
      'playlist_id' => '983e6509573f4849',
      'lng' => 'fr',
      'orderby' => 'lastupdateddate',
    );

    $content = $ws->getResult('podcast', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET Media related to a given media

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com');
    $params = array(
      'media_id' => '4df5ede70f252c07',
      'pagesize' => 4,
    );

    $content = $ws->getResult('related', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

GET Google video sitemap feed

<?php

try {
    $ws = new streamlikeWs('https://cdn.streamlike.com');
    $params = array(
      'company_id' => '48c6eab371919246',
    );

    $content = $ws->getResult('videositemap', $params);
} catch (\Exception $e) {
    // handle exception, log, retry...
}

streamlike/php-ws-sdk 适用场景与选型建议

streamlike/php-ws-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.71k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 06 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 streamlike/php-ws-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 streamlike/php-ws-sdk 我们能提供哪些服务?
定制开发 / 二次开发

基于 streamlike/php-ws-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-06-22