Versions Compared

Key

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

...

{channel_id}
Info

Retrieves a specific bookmark or all bookmarks for a channel if the id was specified or all channels available to the user if channel_id is not provided. (TODO: UPDATE)bookmarks if neither is specified.

Possible Methods

GET POST PUT DELETE

Arguments

...

channel_id(optional)
Channel id to try and return, if not provided returns all channels for current userfilter bookmarks on

Json Object

...

Code Block
{
        "String channel_id" : "531733e8b8e08e9d2197b0b0",
        "events" : []String bookmark_id,
        "locations" : [],
        "name" : "abc123"
	String event_id
}

 

Example
(TODO: UPDATE)
Code Block
curl -b cookies.txt -X GET "http://localhost:8185/channelbookmark" > response.txt
curl -b cookies.txt -X GET "http://localhost:8185/channelbookmark/531733e8b8e08e9d2197b0b05331abfdb8e06221ba4a3b8a" > response.txt
curl -b cookies.txt -X POSTGET -d '{"namechannel_id":"abc123531f3e50b8e0a93944925594"}'  "http://localhost:8185/channelbookmark" > response.txt
curl -b cookies.txt -X PUTPOST -d '{"nameevent_id":"renamed my channel528896d9e4b09b7449f3ffe1", "channel_id":"531f3e50b8e0a93944925594"}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0bookmark" > response.txt
curl -b cookies.txt -X PUT -d '{"channelevent_id":"531733e8b8e08e9d2197b0b0528896d9e4b09b7449f3ffe1", "namechannel_id":"renamed my channel531f3e50b8e0a93944925594"}' "http://localhost:8185/bookmark" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/bookmark/channel5331abfdb8e06221ba4a3b8a" > response.txt
curl -b cookies.txt -X DELETE -d '{"channel_id":"531733e8b8e08e9d2197b0b0531f3e50b8e0a93944925594"}'  "http://localhost:8185/channelbookmark" > response.txt

 

Example Response
Info
curl -b cookies.txt -X DELETEPOST -d '{"event_id":"528896d9e4b09b7449f3ffe1", "channel_id":"531f3e50b8e0a93944925594"}' "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0bookmark" > response.txt

 

...

Example Response

...

Info
 
Code Block
Code Block
 {
    "response": {
        "action": "Bookmark",
        "success": true,
        "message": "Created a new bookmark",
        "time": 0
    },
    "data": {
        "bookmark_id": "5331abfdb8e06221ba4a3b8a",
        "event_id": "528896d9e4b09b7449f3ffe1",
        "channel_id": "531f3e50b8e0a93944925594"
    }
}