-
Notifications
You must be signed in to change notification settings - Fork 0
Top5s
Jan Zimandl edited this page Jan 25, 2016
·
8 revisions
- Get Top5 by CategoryId - GET /top5s?category_id=1
- Top5s for Tastemakers - GET /top5s/tastemakers
- Top5s for Tastemakers in Category - GET /top5s/tastemakers?category_id=1
- Top5s for Friends - GET /top5s/friends
- Top5s for Friends in Category - GET /top5s/friends?category_id=1
- Top5s for Recent Friends Activity - GET /top5s/friends/recent?category_id=1
- Add Place to Top5 by Category - POST /top5s/places
- Update Places in Top5 by Category - PUT /top5s/places
- Remove Place from Top5 by Category - DELETE /top5s/places?place_id=&category_id=
I can get only my Top5.
Required authentication.
GET /top5s?category_id=1&access_token={{access_token}} HTTP/1.1
Parameter | Length | Optional | More info |
---|---|---|---|
category_id | no |
HTTP/1.1 200 OK
{
"success": true,
"result": {
"category_id": 1,
"places": [
{
"place_id": 1,
"title": "Canter's Deli",
"lat": 14.1234,
"lon": 50.213,
"news": true
},
{
"place_id": 2,
"title": "Joe's Pizza",
"lat": 14.1234,
"lon": 50.213,
"news": false
}
]
}
}
Parameter | Optional | More info |
---|---|---|
category_id | no | |
places | no | list of places |
_place_id | no | |
_title | no | place title |
_lat, _lon | no | location |
_news | yes | news for place |
Required authentication.
GET /top5s/tastemakers HTTP/1.1
HTTP/1.1 200 OK
{
"success": true,
"result": [
{
"category_id": 1,
"tastemakers_count": 2,
"last_activity_date": "2015-06-10T10:23:52Z",
"places": [
{
"place_id": 1,
"title": "Canter's Deli",
"lat": 14.1234,
"lon": 50.213,
"news": true
},
{
"place_id": 2,
"title": "Joe's Pizza",
"lat": 14.1234,
"lon": 50.213,
"news": false
}
]
},
...
]
}
Parameter | Optional | More info |
---|---|---|
category_id | no | |
tastemakers_count | no | |
last_activity_date | no | |
places | no | list of places |
_place_id | no | |
_title | no | place title |
_lat, _lon | no | location |
_news | yes | news for place |
Required authentication. Enables pagination.
GET /top5s/tastemakers?category_id=1 HTTP/1.1
Parameter | Length | Optional | More info |
---|---|---|---|
category_id | no |
HTTP/1.1 200 OK
{
"success": true,
"result": [
{
"category_id": 1,
"user": {
"user_id": 16,
"first_name": "Jenda",
"last_name": "Zimandl",
"photo_url": "https://scontent.xx.fbcdn.net/hprofile-xft1/v/t1.0-1/p200x200/10478732_10202373702691704_1664910723578270453_n.jpg?oh=c57b65ac154124f799ec0327e151c860&oe=5732750F",
"is_tastemaker": true,
"is_friend": false
},
"last_activity_date": "2015-06-10T10:23:52Z",
"places": [
{
"place_id": 1,
"title": "Canter's Deli",
"lat": 14.1234,
"lon": 50.213,
"news": true
},
{
"place_id": 2,
"title": "Joe's Pizza",
"lat": 14.1234,
"lon": 50.213,
"news": false
}
]
},
...
]
}
Parameter | Optional | More info |
---|---|---|
category_id | no | |
user | no | author of the top 5 |
_user_id | no | |
_first_name | no | |
_last_name | no | |
_photo_url | yes | url |
_is_tastemaker | no | |
_is_friend | no | |
last_activity_date | no | |
places | no | list of places |
_place_id | no | |
_title | no | place title |
_lat, _lon | no | location |
_news | yes | news for place |
Required authentication.
GET /top5s/friends HTTP/1.1
HTTP/1.1 200 OK
{
"success": true,
"result": [
{
"category_id": 1,
"friends_count": 2,
"last_activity_date": "2015-06-10T10:23:52Z",
"places": [
{
"place_id": 1,
"title": "Canter's Deli",
"lat": 14.1234,
"lon": 50.213,
"news": true
},
{
"place_id": 2,
"title": "Joe's Pizza",
"lat": 14.1234,
"lon": 50.213,
"news": false
}
]
}
...
]
}
Parameter | Optional | More info |
---|---|---|
category_id | no | |
friends_count | no | |
last_activity_date | no | |
places | no | list of places |
_place_id | no | |
_title | no | place title |
_lat, _lon | no | location |
_news | yes | news for place |
Required authentication. Enables pagination.
GET /top5s/friends?category_id=1 HTTP/1.1
Parameter | Length | Optional | More info |
---|---|---|---|
category_id | no |
HTTP/1.1 200 OK
{
"success": true,
"result": [
{
"category_id": 1,
"user": {
"user_id": 16,
"first_name": "Jenda",
"last_name": "Zimandl",
"photo_url": "https://scontent.xx.fbcdn.net/hprofile-xft1/v/t1.0-1/p200x200/10478732_10202373702691704_1664910723578270453_n.jpg?oh=c57b65ac154124f799ec0327e151c860&oe=5732750F",
"is_tastemaker": false,
"is_friend": true
},
"last_activity_date": "2015-06-10T10:23:52Z",
"places": [
{
"place_id": 1,
"title": "Canter's Deli",
"lat": 14.1234,
"lon": 50.213,
"news": true
},
{
"place_id": 2,
"title": "Joe's Pizza",
"lat": 14.1234,
"lon": 50.213,
"news": false
}
]
},
...
]
}
Parameter | Optional | More info |
---|---|---|
category_id | no | |
user | no | author of the top 5 |
_user_id | no | |
_first_name | no | |
_last_name | no | |
_photo_url | yes | url |
_is_tastemaker | no | |
_is_friend | no | |
last_activity_date | no | |
places | no | list of places |
_place_id | no | |
_title | no | place title |
_lat, _lon | no | location |
_news | yes | news for place |
Required authentication. Enables pagination.
GET /top5s/friends/recent?category_id=1 HTTP/1.1
Parameter | Length | Optional | More info |
---|---|---|---|
category_id | yes | category filter - return all if null |
HTTP/1.1 200 OK
{
"success": true,
"result": [
{
"category_id": 1,
"user": {
"user_id": 16,
"first_name": "Jenda",
"last_name": "Zimandl",
"photo_url": "https://scontent.xx.fbcdn.net/hprofile-xft1/v/t1.0-1/p200x200/10478732_10202373702691704_1664910723578270453_n.jpg?oh=c57b65ac154124f799ec0327e151c860&oe=5732750F",
"is_tastemaker": false,
"is_friend": true
},
"last_activity_date": "2015-06-10T10:23:52Z",
"places": [
{
"place_id": 1,
"title": "Canter's Deli",
"lat": 14.1234,
"lon": 50.213,
"news": true
},
{
"place_id": 2,
"title": "Joe's Pizza",
"lat": 14.1234,
"lon": 50.213,
"news": false
}
]
},
...
]
}
Parameter | Optional | More info |
---|---|---|
category_id | no | |
user | no | author of the top 5 |
_user_id | no | |
_first_name | no | |
_last_name | no | |
_photo_url | yes | url |
_is_tastemaker | no | |
_is_friend | no | |
last_activity_date | no | |
places | no | list of places |
_place_id | no | |
_title | no | place title |
_lat, _lon | no | location |
_news | yes | news for place |
Required authentication.
POST /top5s/places HTTP/1.1
Content-Type: application/json
{
"category_id": 1000,
"place_id": 6,
"factual_id": "71dc250b-1a23-422b-a2b6-5512f546d182"
}
Parameter | Length | Optional | More info |
---|---|---|---|
category_id | no | ||
place_id | yes | factual_id or place_id must be set | |
factual_id | yes | factual_id or place_id must be set |
HTTP/1.1 200 OK
{
"success": true
}
Required authentication.
PUT /top5s/places HTTP/1.1
Content-Type: application/json
{
"category_id":1000,
"place1_id":3,
"place2_id":4,
"place3_id":6,
"place4_id":null,
"place5_id":null
}
Parameter | Length | Optional | More info |
---|---|---|---|
category_id | no | ||
place1_id | yes | ||
place2_id | yes | ||
place3_id | yes | ||
place4_id | yes | ||
place5_id | yes |
HTTP/1.1 200 OK
{
"success": true
}
Required authentication.
DELETE /top5s/places?place_id=4&category_id=1000 HTTP/1.1
Parameter | Length | Optional | More info |
---|---|---|---|
place_id | no | ||
category_id | no |
HTTP/1.1 200 OK
{
"success": true
}