[关闭]
@chengxuyuan 2019-08-30T02:02:01.000000Z 字数 1638 阅读 308

代理商

橙旭园儿童编程


代理商信息

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/agents/info/ 代理商信息 YES

Requet Parameters

Name Description Required Default
username 用户名 NO

cURL Example

  1. curl -H 'Authorization: Token db4b5deed80091404ec2a295076221cf1f814b3e' http://127.0.0.1:8000/server/agents/info/?username=12345678910

Reponse Data

Name Description
name 名字
qrcode_url 二维码
hits 访问次数
order_count 购卖数量
listen_record_count 试听数量

Response

  1. {
  2. "pk":7,
  3. "name":"代理商名字",
  4. "number":"8a8256fa8528b69b.ba17f2",
  5. "hits": "30",
  6. "order_count":10,
  7. "listen_record_count":10,
  8. "qrcode_url":"https://static1.bcjiaoyu.com/agent-qrcode-4cef984978fa2dcfc29ca54f6d9ffb1e-8a8256fa8528b69b.ba17f2.png"
  9. }

增加访问次数

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
PUT /server/agents/hit/${number}/ 增加访问次数 YES

cURL Example

  1. curl -X PUT http://127.0.0.1:8000/server/agents/hit/8a8256fa8528b69b.ba17f2/

Reponse Data

Name Description
name 名字
qrcode_url 二维码
hits 访问次数
order_count 购卖数量
listen_record_count 试听数量

Response

  1. {
  2. "pk":7,
  3. "name":"代理商名字",
  4. "number":"8a8256fa8528b69b.ba17f2",
  5. "hits": 30,
  6. "order_count":10,
  7. "listen_record_count":10,
  8. "qrcode_url":"https://static1.bcjiaoyu.com/agent-qrcode-4cef984978fa2dcfc29ca54f6d9ffb1e-8a8256fa8528b69b.ba17f2.png"
  9. }

记录

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/agents/record/orders/ 定单记录 YES
GET /server/agents/record/listen/ 试听记录 YES

cURL Example

  1. curl -H 'Authorization: Token db4b5deed80091404ec2a295076221cf1f814b3e' http://127.0.0.1:8000/server/agents/record/orders/

Reponse Data

Name Description
username 用户名

Response

  1. {
  2. "count":22,
  3. "next":"/server/agents/record/orders/?page=2",
  4. "previous":null,
  5. "results":[ {
  6. "username": "12345678910"
  7. }... ]
  8. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注