API Reference

Media.vote

Use this method to vote on the media item.

Voting on a media works in either of 2 ways:
1) Voting as a logged in user: this is done when uid is passed to the function or the user is actually logged in.
2) Making anonymous votes without reCaptcha.


Syntax

mixed media.vote ( mixed mid, mixed vote, mixed recaptcha = false, mixed uid = NULL, mixed APIKEY = NULL )

Arguments

NameTypeRequiredDefault valueDescription
midmixedRequirednone
votemixedRequirednone
recaptchamixedOptionalfalse
uidmixedOptionalNULL
APIKEYmixedOptionalNULL

Sample Response

Sample REST Response
http://api.filemobile.com/services/rest/media/vote?mid=[MEDIA_ID]&vote=[1 or 0]&recaptcha=[TRUE/FALSE]

// To be added later

Sample JSON Response
{
    "status": true,
    "result": {
        "id": MEDIA_ID,
        "status": 3,
        "contenttype": "image/jpeg",
        "filetype": 1,
        "context": 1,
        "filename": "316911_10150323267562762_165749722761_8170951_475289856_n.jpeg",
        "injector": "httpupload",
        "hits": 3,
        "message": "MEDIA_DESCRIPTION",
        "date": "2012-02-13 16:35:09",
        "title": "MEDIA_TITLE",
        "tags": "",
        "extension": "jpeg",
        "sender": "",
        "author": "",
        "metadata": "a:1:{s:4:\"exif\";a:7:{s:8:\"FileName\";s:9:\"phpC1hTFe\";s:12:\"FileDateTime\";i:1329168909;s:8:\"FileSize\";i:37193;s:8:\"FileType\";i:2;s:8:\"MimeType\";s:10:\"image/jpeg\";s:13:\"SectionsFound\";s:7:\"COMMENT\";s:7:\"COMMENT\";a:1:{i:0;s:1:\"*\";}}}",
        "uid": USER_ID,
        "filesize": 37193,
        "ofilesize": 51456,
        "upload": "2012-02-13 16:35:09",
        "location": "fmdevs3",
        "originallocation": "",
        "privacy": 0,
        "moderationstatus": 0,
        "width": 586,
        "height": 394,
        "length": "0.00",
        "conversiontime": "2.07566",
        "converttime": "2012-02-13 16:35:14",
        "lastupdatetime": "2012-02-15 09:58:28",
        "offensive": 0,
        "autoblog": "0",
        "rating": 10,
        "votecount": 1,
        "externalid": "",
        "parentid": 0,
        "originalLocation": "",
        "user_name": "USER_NAME",
        "user_email": "USER_EMAIL_ADDRESS",
        "user_country": "CA",
        "user_city": "Toronto",
        "user_state": "ON",
        "user_nickname": "",
        "user_firstname": "USER_FIRSTNAME",
        "user_lastname": "USER_LASTNAME",
        "url": "",
        "vhost": VHOST_ID,
        "rotation": 0,
        "language": "",
        "channel": 0,
        "channel_shortname": null,
        "channel_name": null,
        "channelleft": 0,
        "geo_latitude": null,
        "geo_longitude": null,
        "originalsaved": 1,
        "hidden": "SHOWN",
        "commentcount": 0,
        "approvedcomments": 0,
        "notdeniedcomments": 0,
        "publicUrl": "http://fmdevs3.filemobile.com/storage/MEDIA_ID",
        "thumbUrl": "http://fmdev.s3.amazonaws.com/storage/MEDIA_ID",
        "moderationdeniedid": 0
    }
}

Code examples

0 comments

Be the first to comment on vote.

Add a Comment

  • captcha