From b8ded408ffdc262e46e9c2fa31c3687825ead3e0 Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 15 Jan 2018 13:32:18 -0600 Subject: [PATCH] match readme to changed response for user's comments --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e297e30..ab2fd74c 100644 --- a/README.md +++ b/README.md @@ -170,10 +170,16 @@ Sort can be `time` or `score`. Supported sort order with prefix -/+, i.e. `-time - `GET /api/v1/last/{max}?site=site-id` - get up to `{max}` last comments - `GET /api/v1/id/{id}?site=site-id` - get comment by `comment id` -- `GET /api/v1/comments?site=site-id&user=id` - get comment by `user id` +- `GET /api/v1/comments?site=site-id&user=id` - get comment by `user id`, returns `response` object + ```go + type response struct { + Comments []store.Comment `json:"comments"` + Count int `json:"count"` + }{} + ``` - `GET /api/v1/count?site=site-id&url=post-url` - get comment's count for `{url}` - `GET /api/v1/list?site=site-id` - list commented posts, returns array or `PostInfo` - ``` + ```go type PostInfo struct { URL string `json:"url"` Count int `json:"count"`