Retrieve Likes By User ID
From KickApps Documentation
URL: /rest/user/likes/USERID/ASID
Input Parameters: (POST or GET are supported)
| Field | Type | Needed | Description |
|---|---|---|---|
| t | String | Required | The user token generated via the "Create Token" API call Notes: any user in the community can make this call |
| as | String | Required | The site Id unique for each of the affiliate's sites |
| callback | String | Optional | The name of your JavaScript callback function |
| pgNum | Integer | Optional | The current page number in the search results. For your first call, set pgNum to "1". For subsequent calls, set pgNum to the page you want to display. Defaults to 1 if not provided. |
| totSize | Integer | Optional | The total number of items that can be returned over multiple pages. For your first call, set totSize to "0". For subsequent calls pass the total size as the value returned in your request for the first page. If the totSize is not set then pagination will fail and you will always receive the first page of results. Defaults to 0 if not provided. |
| pageSize | Integer | Optional | The number of results to display on each page. Max pageSize is "1000". Defaults to 10 if not provided. |
| sortType | String | Optional | The sort order of the "LIKE" results. The following options are valid: createdAtAscending (default), createdAtDescending, The parameter's arguments are case sensitive. |
Output:
| status | 1 on success and -1 on error. |
| error | A message indicating the error condition |
| errorId | A numeric reference to the error condition |
Success:
callback {
"status": "1",
"message": "",
"numLikes": 10
"likes": [
{ "type": "comment",
"displayText": "this is a comment", <-- note, comment body here when type == comment
"id": "{commentID}",
"createdAt": "{GMT time}" <-- createdAt of the LIKE, not the comment
},
{ "type": "emedia",
"displayText": "Microsoft buys Skype", <-- note, emedia name here when type == emedia
"id": "{pathToMedia}"
"createdAt": "{GMT time}" <-- createdAt of the LIKE, not the emedia
}
....
]
}
Failure: {"status": -1, "errorId": "123", "error": "Error Message"}
Values for error conditions:
| errorId | error | Reason |
|---|---|---|
| 0 | Success | |
| 1 | invalid token | Token is not for this site, or unknown. |
| 13 | invalid user_id | user_id is either not 0 (anonymous) or not valid for this as |
| 28 | Invalid <fieldName> <describe why> | pathToMedia or commentId invalid |
| 72 | pathToMedia must reference an approved media object |
DB Updates (if call is successful): (none)
Favorites






