prefixaut/kamui

This package is abandoned and no longer maintained. No replacement package was suggested.

A Wrapper for the Twitch-API in PHP

dev-master 2017-08-13 22:42 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:49:43 UTC


README

Packagist GitHub release Travis SensioLabs Insight License

Kamui

A PHP-Wrapper for the Twitch API (Kraken)

Kamui is a complete Wrapper for the Twitch API which allows you to easily use it. Currently it's supporting the most up to date version of the API (v5).

Install

The best way to install Kamui is using Composer:

composer require prefixaut/kamui 

Usage

Using the API is really easy as it orientates a lot on the structure of the Original API. Example usage:

use Kamui\API;
$api = new API($my_twitch_token);
$api->users->follows('prefixaut'); // Will give you a List of all Channels I follow

Every function simply returns the original content of the Resource as Objects. If any error occurs, it'll simply return false to prevent accidental breaks. You can also use all Objects however you like them within the API like so:

$cool_dude = $api->users->get('prefixaut');
$api->users->follows($cool_dude);
$api->users->follows($cool_dude->_id);

The follows-Function would return the exact same thing since it's still the same user. This allows you to easily drop in whatever you want and focus on more important stuff.

Testing

Kamui is using PHPUnit-Tests. The best way to run them is to install it along with Composer. When it's setup, run phpunit on the root of the Project.

Twitch-Emotes

This Project is using the API from Twitch-Emotes to allow you an easier usage of them. Example use of them is:

$api->feed->reactToPost($user, $post, 'Kappa');

License

This Project is licensed under the MIT-License. Read the LICENSE-File inside this Project for more information.

Sidenote: The Projects name comes from 'Akkorokamui'. Google it up, too lazy to explain stuff