Rating

Rating API provides a range of actions for manipulating rating within Unet.


Basic information

Base URI

Scopes

  • inherited
  • rating_write

Endpoints

PARENT_RESOURCE_URI — URI that contains a parent endpoint (e.g. RESOURCE_URIentries/ID).

Prefix Endpoint Description
PARENT_RESOURCE_URI rating/ Getting a list of those who rated
PARENT_RESOURCE_URI rating/add/ Adding a rating
PARENT_RESOURCE_URI rating/delete/ Deleting a rating

+Getting a list of those who rated

Endpoint

Scopes

  • inherited

Request

Response


+Adding a rating

Endpoint

Scopes

  • rating_write

Request

  • No specific request params

Response


+Deleting a rating

Endpoint

Scopes

  • rating_write

Request

  • No specific request params

Response

  • No specific request params

Definitions

RatingListRequest

Name Description

limit (o)
unsigned integer

Number of items expected in response.

cursor (o)
string

The value of the next_cursor / prev_cursor parameter from the responce.
Should be empty to get the first set (page) of elements.

RatingListResponse

Name Description

items[]
object

@RatingItemResponse

limit
unsigned integer

Number of returned items (items per page).

next_cursor
string

URL for the next portion of items (next page).
Empty if there is no items for the next portion.

prev_cursor
string

URL for the previous portion of items (previous page).
Empty if there is no items for the previous portion.

total_count
unsigned integer

Total number of items.

RatingItemResponse

Name Description

uid
unsigned integer

User ID.

voted
string

Possible values:

  • like
  • dislike

voting_time
timestamp

Voting time.

RatingModel

Name Description

likes
unsigned integer

Total number of likes.

dislikes
unsigned integer

Total number of dislikes.

voted
string

Exists, if the current user voted for the material.
Possible values:

  • like
  • dislike