Poem¶
Pentameter poem endpoints are used to manage poem-centered activity.
get¶
GET /api/poem/<poem_id>
Returns a poem if it exists and is published:
Returns: Poem Response
Method: GET
Content-Type: application/json
Body: empty
increment metric¶
PUT /api/poem/<poem_id>/metric
Used to increment a metric for the given poem:
Returns: Poem Response
Method: PUT
Content-Type: application/json
Body: {
"metric": "read"
}
like¶
PUT /api/poem/<poem_id>/like
Current user like the specified poem:
Returns: Poem Response
Method: PUT
Login: Required
unlike¶
DELETE /api/poem/<poem_id>/like
Current user like the specified poem:
Returns: Poem Response
Method: PUT
Login: Required
get likes¶
GET /api/poem/<poem_id>/like
Used to get a list of the authors who have liked this poem:
Returns: List of Authors Response
Method: GET