Retrieve Media Ratings

From KickApps Documentation

Jump to: navigation, search

Contents

Overview

Retrieve media ratings issued by the member, or all ratings for the specific media id. Ratings on KickApps use a scale of 1 to 5, with 1 being the lowest (worst, negative) value and 5 being the highest (best, positive) value.

For contest entries with a voting type of:

  • vote, the only rating allowed will be 1.
  • thumbs, the only ratings allowed will be integers 1 or 5.
  • stars, the only ratings allowed will be integers from 1-5.
NOTE: Webmasters, admins and editors get a rating multiplier of 10, meaning a rating from them of 3 stars would be stored as a value of 30 (3 x 10). Keep this in mind when seeing responses including ratings like 10, 20, 30, 40 or 50.

You can make an HTTP POST or GET request when using this call.

Your request will look something like the following:

http://api.kickapps.com/rest/ratings/{mediaType}/{mediaId}/{as}

Parameters

As shown above, your call will include the following parameters:

  • mediaType. The media type. audio, photo, blog, user, emedia, sets or video.
  • mediaId. Integer. The id of the media to be rated. This is specific to both the affiliate site and the media's type.
  • as. The site Id to search. as is unique for each of the affiliate's sites.

Post Parameters

  • 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".
  • userId. Optional. The numeric Id for a particular user. For example, pass a userId to see if the member has issued a rating for a certain video or on a certain affiliate site.
  • url. Required only for the emedia mediaType.


JSON Payload

On success, a payload that begins with "status":"1","error":"", containing the following for each media item the member rated that matches the search parameters.

  • id. The numeric Id for the media.
  • rated. The rating the member posted.
  • ratedCount. The number of times the media was rated by the user.
  • userId. The numeric if for the member who posted the media.
  • lastRatedAt. A nested object stating when the media was last rated. 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".
  • numOfTimesRated. The number of times this media item was rated.
  • numOfTimesRated1. The number of times this media item was rated 1. (In scope of Contests release.)
  • numOfTimesRated2. The number of times this media item was rated 2. (In scope of Contests release.)
  • numOfTimesRated3. The number of times this media item was rated 3. (In scope of Contests release.)
  • numOfTimesRated4. The number of times this media item was rated 4. (In scope of Contests release.)
  • numOfTimesRated5. The number of times this media item was rated 5. (In scope of Contests release.)
  • name. The media’s title.
  • pathToPreview. The path to the media preview for one of the following media types.
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.
photo 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.
audio A path either to a selected preview image loaded by the member or to the default image.
  • views. The number of times this media item was viewed. Increments each time the media item is viewed if the item is hosted by KickApps through Akamai.
  • averageRating. The average rating calculated using all the ratings issued for this media.
  • username. The username of the member who uploaded the media.
  • pathToIcon. The path to the stored thumbnail for this media.


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.