/search/feed/
...
Info |
---|
Retrieves a specific channel or all channels available to the user if channel_id is not provided. (TODO: UPDATE) |
Possible Methods (TODO: UPDATE)
GET POST PUT DELETE
Arguments
(TODO: UPDATE)
channel_id(optional)
Channel id to try and return, if not provided returns all channels for current user
Json Object
(TODO: UPDATE)
...
{channel_id}
/search/feed?channel_id=abc1234
Info | ||
---|---|---|
Returns a list of documents that should just be nsight-events for a given channel_id or the posted data (cannot be both)
|
Possible Methods
GET, POST
Arguments
channel_id: (optional) id of the channel you want to return a feed for, used in the GET request or when passed as a query param in the POST request, will update score for that channel based on keyword searches
Json Object
Code Block |
---|
SearchFeedApiPojo { List<String> search_terms = "channel_id" : "531733e8b8e08e9d2197b0b0",new ArrayList<String>(); List<ChannelLocationApiPojo> locations = new ArrayList<ChannelLocationApiPojo>(); } ChannelLocationApiPojo { "events" : [], String location_id; Double latitude; "locations" : [],Double longitude; Double radius; "name" : "abc123"Date timestamp; } |
Example
(TODO: UPDATE)
Example
Code Block |
---|
curl -b cookies.txt -X GET "http://localhost:8185/search/feed/channel531f3e50b8e0a93944925594" > response.txt curl -b cookies.txt -X GET POST -d '{ "search_terms":["obama","white house"], "locations":[{"latitude":38.881813, "longitude":-76.992188, "radius":500.0}] }' "http://localhost:8185/channelsearch/531733e8b8e08e9d2197b0b0feed" > response.txt curl txt |
Example Response
Info |
---|
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"}' "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt curl -b cookies.txt -X PUT-d '{"channel_id":"531733e8b8e08e9d2197b0b0", "name":"renamed my channel"}' "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
(TODO: UPDATE)
Info | |||
---|---|---|---|
Code Block |
|