/channel/{channel_id}
Info |
---|
Retrieves Modifies a specific channel or returns all channels available to the user if channel_id is not provided.when no ID is provided during GET Note: will return the scoring stats for a channel except when you don't provide a channel_id Note: you may only create a channel while you have room according to your max_number_of_channels field in your settings object Note: favorite will always update on PUT, and defaults to false so you must submit it to PUT calls if you want it to be true |
Possible Methods
GET POST PUT DELETE
Arguments
channel_id (optional for GET, required otherwise)
Channel id to try and modify or return, if not provided returns during GET call will return all channels for current user.
Json Object
Code Block |
---|
{ "channel_id" : "531733e8b8e08e9d2197b0b0", //REQUIRED: either here or in url (except for GET if you want all channels) "events" : [], //ONLY IN RESPONSE "locations" : [], //ONLY IN RESPONSE "name" : "abc123", //OPTIONAL: required for POST, can be used in PUT to change name "index" : 4, //OPTIONAL: used in gui for ordering, if not provided won't be set "created_date" : "May 2, 2014 09:00:36 PM UTC", //OPTIONAL: will be set if not provided in POST, "favorite": boolean, //OPTIONAL: but if not provided will default to false "community_ids":[] //OPTIONAL: a set of string ids of the communities you want to limit search against, if omitted, will search all communities you are a member of } |
Example
Code Block |
---|
curl -b cookies.txt -X GET "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X GET "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt curl -b cookies.txt -X POST -d '{"name":"abc123"}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X PUT -d '{"name":"renamed my channel", "favorite":true}' "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt curl -b cookies.txt -X PUT -d '{"channel_id":"531733e8b8e08e9d2197b0b0", "name":"renamed my channel", "favorite":true}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X DELETE -d '{"channel":"531733e8b8e08e9d2197b0b0"}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X DELETE "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt |
Example Response
Info | ||
---|---|---|
curl -b cookies.txt -X PUT -d '{"name":"search test1"}' "http://localhost:8185/channel/53455c56e4b020ab310aeb9c" > response.txt
|
Info | ||
---|---|---|
curl -b cookies.txt -X GET "http://localhost:8185/channel" > response.txt
|