1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/scripts/api-client.php
mbugeia 5e51bcd6e9 Init files + sources
Kanboard 1.0.6
2014-07-20 12:26:15 +02:00

20 lines
323 B
PHP

#!/usr/bin/env php
<?php
require 'vendor/JsonRPC/Client.php';
if ($argc !== 3) {
die('Usage: '.$argv[0].' <url> <token>'.PHP_EOL);
}
$client = new JsonRPC\Client($argv[1], 5, true);
$client->authentication('jsonrpc', $argv[2]);
$client->createProject('Test API');
$r = $client->getAllProjects();
var_dump($r);