/channel/{channel_id}
...
/locations/{location_id}
Info |
---|
Retrieves Updates a specific channel or all channels available to the user if channel_id is not provided.channels locations |
Possible Methods
TODO: UPDATE
GET POST PUT DELETE
...
Arguments
TODO: UPDATE
channel_id(optionalrequired)
Channel id to try and return, if not provided returns all channels for current userupdate
location_id (optional)
location id of specific location you want to edit, can be supplied in the message body or url.
Can also be left blank for create or delete (will delete all locations)
Json Object
TODO: UPDATE
Code Block |
---|
{ String "channellocation_id" : "531733e8b8e08e9d2197b0b0",, String location, "events" :Double []latitude, Double longitude, "locations" :Double [], radius, //in meters "name" : "abc123"Date timestamp } |
Example
Code Block |
---|
curl -b cookies.txt -X GET "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X GETPOST -d '{"location":"zimbabwe", "latitude":54, "longitude":-7.2, "radius":500}' "http://localhost:8185/channel/531f3e50b8e0a93944925594/531733e8b8e08e9d2197b0b0locations" > response.txt curl -b cookies.txt -X POSTPUT -d '{"name"location_id":"5345522cb8e034482d1a3520", "location":"abc123california, usa"}' "http://localhost:8185/channel/531f3e50b8e0a93944925594/locations" > response.txt curl -b cookies.txt -X PUT -d '{"nameradius":"renamed my channel"50}' "http://localhost:8185/channel/531f3e50b8e0a93944925594/locations/531733e8b8e08e9d2197b0b05345522cb8e034482d1a3520" > response.txt curl -b cookies.txt -X DELETE PUT-d '{"channel_idlocation":"531733e8b8e08e9d2197b0b0", "name":"renamed my channel"5345522cb8e034482d1a3520"}' "http://localhost:8185/channel/531f3e50b8e0a93944925594/locations" > response.txt curl -b cookies.txt -X DELETE -d '{"channel":"531733e8b8e08e9d2197b0b0"}' "http://localhost:8185/channel/531f3e50b8e0a93944925594/locations" > response.txt |
Example Response
Info |
---|
curl -b cookies.txt -X DELETE POST -d '{"location":"zimbabwe", "latitude":54, "longitude":-7.2, "radius":500}' "http://localhost:8185/channel/531f3e50b8e0a93944925594/531733e8b8e08e9d2197b0b0locations" > response.txt
|
...
Example Response
TODO: UPDATE
Info | |||
---|---|---|---|
Code Block |
|