osmlab / to-fix-backend

The to-fix server
BSD 3-Clause "New" or "Revised" License
15 stars 13 forks source link

Create Comments endpoints #141

Closed emilymdubois closed 6 years ago

emilymdubois commented 7 years ago

Here are the endpoints I think we'll need for item comments with the available query and parameter options. All instances of :comment can be assumed to mean comment ID, an autogenerated integer assigned when the comment is created.

@batpad @kepta @samanpwbb


Get all comments for an item

GET /project/:project/items/:item/comments

Create a comment

POST /project/:project/items/:item/comments

Payload parameters

Name Type Description
body string Required. The comment text.
coordinates array Optional. Longitude and latitude associated with the comment.

Get a comment

GET /project/:project/items/:item/comments/:comment

Update a comment

PUT /project/:project/items/:item/comments/:comment

Payload parameters

Name Type Description
body string Optional. The new comment text.
coordinates array Optional. The new longitude and latitude associated with the comment.

Delete a comment

DELETE /project/:project/items/:item/comments/:comment
batpad commented 6 years ago

This is done! Let's create separate tickets for changes.