[关闭]
@fuyb1986 2017-05-11T04:18:18.000000Z 字数 727 阅读 611

金色童年文档格式说明

金色童年


  1. {
  2. "name": "xiaoming",
  3. "age": 7,
  4. }
  1. 返回一个 JSON 数据
  2. {
  3. "name": "xiaoming",
  4. "age": "7"
  5. }
  1. 返回分页数据
  2. {
  3. "count": 100, # 数据总计
  4. "next": "http://example.com/api/data/?page=3", # 下一页 url
  5. "previous": "http://example.com/api/data/?page=1", # 上一页 url
  6. "results": [{...},] # 数据集合
  7. }
  1. 返回一个 JSON 列表
  2. [
  3. {
  4. "name": "xiaoming"
  5. "avatar_url": "http://pic.example.com/xiaoming.jpg"
  6. },
  7. {
  8. "name": "xiaohua"
  9. "avatar_url": "http://pic.example.com/xiaohua.jpg"
  10. }
  11. ]

  1. curl -X GET -H 'Content-Type: Application/json' http://example.com/example_api/
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注