impatricklol/twitchapi

There is no license information available for the latest version (dev-master) of this package.

A php API for Twitch.TV

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/impatricklol/twitchapi

dev-master 2015-01-24 14:17 UTC

This package is not auto-updated.

Last update: 2025-12-30 21:34:48 UTC


README

Simple PHP Class for the Twitch.tv API

{
  "require": {
    "impatricklol/twitchapi": "dev-master"
  }
}

How to use: replace 'reckful' with the stream name you want data from.

<?php
include 'twitchAPI.php';
$twitch = new twitchAPI('reckful');
$twitch->getData('display_name');
$twitch->getData('game');
?>

if you would like to get data from multiple streams it would be used like:

<?php
include 'twitchAPI.php';
$stream_1 = new twitchAPI('reckful');
$stream_2 = new twitchAPI('sodapoppin');
$stream_1->getData('display_name');
$stream_2->getData('display_name');
?>

getData Types: each getData type is pulled from an array at twitch Currently available data types: display_name - stream username status - current 'title' of the stream game - Current game being played

NOTE: This API is not finished.. and more features will be added.. this script was built on PHP V 5.6.2 if it doesn't work i suggest upgrading to this version 💩🎉