dev-master
9999999-devGoogle Code-in Task API SDK
MIT
The Requires
by Shitiz Garg
api google sdk code-in
Wallogit.com
2017 © Pedro Peláez
Google Code-in Task API SDK
This API can be used to access Google Code-in's Task API to request, update and modify task definition, (*1)
Library can be installed from composer using composer require dragooon/gci-php-sdk or adding
dragooon/gci-php-sdk to your composer dependencies, (*2)
This is a simplified example of handling tasks via the API, (*3)
$client = new Dragooon\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 Task([
'name' => 'Test task',
'description' => 'Testing a new task',
'status' => Dragooon\GCI\TaskInterface::STATUS_DRAFTED,
]);
$client->createTask($task);
The MIT License (See LICENSE), (*4)
Google Code-in Task API SDK
MIT
api google sdk code-in