PHP code example of arrowsphere / public-api-client
1. Go to this page and download the library: Download arrowsphere/public-api-client 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/ */
arrowsphere / public-api-client example snippets
use ArrowSphere\PublicApiClient\PublicApiClient;
const URL = 'https://your-url-to-arrowsphere.example.com';
const API_KEY = 'your API key in ArrowSphere';
$client = (new PublicApiClient())
->setUrl(URL)
->setApiKey(API_KEY)
->setDefaultHeaders([
'myHeader' => 'myValue',
])
;
$whoami = $client->getWhoamiClient()->getWhoami();
echo "Hello " . $whoami->getCompanyName();