sevenpluss / twitch-api
The twitch helix api
Installs: 3 545
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 0
Requires
- php: >=7.1.3
- ext-curl: *
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-10-28 13:14:52 UTC
README
NOTICE: This library uses the latest Twitch HELIX API which ist not fully featured yet
Table of contents
Installation
Minimum Requirements: php 7.1
composer require sevenpluss/twitch-api
Or add sevenpluss/twitch-api
to your composer.json
"sevenpluss/twitch-api": "^1.0"
Run composer update
to pull the latest version.
Usage Example
<?php namespace YourApp\Http\Controllers; use Sevenpluss\TwitchApi\Services\TwitchApi; use Sevenpluss\TwitchApi\Services\ClientSettings; class VideoController { protected $api; public function __construct() { // make a self extended ClientSettings class with custom settings $settings = new ClientSettings('client_id', 'client_secret', 'redirect_url'); $this->api = new TwitchApi($settings); } public function index() { $videos = $this->api->videos()->getVideosByUserId('31239503')->data(); return compact('videos'); } }
Configuration
Documentation
Twitch Helix API Documentation: https://dev.twitch.tv/docs/api/reference
The everyone response from Twitch Server encapsulated at Services/Result
object.