PHP code example of novastar / auth-api
1. Go to this page and download the library: Download novastar/auth-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/ */
novastar / auth-api example snippets
use NovaStar\Api\Dispatch;
use Doctrine\Common\Cache\FilesystemCache;
use NovaStar\Api\Exceptions\HttpException;
$apiDispatch = new Dispatch(
[
"node" => "cn",
"app_id" => "3f6deaafb426e72dc88addda6423190ca18efd7287a1e311417da7ee",
"app_secret" => "E478IXfjQ5Exf6kCCMEIuyvFKSkRdimWxSmQvByV",
"scope" => "",
"cache" => new FilesystemCache(dirname(__DIR__ . '/runtime/cache')),
"log" => [
"level" => "ERROR",
"path" => __DIR__ . "/runtime/log/novastar.log"
]
]
);
try{
$tags = $apiDispatch->getTags();
echo '<pre>';
print_r($tags);
echo '</pre>';
}catch(HttpException $e){
var_dump($e->getMessage());
}