开放 API
使用说明
获取授权
全部 API
- Shop
- Metafields
- Customer
- CustomerAddress
- Account
- Product
- ProductVariant
- ProductImage
- Theme
- Asset
- Country
- Province
- City
- District
- ScriptTag
- Order
- Shipment
- ShipmentSupplier
- Payment
- PaymentMethod
- Redirect
- Page
- Webhook
- Blog
- BlogAuthor
- CustomerLevel
- StoreFile
- Promotion
- Coupon
- Post
- AfterSale
BlogAuthor
BlogAuthor
BlogAuthor 是博客作者对象,通过它可以读取作者内容,或者执行作者的创建、更新、删除。
BlogAuthor 相关API
BlogAuthor 属性
- id
Number 类型,BlogAuthor 的唯一整型标识。{ "id": 119}
- name
String 类型,BlogAuthor 笔名。{ "name" : "LavandaChen" }
- avatar
Object 类型,BlogAuthor 头像图片对象。{ "avatar": { "id": 249, "asset_id": "54fc12b54812f22a6800000b", "file_name": "QQ截图20140327131522.png", "epoch": "1425806020", "src": "/image/54fc12b54812f22a6800000b/QQ截图20140327131522.png?1425806020" } }
- weibo_url
String 类型,BlogAuthor 微博帐号地址。{ "weibo_url" : "" }
- douban_url
String 类型,BlogAuthor 豆瓣帐号地址。{ "douban_url" : "" }
- renren_url
String 类型,BlogAuthor 人人帐号地址。{ "renren_url" : "" }
- weixin_name
String 类型,BlogAuthor 微信名称。{ "weixin_name" : "" }
- weixin_qc_code
Object 类型,BlogAuthor 的微信二维码图片对象。{ "weixin_qc_code": { "id": 1177, "asset_id": "568d60ac5492c10f6400000a", "file_name": "web_header.jpeg", "epoch": "1452105903", "src": "/image/568d60ac5492c10f6400000a/web_header.jpeg?1452105903" }
- created_at
Datetime 类型,BlogAuthor 的创建时间。{ "created_at": "2015-01-25T22:31:06.155+08:00" }
- updated_at
Datetime 类型,BlogAuthor 的最近一次修改时间。{ "updated_at": "2015-01-25T22:31:06.155+08:00" }
GET /blog_authors
获取 BlogAuthor 列表
- limit
- 显示条数(默认10,最大50)
- page
- 显示页码(默认1)
- since_id
- 筛选
id
大于since_id
的Order
- fields
- 以
,
拼接Response显示的字段
- id
- 查询指定
id
- ids
- 以
,
拼接要显示的id
范围
- created_at_min
- 缺省筛选创建时间在指定日期时间之后的 Blog(格式2014-09-01T01:00:01)
- created_at_max
- 缺省筛选创建时间在指定日期时间之前的 Blog(格式2014-09-01T01:00:01)
- updated_at_min
- 缺省筛选更新时间在指定日期时间之后的 Blog(格式2014-09-01T01:00:01)
- updated_at_max
- 缺省筛选更新时间在指定日期时间之前的 Blog(格式2014-09-01T01:00:01)
- 获取 BlogAuthor 列表
- GET /blog_authors
{ "blog_authors": [ { "avatar": { "id": 249, "asset_id": "54fc12b54812f22a6800000b", "file_name": "QQ截图20140327131522.png", "epoch": "1425806020", "src": "/image/54fc12b54812f22a6800000b/QQ截图20140327131522.png?1425806020" }, "created_at": "2015-03-08T17:13:40.943+08:00", "douban_url": "", "id": 119, "name": "LavandaChen", "renren_url": "", "updated_at": "2015-03-08T17:13:40.943+08:00", "weibo_url": "", "weixin_name": "", "weixin_qc_code": null } ] }
GET /blog_authors/count
获取 BlogAuthor 数量
- 获取 BlogAuthor 数量
- GET /blog_authors/count
{ "count": 2 }
GET /blog_authors/#{id}
获取单个 BlogAuthor
- fields
- 以
,
拼接要指定返回的字段
- 获取单个 BlogAuthor
- GET /blog_authors/119
{ "blog_author": { "avatar": { "id": 249, "asset_id": "54fc12b54812f22a6800000b", "file_name": "QQ截图20140327131522.png", "epoch": "1425806020", "src": "/image/54fc12b54812f22a6800000b/QQ截图20140327131522.png?1425806020" }, "created_at": "2015-03-08T17:13:40.943+08:00", "douban_url": "", "id": 119, "name": "LavandaChen", "renren_url": "", "updated_at": "2016-01-07T02:45:03.291+08:00", "weibo_url": "", "weixin_name": "Lavanda_chan", "weixin_qc_code": { "id": 1177, "asset_id": "568d60ac5492c10f6400000a", "file_name": "web_header.jpeg", "epoch": "1452105903", "src": "/image/568d60ac5492c10f6400000a/web_header.jpeg?1452105903" } } }
POST /blog_authors
创建 BlogAuthor
- 创建 BlogAuthor
- POST /blog_authors
{ "blog_author": { "douban_url": "", "name": "test_1", "renren_url": "", "weibo_url": "", "weixin_name": "", "weixin_qc_code": { "file_name": "test1.jpg", "attachment": "data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=" }, "avatar": { "file_name": "test.jpg", "attachment": "data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=" } } }
{ "blog_author": { "avatar": { "id": 562, "asset_id": "568e39966387e48028000007", "file_name": "test.jpg", "epoch": "1452161430", "src": "/image/568e39966387e48028000007/test.jpg?1452161430" }, "created_at": "2016-01-07T18:10:30.817+08:00", "douban_url": "", "id": 210, "name": "test_1", "renren_url": "", "updated_at": "2016-01-07T18:10:30.817+08:00", "weibo_url": "", "weixin_name": "", "weixin_qc_code": { "id": 563, "asset_id": "568e39966387e4802800000a", "file_name": "test1.jpg", "epoch": "1452161431", "src": "/image/568e39966387e4802800000a/test1.jpg?1452161431" } } }
PUT /blog_authors/#{id}
更新 BlogAuthor
- 更新 BlogAuthor 的标题
- PUT /blog_authors/3009
{ "blog_author": { "douban_url": "", "name": "test111", "renren_url": "", "weibo_url": "", "weixin_name": "test" } }
{ "blog_author": { "avatar": { "id": 561, "asset_id": "568e364c6387e47f47000002", "file_name": "test.jpg", "epoch": "1452160589", "src": "/image/568e364c6387e47f47000002/test.jpg?1452160589" }, "created_at": "2016-01-07T17:56:28.981+08:00", "douban_url": "", "id": 209, "name": "test111", "renren_url": "", "updated_at": "2016-01-07T18:11:08.302+08:00", "weibo_url": "", "weixin_name": "test", "weixin_qc_code": { } } }
PUT /blog_authors/#{id}/upload_avatar
更新 BlogAuthor 的头像
- 更新 BlogAuthor 的头像
- PUT /blog_authors/119/upload_avatar
{ "avatar": { "file_name": "test12.jpg", "attachment": "data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=" } }
{ "avatar": { "id": 561, "asset_id": "568e364c6387e47f47000002", "file_name": "test12.jpg", "epoch": "1452161793", "src": "/image/568e364c6387e47f47000002/test12.jpg?1452161793" }
PUT /blog_authors/#{id}/upload_weixin_qc_code
更新 BlogAuthor 的微信二维码
- 更新 BlogAuthor 的头像
- PUT /blog_authors/119/upload_weixin_qc_code
{ "weixin_qc_code": { "file_name": "test12.jpg", "attachment": "data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs=" } }
{ "weixin_qc_code": { "id": 564, "asset_id": "568e3cc16387e48184000003", "file_name": "test33.jpg", "epoch": "1452162283", "src": "/image/568e3cc16387e48184000003/test33.jpg?1452162283" } }
DELETE /blog_authors/#{id}
删除 BlogAuthor
- 删除 BlogAuthor
- DELETE /blog_authors/119
{}