2017 © Pedro Peláez
 

library twitch-api-bundle

A little collection to work with the Twitch-Api https://dev.twitch.tv/docs/v5/

image

padhie/twitch-api-bundle

A little collection to work with the Twitch-Api https://dev.twitch.tv/docs/v5/

  • Thursday, July 26, 2018
  • by padhie
  • Repository
  • 0 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

TwitchApi

Simple Client for Twitch-Api https://dev.twitch.tv/docs/api/reference, (*1)

How to use

Create Client

// see https://dev.twitch.tv/docs/authentication/getting-tokens-oauth
$clientId = 'CLIENT_ID';
$authorization = 'AUTHORIZATION';

$client = new \Padhie\TwitchApiBundle\TwitchClient(
    new \GuzzleHttp\Client(),
    new \Padhie\TwitchApiBundle\Request\RequestGenerator($clientId, $authorization),
    new \Padhie\TwitchApiBundle\Response\ResponseGenerator(),
);

send Single Request

$request = new \Padhie\TwitchApiBundle\Request\Channels\GetChannelInformationRequest($broadcasterId);

$response = $client->send($request);
assert($response instanceof \Padhie\TwitchApiBundle\Response\Channels\GetChannelInformationResponse);

$title = $response->getChannels()[0]->getTitle();

send Pagination Request

$request = new \Padhie\TwitchApiBundle\Request\Users\GetUsersFollowsRequest($broadcasterId);

$response = $client->sendWithPagination($request);
assert($response instanceof \Padhie\TwitchApiBundle\Request\Users\GetUsersFollowsResponse);

$users = $response->getUsers();

Todo

  • [ ] implement Namespaces
    • [x] Ads
    • [x] Analytics
    • [x] Bits
    • [ ] ChannelPoints
    • [x] Channels
    • [ ] Chat
    • [ ] Clips
    • [ ] Entitlements
    • [ ] EventSub
    • [ ] Extensions
    • [x] Games
    • [x] Goals
    • [ ] HypeTrain
    • [ ] Moderation
    • [ ] Music
    • [ ] Polls
    • [ ] Predictions
    • [ ] Schedule
    • [ ] Search
    • [ ] Streams
    • [x] Subscriptions
    • [ ] Tags
    • [ ] Teams
    • [ ] Users
    • [x] Videos
  • [ ] tests with Response Examples (from Documentation)
  • [x] implement Parallel Request
  • [ ] implement Async Request

The Versions

26/07 2018

dev-master

9999999-dev

A little collection to work with the Twitch-Api https://dev.twitch.tv/docs/v5/

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar padhie

api twitch twitch.tv twitch-tv twitch-api

26/07 2018

dev-develop

dev-develop

A little collection to work with the Twitch-Api https://dev.twitch.tv/docs/v5/

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar padhie

api twitch twitch.tv twitch-tv twitch-api

25/06 2018

1.0.1

1.0.1.0

A little collection to work with the Twitch-Api https://dev.twitch.tv/docs/v5/

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

by Avatar padhie

api twitch twitch.tv twitch-tv twitch-api

25/06 2018

1.0.0

1.0.0.0

A little collection to work with the Twitch-Api https://dev.twitch.tv/docs/v5/

  Sources   Download

MIT

The Requires

  • php ^7.1

 

by Avatar padhie

api twitch twitch.tv twitch-tv twitch-api