Retrieve Entries for Contest
From KickApps Documentation
This method retrieves all contest entries for a given contest (by contestId).
Authentication
This method requires a authenticated user token from any type of user.
Call Structure
http://api.kickapps.com/rest/contestentries/list/{asid}
URL Arguments
|
|
|
| {asid}
| required
| The site Id to search. as is unique for each of the affiliate's sites.
|
HTTP Method must be POST
Post Arguments
|
|
|
| t
| required
| the user token generated via the "Create Token" API call.
|
| contestId
| int,required
| The ID of the contest.
|
| callback
| String
| The name of your JavaScript callback function.
|
| pgNum
| int
| 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. If not provided, this value is defaulted to 1.
|
| pageSize
| int
| The number of results to display on each page. Max pageSize is "1000". If not provided, this value is defaulted to 10.
|
| sortType
| string
| The sort order of the contest results. The following options are valid: createdAt (default), votes, averageRating, (if applicable), , random (unsure how to implement) – The parameter’s arguments are case sensitive.
|
| sortDirection
| string
| asc (for ascending), desc (for descending) (default)
|
Response
Success
{
"status": 1,
"totSize": "2",
"pgNum": "1",
"pageSize": "10",
"sortType": "votes",
"sortDirection": "descending",
"contestEntries": [
{
"contestEntryId": "1234",
"contestId": "1234",
"title": "This is my contest entry",
"description": "This is a description of my contest entry",
"rating": "4",
"votes": "200",
"numOfTimesRated1": "3",
"numOfTimesRated2": "17",
"numOfTimesRated3": "10",
"numOfTimesRated4": "20",
"numOfTimesRated5": "150",
"user_id": "43567",
"submittedTime": "<Posix time>",
"mediaId": "43567",
"mediaType": "photo",
"rank": 2,
"communityRank": 1,
"adminTags": [
"homepage",
"feature"
],
"tags": [
"cool",
"fantastic",
"music"
],
"media": "http://www.kickapps.com/media",
"mediaCaption": "This is a description of the media",
"altText": "Some alternative text to show in browsers",
"published": true,
"flagged": false
},
{
"contestEntryId": "1234",
"contestId": "1234",
"title": "This is my contest entry",
"description": "This is a description of my contest entry",
"rating": "4",
"votes": "200",
"numOfTimesRated1": "3",
"numOfTimesRated2": "17",
"numOfTimesRated3": "10",
"numOfTimesRated4": "20",
"numOfTimesRated5": "150",
"user_id": "43567",
"submittedTime": "<Posix time>",
"mediaId": "43567",
"mediaType": "photo",
"rank": 3,
"communityRank": 2,
"adminTags": [
"homepage",
"feature"
],
"tags": [
"cool",
"fantastic",
"music"
],
"media": "http://www.kickapps.com/media",
"mediaCaption": "This is a description of the media",
"altText": "Some alternative text to show in browsers",
"published": true,
"flagged": false
}
]
}
Error Codes
|
|
| 1
| Invalid Token
|
| 16
| Invalid pgNum (or not an int)
|
| 17
| Invalid pageSize (or not an int)
|
| 25
| pageSize cannot exceed 1000
|
| 40
| contestId not found (or not an int).
|
| 44
| token required
|
| 54
| Invalid sort option
|