megaplan / simple_client
Simple API client for Megaplan
Installs: 18 191
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 3
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: ^5.4
This package is not auto-updated.
Last update: 2024-10-29 04:42:02 UTC
README
Установка
composer require megaplan/simple_client:dev-master
Использование
$response = (new Client('myhost')) ->auth('pupkin@megaplan.ru', 'idclip') ->get('/BumsTaskApiV01/Task/list.api'); /* object(stdClass)#20 (2) { ["status"]=> object(stdClass)#18 (2) { ["code"]=> string(2) "ok" ["message"]=> NULL } ["data"]=> object(stdClass)#23 (1) { ["tasks"]=> array(1) { [0]=> object(stdClass)#17 (16) { ["Id"]=> int(1000000) ["Name"]=> string(47) "Начать работу в Мегаплане" ["Status"]=> string(8) "assigned" ["Deadline"]=> string(10) "2016-06-13" ["Owner"]=> object(stdClass)#21 (3) { ["Id"]=> string(7) "1000001" ["Name"]=> string(9) "User Name" ["Avatar"]=> string(35) "/60x60/s/7/i/sample/photo-small.jpg" } ["Responsible"]=> object(stdClass)#22 (3) { ["Id"]=> string(7) "1000001" ["Name"]=> string(9) "User Name" ["Avatar"]=> string(35) "/60x60/s/7/i/sample/photo-small.jpg" } ["Severity"]=> string(0) "" ["Favorite"]=> int(0) ["TimeCreated"]=> string(19) "2016-06-06 20:37:48" ["TimeUpdated"]=> string(19) "2016-06-06 20:37:48" ["Start"]=> string(19) "2016-06-06 20:37:48" ["Completed"]=> string(1) "0" ["Folders"]=> array(4) { [0]=> string(3) "all" [1]=> string(8) "incoming" [2]=> string(11) "responsible" [3]=> string(5) "owner" } ["IsOverdue"]=> bool(true) ["CommentsUnread"]=> int(0) ["Activity"]=> string(19) "2016-06-06 20:37:48" } } } } */
Тестирование
phpunit --bootstrap ./vendor/autoload.php tests