RTyy / aiocomments

Comments Service Based on aiohttp
0 stars 0 forks source link

Make method to get user comments #13

Open RTyy opened 7 years ago

RTyy commented 7 years ago

Method should return plain list of all user comments sorted by update date.

Request:

  "user_id": user_id,  # id of the comments author,
curl -i -X GET http://local.server.com/api/comments/user/{i_id}/

Responses:

On Success Status Code: 200

[
    {
      "id": 1,  # comment id
      "i_id": 1, # instance_id,
      "itype_id": 2,  # instance type id
      "content": "some content",
      "created": "2017-06-29T16:09:42.347Z",
      "updated": "2017-06-29T16:09:42.347Z",
      "parent_id": null,
    },
    {
      ...
    }
]

On Error Status Code: 400, 403, 404

{
  "error": error_title,
  "data_errors": {
     "var_name": error_code,
     ...
  }
}
RTyy commented 7 years ago

2h