PHP code example of forward-force / tms-api-sdk

1. Go to this page and download the library: Download forward-force/tms-api-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

forward-force / tms-api-sdk example snippets


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

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


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());
}



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



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