Skip to content

Latest commit

 

History

History
executable file
·
53 lines (41 loc) · 1.15 KB

photo-rate.md

File metadata and controls

executable file
·
53 lines (41 loc) · 1.15 KB

API Method: /api/photo/rate

flags=comments

Rate a photo or video.

Parameters

ParameterDescription
photo_id (required) The ID of the video to rate.
rating (required) The rating normalized to a float value between 0 and 5. You will be in charge of converting the internal 0-1 value to match your site's rating scheme. For example, in a 5-star rating system, 0 stars will convert to a 0 rating, 1 star is 0.25 and so on up to 5 stars and 1.

Permission level

The minimum required permission level is:

anonymous

Example XML Response

<response status="ok" permission_level="anonymous" cached="0">
  <rating>0.5</rating>
</response>

Example JSON Response

{
  "status": "ok", 
  "permission_level":"anonymous",
  "cached":"0",
  "rating":{"rating": "0.5"},
  "p": "1",
  "size": "1",
  "site": ...,
  "endpoint": "/api/photo/rate"
}