Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

Info
curl -b cookies.txt -X PUT -d '{"name":"search test1"}' "http://localhost:8185/channel/53455c56e4b020ab310aeb9c" > response.txt

 

Code Block
{
    "response": {
        "action": "Channel",
        "success": true,
        "message": "Updated a channel",
        "time": 0
    },
    "data": {
        "channel_id": "53455c56e4b020ab310aeb9c",
        "name": "search test1",
        "locations": [],
        "events": [
            {
                "event_id": "52685513e4b0876bf2371389",
                "liked": false,
                "timestamp": "Apr 9, 2014 02:43:16 PM UTC"
            },
            {
                "event_id": "52737684e4b02ca0170e6442",
                "liked": false,
                "timestamp": "Apr 9, 2014 02:48:33 PM UTC"
            },
            {
                "event_id": "5281b1eae4b068d945ff0f7a",
                "liked": true,
                "timestamp": "Apr 9, 2014 06:33:28 PM UTC"
            },
            {
                "event_id": "527e6550e4b0e6c5bceb1760",
                "liked": true,
                "timestamp": "Apr 9, 2014 06:33:31 PM UTC"
            }
        ],
        "score": {
            "entities": {
                "winning ticket/keyword": 1,
                "sugarplumpie/twitteruser": -2,
                "winning number/keyword": 1,
                "greece/place": -2,
                "3040 foothill blvd/road": 1,
                "liquor store/keyword": 1,
                "social media/topic": -2,
                "new york, ny, united states/city": -1,
                "million lottery ticket/keyword": 1,
                "$1 million/currency amount": 2
            },
            "keywords": {"hillary":1.0}, 
			"tags": {
                "October": -1,
                "db": 1,
                "Staten": -1,
                "Brooklyn": -1,
                "November": -1,
                "York": -1,
                "New": -1,
                "NYC": -1,
                "Island": -1,
                "Twitter": -1
            }
        }
    }
}

...