Channel / {channel_id} / Events

/channel/{channel_id}/events/{event_id}

Modifies a specifics channels events collection

Note:A list of events can be given to make mass updates

Possible Methods

POST PUT DELETE

Arguments

channel_id (required)
Channel id to modify

event_id (required, optional for DELETE)
event id to modify, if not provided during a delete, will delete all events

Json Object
[{
        "event_id" : "531733e8b8e08e9d2197b0b0", //REQUIRED: either here or in the url
		"liked" : true,    						 //REQUIRED: the api will set this to false if it is ever not provided
		"timestamp" : Date 						 //OPTIONAL: Date will be set to time of api call if not provided
},
{
        "event_id" : "531733e8b8e08e9d2197b0b1", //REQUIRED: either here or in the url
		"liked" : false,    						 //REQUIRED: the api will set this to false if it is ever not provided
		"timestamp" : Date 						 //OPTIONAL: Date will be set to time of api call if not provided
}]

 

Example
curl -b cookies.txt -X POST -d '[{"event_id":"531733e8b8e08e9d2197b0b0", "liked":true},{"event_id":"531733e8b8e08e9d2197b0b1", "liked":false}]'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events" > response.txt
curl -b cookies.txt -X POST -d '{"liked":true}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events/531733e8b8e08e9d2197b0b0" > response.txt
curl -b cookies.txt -X PUT -d '{"event_id":"531733e8b8e08e9d2197b0b0", "liked":false}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events" > response.txt
curl -b cookies.txt -X PUT -d '{"liked":false}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events/531733e8b8e08e9d2197b0b0" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events" > response.txt
curl -b cookies.txt -X DELETE -d '{"event_id":"531733e8b8e08e9d2197b0b0"}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events/531733e8b8e08e9d2197b0b0" > response.txt

 

Example Response
curl -b cookies.txt -X POST -d '{"event_id":"531733e8b8e08e9d2197b0b0", "liked":true}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/events" > response.txt

 

 {
    "response": {
        "action": "Channel/Events",
        "success": true,
        "message": "Created a new channel event",
        "time": 0
    },
    "data": {
        "channel_id": "531733e8b8e08e9d2197b0b0",
        "name": "abc123",
        "locations": [{
            "location_id": "53179986b8e06656d5398b49",
            "latitude": 23.7,
            "longitude": 67.2,
            "radius": 22.0,
            "timestamp": "Mar 5, 2014 09:39:18 PM UTC"
        },
        {
            "location_id": "53179990b8e06656d5398b4a",
            "latitude": 23.7,
            "longitude": 67.2,
            "radius": 676.0,
            "timestamp": "Mar 5, 2014 09:39:28 PM UTC"
        }],
        "events": [{
            "event_id": "53146705e4b056d7c3c22ed8",
            "liked": true,
            "timestamp": "Mar 5, 2014 10:22:18 PM UTC"
        },
        {
            "event_id": "53146705e4b056d7c3c22ed8",
            "liked": true,
            "timestamp": "Mar 6, 2014 02:09:51 PM UTC"
        },
        {
            "event_id": "531733e8b8e08e9d2197b0b0",
            "liked": true,
            "timestamp": "Mar 7, 2014 05:17:54 PM UTC"
        }]
    }
}