[关闭]
@fuyb1986 2016-03-23T04:19:26.000000Z 字数 694 阅读 614

获取用户的答案

好热闹


  1. 由于一个问题下用户可以回答多个答案,只好以问题列表的形式返回
  2. 只返回通过审核的问题的答案
  3. 只返回非私有问题的答案
  4. 只返回「问答」类型的问题的答案
  5. 这个接口有 10 分钟的缓存
  6. 需要分页,每页 5 个答案

Method and URL Structure

Method Resource URL
GET /qa/${username}/${page}/answers/

Request Parameters

No applicable

cURL Example

  1. $ curl http://www.haorenao.cn/qa/18012345678/1/answers/

JSON Response

Name Description
ret 标识是否成功。ok, 成功; failed, 失败
reason 失败原因
questions 问题列表
id 问题 ID
title 问题标题

Anaswer

Name Description
content 答案的前 60 个字符
vote_count 赞数
create_time 回答时间
answer_type 答案类型
answer_type_display 答案类型的中文显示
id 答案 ID
  1. {
  2. "ret": "ok",
  3. "reason": "",
  4. "questions": [{
  5. "id": 1316,
  6. "title": u"问题的标题",
  7. "answers": [{
  8. "content": u"答案内容的前60个字符...",
  9. "vote_count": 15,
  10. "create_time": "2016-03-07 19:49:45",
  11. "answer_type": 0,
  12. "answer_type_display": u'付费',
  13. "id": 4215
  14. }...],
  15. }, ...]
  16. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注