2017 © Pedro Peláez
 

library virocket_php_sdk

ViRocket API PHP SDK

image

brainfab/virocket_php_sdk

ViRocket API PHP SDK

  • Monday, October 16, 2017
  • by brainfab
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ViRocket API PHP SDK - Unofficial

Installation

Require this package with composer:, (*1)

composer require brainfab/virocket_php_sdk, (*2)

Usage example:

require_once 'vendor/autoload.php';

session_start();

use Brainfab\ViRocket\ViRocket;

$OAUTH2_CLIENT_ID = 'your client id';
$OAUTH2_CLIENT_SECRET = 'your client secret';

$client = new ViRocket();
$client->setClientId($OAUTH2_CLIENT_ID);
$client->setClientSecret($OAUTH2_CLIENT_SECRET);

if (empty($_SESSION['_token'])) {
    $client->authenticate([
        'grant_type' => 'password',
        'username'   => 'your email',
        'password'   => 'your password',
    ]);

    $_SESSION['_token'] = $client->getAccessToken();
}

if (isset($_SESSION['_token'])) {
    $client->setAccessToken($_SESSION['_token']);
}

$videos = $client->videos->listVideos();

foreach ($videos as $video) {
    echo $video->name . "<br>";
}

The Versions

16/10 2017

dev-master

9999999-dev

ViRocket API PHP SDK

  Sources   Download

MIT

The Requires

 

16/10 2017

1.0.0

1.0.0.0

ViRocket API PHP SDK

  Sources   Download

MIT

The Requires