DELETE favorites/:id
Remove a quote from the user's favorites.
- A valid access token must be provided in access_token parameter.
The access_token
should be sent using an HTTP header like so:
Authorization: Bearer access_token
An example call with CURL:
curl -X DELETE --header "Authorization: Bearer jLJeOz8aEIsKtGSdXsqTDGxmtEduUGkZTVJBo3We" 'https://api.teen-quotes.com/v1/favorites/750'
A JSON object containing keys status
and success
with an HTTP code 200.
All known errors cause the resource to return HTTP error code header together with a JSON array containing at least status
and error
keys describing the source of error.
- 400 Bad request — When the status is
quote_not_found
.
The error
messages are the following:
- If
status
isquote_not_found
:The quote #:id was not found.
Request
DELETE https://api.teen-quotes.com/v1/favorites/750
Return
{
"status":"favorite_deleted",
"success":"The quote #750 was deleted from favorites."
}
For an error with HTTP code 400:
{
"status":"quote_not_found",
"error":"The quote #750 was not found."
}