PUT playable/…/appreciation/…

Stores the appreciation of a given playable (drill, story, test or course) by a user.

Resource URL

https://www.drillster.com/api/2.1.1/playable/{playable_id}/appreciation/{appreciation}

Parameters

Field Type Description
playable_id
required
String The ID of the drill, story, test or course to rate.

Example value: eSxMA4MISaCjJA43PgMEnQ
appreciation
required
Integer An appreciation rating in the 1..5 range.

If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e. Content-Length: 0). Not all HTTP clients do this automatically. For more information, please see RFC 2616.

Response

A 2.1.1 Rating object reflecting the user's appreciation that was just added.

Error responses

The following error situations are possible:

ID Response code Description
missing_playable_id 400 (Bad request) No playable ID given
playable_not_found 404 (Not found) Playable not found
no_access 403 (Forbidden) No access to playable
missing_appreciation 400 (Bad request) No appreciation given
invalid_appreciation 400 (Bad request) Appreciation must be between 1 and 5 inclusive