Skip to content
Browse files

more updates to carlo doc

  • Loading branch information...
1 parent f0189ea commit 24eddada19df18a9a4fcbf4351af5cf6622f9928 @soldair soldair committed Feb 27, 2014
Showing with 15 additions and 54 deletions.
  1. +15 −54 carlo.md
View
69 carlo.md
@@ -1,26 +1,7 @@
-### index
-
-* <a href="#login">login</a>
-* <a href="#register">register</a>
-* <a href="#account">account details</a>
-* <a href="#new-troop">make a troop</a>
-* <a href="#troops">get all troops</a>
-* <a href="#troop-get">get a troop</a>
-* <a href="#troop-patch">update a troop</a>
-* <a href="#troop-del">delete a troop</a>
-* <a href="#new-scout">add a new scout</a>
-* <a href="#scouts">get a troops scouts</a>
-* <a href="#scout-get">get a scout</a>
-* <a href="#scout-patch">update a scout</a>
-* <a href="#scout-del">delete a scout</a>
-* <a href="#commands">list bitlash commands</a>
-* <a href="#command">run bitlash commands</a>
-* <a href="#lightshow">run a lightshow on a scout</a>
-
<a name="login"><a>
-###POST /v1/login
+### login, POST /v1/login
login to pinocc.io
@@ -34,8 +15,8 @@ login to pinocc.io
```
-<a name="regsiter"><a>
-###POST /v1/register
+<a name="register"><a>
+### register, POST /v1/register
register for pinocc.io
@@ -47,7 +28,7 @@ register for pinocc.io
{"data":{"token":"7fc11b7554f0cd303bad94eb0eb36e2d","account":19}}
```
<a name="account"></a>
-###GET /v1/account
+###account, GET /v1/account
get your account data
@@ -69,7 +50,7 @@ curl 'https://api.pinocc.io/v1/account?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
<a name="new-troop"></a>
-###POST /v1/troop
+###make a troop, POST /v1/troop
create a new troop and assign it a token.
@@ -86,7 +67,7 @@ curl -X POST 'https://api.pinocc.io/v1/troop?token=980146260e87f0dfc02f10e733ca5
```
<a name="troops"></a>
-###GET /v1/troops
+###get your troops, GET /v1/troops
get all of your accounts troops.
@@ -103,7 +84,7 @@ curl 'https://api.pinocc.io/v1/troops?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
<a name="troop-get"></a>
-###GET /v1/{troop id}
+###get a troop, GET /v1/{troop id}
get the data for your first troop
@@ -120,7 +101,7 @@ curl 'https://api.pinocc.io/v1/1?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
<a name="troop-patch"></a>
-###PATCH /v1/{troop id}
+###update a troop, PATCH /v1/{troop id}
update data associated with your troop
@@ -132,15 +113,15 @@ curl -X PATCH --data "name=old sport" 'https://api.pinocc.io/v1/1?token=7fc11b75
```
<a name="troop-del"></a>
-###DELETE /v1/{troop id}
+###delete a troop, DELETE /v1/{troop id}
```sh
curl -X DELETE 'https://api.pinocc.io/v1/1?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
<a name="new-scout"></a>
-###POST /v1/{troop id}/scout
+### create a scout, POST /v1/{troop id}/scout
add a new scout to your troop
@@ -156,7 +137,7 @@ curl -X POST 'https://api.pinocc.io/v1/1/scout?token=7fc11b7554f0cd303bad94eb0eb
```
<a name="scouts"></a>
-###GET /v1/{troop id}/scouts
+###get scouts in a troop, GET /v1/{troop id}/scouts
get all of the scouts in your troop. returns an object keyed off of scout id or false if no scouts are associated.
@@ -172,7 +153,7 @@ curl 'https://api.pinocc.io/v1/1/scouts?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
<a name="scout-get"></a>
-###GET /v1/{troop id}/{scout id}
+###get a scout, GET /v1/{troop id}/{scout id}
get the data for your a scout.
@@ -188,7 +169,7 @@ curl 'https://api.pinocc.io/v1/1/1?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
<a name="scout-patch"></a>
-###PATCH /v1/{troop id}/{scout id}
+###update a scout, PATCH /v1/{troop id}/{scout id}
update data in your scout
@@ -207,36 +188,16 @@ curl -X PATCH --data "name=old yeller" 'https://api.pinocc.io/v1/1/1?token=7fc11
```
<a name="scout-del"></a>
-###DELETE /v1/{troop id}/{scout id}
+###delete a scout, DELETE /v1/{troop id}/{scout id}
```sh
curl -X DELETE 'https://api.pinocc.io/v1/1/1?token=7fc11b7554f0cd303bad94eb0eb36e2d'
```
-<a name="commands"></a>
-###GET /v1/{troop id}/{scout id}/commands
-
-print a list of available bitlash commands
-
-if the scout is offline you will get an error after a timeout. TODO accept timeout as an argument. its 10 seconds now.
-
-```sh
-curl 'https://api.pinocc.io/v1/1/1/commands?token=7fc11b7554f0cd303bad94eb0eb36e2d'
-```
-```js
-// success
-
-{"data":["backpack.report","hq.connect","hq.disconnect","led.blue","led.bluevalue","led.cyan","led.green","led.greenvalue","led.hexvalue","led.magenta","led.off","led.orange","led.purple","led.red","led.redvalue","led.report","led.savetorch","led.setrgb","led.settorch","led.white","led.yellow","mesh.broadcastrun","mesh.config","mesh.ingroup","mesh.joingroup","mesh.key","mesh.leavegroup","mesh.ping","mesh.pinggroup","mesh.publish","mesh.remoterun","mesh.report","mesh.resetkey","mesh.setpower","mesh.subscribe","pin.makeinput","pin.makeoutput","pin.off","pin.on","pin.read","pin.report","pin.write","power.disablevcc","power.enablevcc","power.ischarging","power.percent","power.report","power.sleep","power.voltage","randomnumber","scout.gethqtoken","scout.isleadscout","scout.otaboot","scout.report","scout.sethqtoken","temperature","wifi.command","wifi.config","wifi.connect","wifi.list","wifi.report"]}
-
-// timeout error
-
-{"error":{"code":500,"message":"command timed out. troop:7fc11b7554f0cd303bad94eb0eb36e2d, scout:1, command:help"}
-
-```
<a name="command"><a>
-###GET /v1/{troop id}/{scout id}/command/:command
+### run a bitlash command, GET /v1/{troop id}/{scout id}/command/:command
GET /v1/{troop id}/{scout id}/command?command=command

0 comments on commit 24eddad

Please sign in to comment.
Something went wrong with that request. Please try again.