PHP code example of keinos / mastodon-streaming-api-config
1. Go to this page and download the library: Download keinos/mastodon-streaming-api-config 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/ */
keinos / mastodon-streaming-api-config example snippets
namespace KEINOS\Sample;
\Config\Config([
'url_host' => 'https://qiitadon.com/', // Your server/instance URL
]);
$info_instance = $conf->getInfoInstance();
$uri_websocket = $conf->getUriStreamingApi();
namespace KEINOS\Sample;
onfig;
$conf = new Config([
'url_host' => 'https://qiitadon.com/',
'access_token' => 'YOUR ACCESS TOKEN HERE',
]);
$info_instance = $conf->getInfoInstance();
$uri_websocket = $conf->getUriStreamingApi();
$access_token = $cong->getAccessToken();