[关闭]
@fuyb1986 2016-11-24T05:13:29.000000Z 字数 1097 阅读 643

余额和余额充值

金色童年

获取余额详情

Method and URL Structure

Method Resource URL
GET /market/balance_info/

Request Paramaters

No Applicatated

cURL Example

  1. curl -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\ http://localhost/market/balance_info/

Response

  1. {
  2. "pk":19,
  3. "amount":"9.00",
  4. "created":"2016-10-31T19:03:38.727343"
  5. }

余额充值

Method and URL Structure

Method Resource URL Descrtipion
POST /market/recharge/

Request Data

Name Description Required Default
amount 金额 YES
order_type 类型 NO recharge

Request

  1. {
  2. "amount":"33.0",
  3. "order_type": "recharge",
  4. }

cURL Example

  1. curl -X POST -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\
  2. -H 'Content-Type: Application/json' --data '{....}' http://localhost/market/recharge/

Response

  1. {
  2. "pk":19,
  3. "amount":"42.00",
  4. "created":"2016-10-31T19:03:38.727343"
  5. }

充值记录

Method and URL Structure

Method Resource URL
GET /market/recharge/log/

Request Paramaters

No Applicatated

cURL Example

  1. curl -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'\ http://localhost/market/recharge/log/

Response

  1. {
  2. "count":3,
  3. "next":null,
  4. "previous":null,
  5. "results":[{
  6. "pk":3,
  7. "amount":"99.90",
  8. "created":"2016-11-01T12:15:03.042222",
  9. "extra":"rechare blance"
  10. },..]
  11. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注