勋章
program_girl
获取勋章
勋章在 userinfo 里返回:/userinfo/whoami/ 接口
Response Data
Name |
Description |
pk |
id |
name |
勋章名字 |
record_type |
类型 |
amount |
值:大小 |
Response
{
...
"medal_record":[{
"pk":3,
"owner":"18516271364",
"name":"100竞赛勋章",
"amount":100,
"extra":"",
"record_type":"竞赛",
"create_time":"2017-11-16T21:54:20.023932"
},{
"pk":2,
"owner":"18516271364",
"name":"50竞赛勋章",
"amount":50,
"extra":"",
"record_type":"竞赛",
"create_time":"2017-11-16T21:54:20.022115"
},{
"pk":1,
"owner":"18516271364",
"name":"10竞赛勋章",
"amount":10,
"extra":"",
"record_type":"竞赛",
"create_time":"2017-11-16T21:54:20.020316"
}]
...
}
获取勋章记录
whoami 接口也会返回余额,字段名 balance
Method and URL Structure
Method |
Resource URL |
Authorization |
GET |
/program_girl/medal/record/ |
YES |
cURL Example
curl -X GET 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' http://localhost/program_girl/medal/record/
Response Data
Name |
Description |
Name |
Description |
|
|
pk |
id |
name |
勋章名字 |
record_type |
类型 |
amount |
值:大小 |
Response
{
"count":6,
"next":null,
"previous":null,
"results":[{
"pk":7,
"owner":"test_003",
"name":"1000论坛勋章",
"amount":1000,
"extra":"",
"record_type":"论坛",
"create_time":"2017-11-16T22:04:13.519482"
},{
"pk":6,
"owner":"test_003",
"name":"500论坛勋章",
"amount":500,
"extra":"",
"record_type":"论坛",
"create_time":"2017-11-16T22:04:13.517715"
},{
"pk":5,
"owner":"test_003",
"name":"100论坛勋章",
"amount":100,
"extra":"",
"record_type":"论坛",
"create_time":"2017-11-16T22:04:13.515933"
},{
"pk":4,
"owner":"test_003",
"name":"50论坛勋章",
"amount":50,
"extra":"",
"record_type":"论坛",
"create_time":"2017-11-16T22:04:13.514119"
},{
"pk":3,
"owner":"test_003",
"name":"10论坛勋章",
"amount":10,
"extra":"",
"record_type":"论坛",
"create_time":"2017-11-16T22:04:13.512412"
},{
"pk":2,
"owner":"test_003",
"name":"1论坛勋章",
"amount":1,
"extra":"",
"record_type":"论坛",
"create_time":"2017-11-16T22:04:13.510653"
}]
}