承接 forward-force/tms-api-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

forward-force/tms-api-sdk

Composer 安装命令:

composer require forward-force/tms-api-sdk

包简介

PHP Wrapper around TMS API

README 文档

README

Installation

Install via composer as follows:

composer require forward-force/tms-api-sdk

Usage

Authentication

In order to authenticate, you need to pass the PRIVATE API TOKEN like so:

$tms = new TMS($token); 

Examples

Get Lineups by zip code and country (country is optional):

$lineups = $tms->lineups()->fetchByZipcode('USA','78701');

Fetch all channels for a lineup:

try {
    $channels = $tms->lineups()->fetchChannels('USA-DTVNOW-DEFAULT');
    var_dump($channels);
} catch (GuzzleException $e) {
    var_dump($e->getMessage());
}

Retrieve an image for an asset:

try{
    $params = [
        'w' => 100,
        'h' => 100,
        'trim' => 'true',
    ];
    $media = $tms->lineups()->fetchAssetFromMedia($token, 's51307_ll_h3_aa.png',$params);
    var_dump($media);
} catch (GuzzleException $e) {
    var_dump($e->getMessage());
}

Retrieve airings by station id:

try {
    $airingsByStation = $tms->lineups()->getStationAirings('10142', date("c", strtotime('-2 days')));
    var_dump($airingsByStation);
} catch (GuzzleException $e) {
    var_dump($e->getMessage());
}

Retrieve programs by tms id:

try {
    $programsByTmsId = $tms->lineups()->getPrograms('EP001151270163');;
    var_dump($programsByTmsId);
} catch (GuzzleException $e) {
    var_dump($e->getMessage());
}

Contributions

To run locally, you can use the docker container provided here. You can run it like so:

docker-compose up

There is auto-generated documentation as to how to run this library on local, please take a look at phpdocker/README.md

If you find an issue, have a question, or a suggestion, please don't hesitate to open a github issue.

Acknowledgments

Thank you to phpdocker.io for making getting PHP environments effortless!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固