Retrieve Comments
From KickApps Documentation
Retrieve a member’s comments made on media or members, with results displayed in a paginated format. Your request will look something like the following:
http://api.kickapps.com/rest/comments/{as}
Contents |
Parameters
As shown above, your call will include the following parameters:
- as. The affiliate site Id that this comment is posted on.
Post Parameters
For the first call, use the following values, pgNum "1", pageSize " " and totSize "0". The server will return the actual values for these post parameters, given your search criteria
- t. String. Required. Your access permissions.
- callback. String. Optional. The name of your JavaScript callback function.
- clientIP. String. Optional. Use the clientIP parameter to pass the IP address of the user making the call. If the IP has been blocked by the webmaster under the Affiliate Center -> Manage Members section, an error message will be returned starting with "status":"-1","error":"This IP address has been banned".
- mediaType. Required. The media type. emedia, audio, photo, blog, sets, video, group, or user. KickApps' sample applications use mediaType to check for the Flash player to use.
- mediaId. Optional. The numeric id for the media or member.
- userId. Required. The numeric id for the commenter. If zero, the response will return comments for all members.
- mediaName. Optional. The media item's title.
- pgNum. 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.
- totSize. The total number of returns for this return. 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.
- pageSize. The number of results to display on each page. Max pageSize is "1000". (modified Aug 24,2011) When userId is 0 and url and mediaId are blank, this value can be a maximum of 100.
- url. Only required when mediaType is emedia and a userId is provided. This is the original pathToMedia value provided when Add External Media was called. (modified Aug 24, 2011) When this is omitted and the userId is zero, all comments for all emedia will be returned.
- sortOldestFirst. Optional. Values are T or F with a default of T.
- reviewed. Optional. Values: T,F,A. If 'T' then returns only reviewed content. 'F' will only return non-reviewed content, 'A' will return both reviewed and non-reviewed content. 'T' is default value.
- visible. Optional. Values: T,F,A. If 'T' then only visible (non-deleted, approved) content will be returned, 'F' will return all non-reviewed and deleted content, 'A' will return all content regardless of status. 'T' is default value.
JSON Payload
On success, a return that begins with totSize, pageSize, pgNum, and status": "1","error":"" where:
- totSize. The total number of comments available for this query. This value should be supplied for all subsequent requests when using pagination.
- pageSize. The total number of pages that the comments will display on.
- pgNum. The page number that is being viewed.
- status. 1 if the call was a success. -1 if the call produced an error.
- error. If the call status is -1, error will contain descriptive text for the error.
Then, for each returned comment the following will display:
- mediaType. The media type. audio, photo, blog, video, external media, or user. KickApps' sample applications use mediaType to check for the Flash player to use.
- pathToPreview. The path to the media preview. For a video the file is transcoded and then five random screens are grabbed from the file. An affiliate can choose the preview image from among these screens, upload their own image, or use the default image. For photo, this is a path to a thumbnail version of the image. This image was manually uploaded by the member and then automatically resized to for the thumbnail or is the default image. For audio, this is a path either to a selected preview image loaded by the member or to the default image.
- createdBy. The numeric Id for the person who created the comment.
- mediaId/userId. The numeric Id for the media item to which the comment is posted or the member.
- body. The text for the member's comment.
- subject. The descriptive title for the comment.
- numComments. The number of comments returned.
- averageRating. For media types other than user, the average of all ratings issued.
- views. The number of times this media or member profile has been viewed.
- createdAt. A nested object stating when the media was created in the following format. All times are returned as Greenwich Mean Time (GMT) dayOfMonth month hour:minute:second GMT. This would appear as follows: "createdAt":"22 Feb 2008 02:07:19 GMT"
- medianame/username. The name of the media or the username.
- createdByPathToPhoto. The path to the profile photo of the user posting the comment.
- createdByUsername. The username of the creator of the comment.
- pathToMedia. The URL of External Media. You will get this parameter when you use this call for retrieve external media comments only.
List of KickApps API Calls
Note: Occasionally (and without advanced warning) we modify our API calls by adding new parameters in the response payload. Please keep this in mind when designing your strategy for parsing our responses.
Favorites









