media.addToFavorites

Syntax

void media.addToFavorites ( mixed mid, int uid = NULL )

Argument Info

NameTypeRequiredDefault valueDescription
midmixedRequirednoneThe ID of the media item you are going to add to your favourites.
uidintOptionalNULLIf a users UID is omitted the current logged in user will be used and the media item will be added to their favourites.

Response

In the response you will receive either a 1 for a success or you will be notified if the user ID or media ID passes were invalid.

NameTYPEDescriptionPossible Values
resultINTThis will return 1 if the request was a success.empty, 1, error result

Return Values

FieldDescriptionPossible Values
An API key having the media.addToFavorites permission a user ID may be provided and will be used to set the media ID as the user's favourite.aN/A
Without an API key the logged in user will be used and the media item will be added to the users favourite.aN/A