1. Go to this page and download the library: Download vinlock/stream-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vinlock / stream-api example snippets
$twitch = \Vinlock\StreamAPI\Services\Twitch::game("Dota 2");
$hitbox = \Vinlock\StreamAPI\Services\Hitbox::game("Dota 2");
$merge = \Vinlock\StreamAPI\Services\Service::merge($twitch, $hitbox);
echo $merge->getJSON(); // Displays all streams from highest to lowest viewers for Dota 2 on Twitch and Hitbox.
$merge = \Vinlock\StreamAPI\Services\Service::merge($twitch, $hitbox);
// or
$merge = \Vinlock\StreamAPI\Services\Service::merge( [ $twitch, $hitbox ] );
echo $merge->getJSON(); // Displays the information for all streams merged as JSON.
$bladeandsoul_twitch = \Vinlock\StreamAPI\Services\Twitch::game("Blade and Soul");
$twitch = new \Vinlock\StreamAPI\Services\Twitch("vinlockz");
$merge = \Vinlock\StreamAPI\Services\Service::merge($twitch, $bladeandsoul_twitch);
$merge->getJSON();
echo $merge->getJSON(); // Displays the information for all streams merged as JSON.
echo $merge->getArray(); // Array
echo $merge->getObject(); // Object
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.