arkon-event / codereadr-api-client
API Client for codereadr
Installs: 1 410
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.0
- php-http/httplug: 1 - 2
- php-http/message: ^1.0
- psr/log: ^1
Requires (Dev)
- php-http/guzzle6-adapter: 1 - 2
- phpunit/phpunit: ^7
This package is not auto-updated.
Last update: 2024-11-24 03:40:27 UTC
README
PHP client for interacting with CodeReadr API. See https://www.codereadr.com/apidocs/ for details.
Note that this package (as of v2) requires PHP 7.2
<?php use ArkonEvent\CodeReadr\ApiClient\Client; $client = new Client('youAPIKey'); //Example get all users and print usernames try{ $responseXML = $client->request(Client::SECTION_USERS, Client::ACTION_RETREIVE); //Response is a \SimpleXMLElement object foreach ($responseXML->user as $user){ echo 'username: '.$user->username.PHP_EOL; } } catch(\Throwable $e){ echo 'API error: '.$e->getMessage(); }