PHP code example of jolicode / forecast-php-api

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

    

jolicode / forecast-php-api example snippets


// $client contains all the methods to interact with the API
$client = JoliCode\Forecast\ClientFactory::create(
  $accessToken,
  $forecastAccountId
);

$clients = $client->listClients()->getClients();
$assignments = $client->listAssignments([
  'start_date' => '2019-01-01',
  'end_date' => '2019-01-31',
])->getAssignments();

dump($clients);
dump($assignments);
bash
composer