Skip to content

php client library for interacting with your scouts via the pinoccio api

License

Notifications You must be signed in to change notification settings

Pinoccio/client-php-pinoccio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

client-php-pinoccio

php client library for interacting with your scouts via the pinoccio api

<?
require("./client-php-pinoccio/pinoccio.php");

// you can get your api token from https://hq.pinocc.io/settings
$api = new \pinoccio\Pinoccio($token);

// if you dont have a token and dont mind hardcoding credentials in a script =(.
$api->login("user","password"));

// if you have a token already skip login and set the token
$troopState = $api->rest("get","/v1/sync",array("tail"=>0));

var_dump($troopState);

this logs in, and print's the current state of all of the scouts in all of your troops.

the returned object would look something like this.

array(26) {
  [0]=>
  array(1) {
    ["data"]=>
    array(5) {
      ["account"]=>
      string(4) "1971"
      ["troop"]=>
      string(1) "5"
      ["type"]=>
      string(10) "connection"
      ["value"]=>
      array(1) {
        ["status"]=>
        string(7) "offline"
      }
      ["time"]=>
      float(1401372795670)
    }
  }
  [1]=>
  array(1) {
    ["data"]=>
    array(5) 
.....

About

php client library for interacting with your scouts via the pinoccio api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages