PHP code example of whatpulse / api-sdk-php

1. Go to this page and download the library: Download whatpulse/api-sdk-php 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/ */

    

whatpulse / api-sdk-php example snippets



onfigure Bearer authorization: http
$config = WhatPulse\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new WhatPulse\Api\ComputersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | User ID or username
$is_archived = 'is_archived_example'; // string | Get filter parameters

try {
    $result = $apiInstance->v1UsersComputers($id, $is_archived);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ComputersApi->v1UsersComputers: ', $e->getMessage(), PHP_EOL;
}

bash
composer