[关闭]
@fuyb1986 2017-05-11T06:28:26.000000Z 字数 771 阅读 672

banner

金色童年


获取banner列表

Method and URL Structure

Method Resource URL
GET /news/banners/

Request Paramaters

Name Description Required Defalut
page 页码 NO 1
page_size 每页条目 NO 10
category__name 类型 YES
Name Description
home 首页
childhood 定格童年页
E-shop 商城
circles 发现页
travel 亲子旅拍
public 爱心公益
alashan 阿拉善
xiaomi 沙漠小米

cURL Example

  1. curl -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\ http://localhost/news/banners/?page=3&page_size=8&category__name=home

Reponse Data

Name Description
pk banner id
title 标题
link 链接地址
banner_url 图片地址
desc 描述

Response

  1. {
  2. u'count': 40,
  3. u'previous': http://localhost/news/banners/?page=2&page_size=10,
  4. u'next': http://localhost/news/banners/?page=4&page_size=10,
  5. u'results': [{
  6. u'pk': 3,
  7. u'title': 'title',
  8. u'link': 'http://link.example.com',
  9. u'banner_url': 'http://img.example.com/3.png'
  10. u'desc': 'desc'
  11. },.... ],
  12. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注