PHP code example of gman98ish / ukfast-simple-php-sdk
1. Go to this page and download the library: Download gman98ish/ukfast-simple-php-sdk 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/ */
gman98ish / ukfast-simple-php-sdk example snippets
$ukfast = new \UKFast\SimpleSDK\Client;
$ukfast->auth('my-ukfast-key');
$page = $ukfast->get('/pss/v1/requests'); // returns a Page class
echo $page->getItems()[0]->author->id . "\n";
// can also do concurrent requests
[$requests, $replies] = $ukfast->concurrently(fn ($ukfast) => [
$ukfast->get('/pss/v1/requests'),
$ukfast->get('/pss/v1/replies'),
]);
echo $requests->getItems()[0]->author->id . "\n";
echo $replies->getItems()[0]->author->id . "\n";
composer