2017 © Pedro Peláez
 

library php-ws-sdk

Use this toolkit to easily call streamlike.com Webservices endpoints

image

streamlike/php-ws-sdk

Use this toolkit to easily call streamlike.com Webservices endpoints

  • Friday, June 22, 2018
  • by fvilpoix
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Streamlike PHP Webservices SDK

Requirements

PHP needs to be a minimum version of PHP 5.4.0., (*1)

Installation

Download package and include streamlikeWs.php classe., (*2)

Or with composer:, (*3)

composer require streamlike/php-ws-sdk, (*4)

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:, (*5)

<?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...
}
<?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...
}

The Versions

22/06 2018

dev-master

9999999-dev

Use this toolkit to easily call streamlike.com Webservices endpoints

  Sources   Download

proprietary

The Requires

  • php ^5.4||^7
  • ext-curl *

 

by Mediatech

22/06 2018

1.0.0

1.0.0.0

Use this toolkit to easily call streamlike.com Webservices endpoints

  Sources   Download

proprietary

The Requires

  • php ^5.4||^7
  • ext-curl *

 

by Mediatech