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 |
|
Banner Type
Name |
Description |
home |
首页 |
childhood |
定格童年页 |
E-shop |
商城 |
circles |
发现页 |
travel |
亲子旅拍 |
public |
爱心公益 |
alashan |
阿拉善 |
xiaomi |
沙漠小米 |
cURL Example
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
{
u'count': 40,
u'previous': http://localhost/news/banners/?page=2&page_size=10,
u'next': http://localhost/news/banners/?page=4&page_size=10,
u'results': [{
u'pk': 3,
u'title': 'title',
u'link': 'http://link.example.com',
u'banner_url': 'http://img.example.com/3.png'
u'desc': 'desc'
},.... ],
}