店铺的优秀作品
金色童年
获取优秀作品的封面
Method and URL Structure
| Method |
Resource URL |
| GET |
/photograph/photograph_post/cover/ |
Request Parameters
| Name |
Description |
Required |
| tag |
标签 |
YES |
| shop |
店铺用户名 |
YES |
cURL Example
curl -X GET -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\-H 'Content-Type: Application/json' http://localhost/photograph/photograph_post/cover/?tag=百天&shop=100001
Response data
url 后面加上数字,用七牛接口处理图片
| Name |
Decription |
| file_url |
每个 file_url 是一个封面 |
| url |
原图 url |
| url_1000 |
宽为 1000px 的缩略图 |
| url_500 |
宽为 500px 的缩略图 |
| url_150x150 |
宽、高都为 150px 的缩略图 |
| tag |
标签 |
Reponse
[{ "file_url":{ "url":"http://www.example.com/2.jpg", "url_1000":"http://www.example.com/2.jpg-w1000", "url_500":"http://www.example.com/2.jpg-w500", "url_150x150":"http://www.example.com/2.jpg-150x150", }, "tag":"外景" }...]
获取最近的一次发布
Method and URL Structure
| Method |
Resource URL |
| GET |
/photograph/photograph_post/first/ |
Request Parameters
| Name |
Description |
Required |
| tag |
标签 |
YES |
| shop |
店铺用户名 |
YES |
cURL Example
curl -X GET -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\-H 'Content-Type: Application/json' http://localhost/photograph/photograph_post/first/?tag=百天&shop=1000100
Response data
| Name |
Decription |
| pk |
主键 ID |
| author |
作者 |
| description |
描述 |
| location |
上传地点 |
| published |
发布时间 |
| created |
数据创建时间 |
| post_id |
post model 主键 |
| tag |
标签 |
| photograph_set |
照片集合 |
Photograph
| Name |
Description |
| title |
照片标题 |
| desc |
照片描述 |
| file_url |
文件路径 |
| taken_date |
拍摄日期 |
| taken_location |
拍摄地点 |
| albums |
加入的相册 |
| has_collect |
是否收藏 |
| private_url |
文件的大图、小图 |
Album
| Name |
Description |
| album |
相册 id |
| name |
相册名字 |
| created |
创建时间 |
Reponse
{ "pk":12345, "author":"test author", "description":"test description", "location":"南柯郡汶汶乡大槐树", "published":"2017-02-16", "created":"2017-02-16T14:41:24.816098" "post_id": 12345, "tag": "person", "photograph_set":[{ "pk":7, "title":"xiaoming's photo", "desc":"南柯郡汶汶乡大槐树", "file_url":"http://www.example.com/2.jpg", "taken_date":"2016-07-01", "taken_location":"", "author":"布可朔夫", "created":"2017-02-16T14:41:24.808831", "albums":[{ "album":"7", "name":"相册第一", "created":"2017-02-16T14:41:24.337682" },{ "album":"6", "name":"全部", "created":"2017-02-16T14:41:24.320271" }], "has_collect":false, "private_url":{ "url":"http://www.example.com/2.jpg?", "url_1000":"http://www.example.com/2.jpg-w1000", "url_500":"http://www.example.com/2.jpg-w500?", "url_150x150":"http://www.example.com/2.jpg-150x150", } },],}