Skip to content

ins0/armasquads-api-restclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

armasquads-api-restclient

Master: Build Status

php armasquads.com REST API client

example

    $auth   = new \ArmAsquads\Api\Authentication\HttpHeader('YOUR_API_KEY');
    $api    = new \ArmAsquads\Api($auth);

    Try {
        $squads = $api->getSquads();

        foreach($squads as $squad)
        {
            echo $squad->getName() . "\r\n";
        }
    } Catch(\ArmAsquads\Api\Exception $e)
    {
        echo $e->getMessage() . PHP_EOL;
        echo $api->getLastResponseStatusCode() . PHP_EOL;
        
        print_r($api->getResponseErrorMessages());
    }