An open API service indexing awesome lists of open source software.

https://github.com/adamhebby/glimeshclient

PHP Client for [Glimesh](https://glimesh.tv/)
https://github.com/adamhebby/glimeshclient

client-library glimesh oauth2-client php php7

Last synced: 5 months ago
JSON representation

PHP Client for [Glimesh](https://glimesh.tv/)

Awesome Lists containing this project

README

        

# ARCHIVED - glimesh.tv has shut down

# PHP GlimeshClient

This Library aims to provide a fully working Glimesh Client, all objects and interfaces used by the API are auto-generated by the API specification.

## Installation

`composer require adamhebby/glimeshclient`

## Usage

```php
load(__DIR__ . '/../.env');

$logger = new \Monolog\Logger("log");
$logger->pushHandler(new \Monolog\Handler\ErrorLogHandler());

$guzzle = new GuzzleHttpClient(['http_errors' => true, 'allow_redirects' => true]);

$client = new Client(
$guzzle,
new OAuthFileAdapter(
$_ENV['CLIENT_ID'],
$_ENV['CLIENT_SECRET'],
'/tmp/auth.json'
),
$logger
);

$object = $client->makeRequest(
(new Query('channels'))->setSelectionSet([
'id',
(new Query('stream'))->setSelectionSet([
'thumbnail',
]),
])->setArguments(['status' => 'ENUM:' . ChannelStatus::LIVE])
);

var_dump($object);

```