Dynamic Files
Jim edited this page Apr 9, 2017
·
21 revisions
Name | Content/Outputs |
---|---|
Filename | the name of the file that will be generated in the ~/DynamicTextFiles folder |
Path | the path to request the content from |
Content/Response | the response from the path |
Type | the type of response you expect, ether Text or an Image
|
Status | report updates, completed, failed statuses |
IMPORTANT: Since August 2016, a Client-Id is required to send request. The examples on this page don't demonstrate that
- A file that we will call
Game
- Type = Text
- A
game_direct.php
file that is on a server with the next contents. In this case we will add an extra value?channel=XXX
to the path. WhereXXX
will be the channel name you want the data from.
<?php
$channel = $_GET['channel'];
$data = json_decode(@file_get_contents('https://api.twitch.tv/kraken/channels/' . $channel), true);
$game = $data['game'];
if($game != null){
echo $game;
//echo "Game: " . $game;
}
else{
echo " ";
}
?>
Response:
- A file that we will call
ImageName
- Type = Image
- A
myimage.php
file that is on a server with the next contents
<?php
echo "http://ttv-backgroundart.s3.amazonaws.com/404_backgroundart.jpg";
?>
Response:
- Files can be any
http://
orhttps://
call, as long as it returns text or an image link - Possibilities are endless and up to you, since this module acts as a plugin hoster to write text- and image files for you
Wiki home
Getting Started
How to
- OBS
- Any stream software will work if it is able to read files (feel free to commit information about other players)
- Run two instances of Snaz
Installation
FAQ