API Reference

Media.getUserRatingforFile

Returns if a user has rated or voted for a specific file.

If the user has rated, this function will return the rating; If the user hasn't already it will return false.

We will also return the appropriate error message if the MID or the UID are incorrect or not found in our system.


Syntax

int media.getUserRatingForFile ( int mid, int uid )

Arguments

NameTypeRequiredDefault valueDescription
midintRequirednoneThe media ID.
uidintRequirednoneA user ID.

Options

The options array may contain the following parameters.

NameTypeDescriptionDefault ValuesPossible Values
resultINTThe response will be 1 if the user has rated the specified media item. If the user has not rated the media item we will return an empty response. If the user ID does not exist we will return an empty response.emptyempty, 1 (success), error message

Sample Response

Sample REST Response
http://api.filemobile.com/services/rest/media/getUserRatingForFile?mid=[MEDIA_ID]&uid=[USER_ID]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on getUserRatingforFile.

Add a Comment

  • captcha