Using friends
endpoint you can obtain data about channels that your social network friends have.
This method instructs Coub server to get data about your friends from social networks and store it in the server's cache.
Resource endpoint:
GET /api/v2/friends/find
Request parameters:
facebook
, twitter
, vkontakte
, google
; optional parameter, if it is not specified the server will cache data from all these social networks.Request example:
GET /api/v2/friends/find?provider=google
Response format:
ok
or fail
;Response example
{
"status": "ok",
"friends":
{
"registered": "100",
"unregistered": "200"
}
}
This method lets you retrieve data about the channels that your friends have from the Coub server's cache.
Note, that to get the latest up-to-date data you need to cache it first using /api/v2/friends/find
endpoint. If there is no data in the cache, server will return zero found entries.
Resource endpoint:
GET /api/v2/friends
Request parameters:
facebook
, twitter
, vkontakte
, google
; optional parameter, if it is not specified the server will cache data from all these social networks.Request example:
GET /api/v2/friends?per_page=20&page=2&provider=facebook
Response format:
Response example
{
"page": "1",
"total_pages": "20",
"total_friends": "200",
"per_page": "10",
"friends": [channel small JSONs]
}
This method lets you retrieve channels that are chosen among your friends channels by Coub recommendation algorithms.
Resource endpoint:
GET /api/v2/friends/recommended
Request parameters:
Request example:
GET /api/v2/friends/recommended?page=2&q=some phrase
Response format:
Response example
{
"page": "1",
"total_pages": "20",
"total_friends": "200",
"per_page": "10",
"friends": [channel small JSONs]
}