PHP code example of droogle / gci-php

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

    

droogle / gci-php example snippets


$client = new Droogle\GCI\Client('<api key>');
$taskList = $client->getTasks(2); // Get tasks from second page
foreach ($taskList as $task) {
    echo $task->getId() . ' ' . $task->getName(); // See src/TaskInterface.php for full function list
}
$nextPage = $taskList->getNextPage();

// Get the details of a single task
$id = 123; // Task ID
$task = $client->getTask($id);
echo $task->getDescription();

// Create a new task
$task = new Droogle\GCI\Task([
    'name' => 'Test task',
    'description' => 'Adding a new task',
    'status' => Droogle\GCI\TaskInterface::STATUS_DRAFTED,
    ...
]);
$client->createTask($task);
composer 
droogle/gci-php