娃娃机
program_girl
新抽奖接口
Method and URL Structure
| Method |
MethodResource URL |
Descriptions |
Authentications Required |
| PUT |
/program_girl/lottery/prize_random/ |
YES |
|
| Name |
Description |
Required |
Default |
| Authorization |
Token db02586eda69b432699b2f9031e02e8f5deda8db |
YES |
|
cURL Example
curl -X PUT -H 'Authorization: Token db02586eda69b432699b2f9031e02e8f5deda8db' http://127.0.0.1:8000/program_girl/lottery/prize_random/
Prize Description
| Name |
Description |
| pool_name |
奖池 |
| taken_status |
是否中奖 |
| taken_token |
获奖 token |
JSON Response
{ "status": 0, "message": "", "prize_list":[{ "take_token":"de9iqpkd8h8ywltd", "taken_status":true, "pool_name":"A" },{ "take_token":"5vs6x6aiu8kx9u4q", "taken_status":true, "pool_name":"B" },{ "take_token":"q9u3ounoxm8jkx2t", "taken_status":true, "pool_name":"C" },{ "take_token":"hafkzu1t2y1sf8iw", "taken_status":true, "pool_name":"D" }]}
获取奖品
Method and URL Structure
| Method |
MethodResource URL |
Descriptions |
Authentications Required |
| PUT |
/program_girl/lottery/prize_take/ |
|
YES |
| Name |
Description |
Required |
Default |
| Authorization |
Token db02586eda69b432699b2f9031e02e8f5deda8db |
YES |
|
Request Data
{ "take_token" :"7598iwr8j5jrtodl"}
cURL Example
curl -X PUT -H 'Authorization: Token db02586eda69b432699b2f9031e02e8f5deda8db' --data {...} http://127.0.0.1:8000/program_girl/lottery/prize_take/
JSON Response
{ "status": 0, "message": "", "taken_status":true, "name":"150钻石", "prize_type":2, "take_token":"kmpl836g6o59wi2r", "image_url":"http://example.com/0.png", "desc":"150钻石"}
获取奖品记录
Method and URL Structure
| Method |
Resource URL |
Authorization |
| GET |
/program_girl/lottery/prize_list/ |
YES |
cURL Example
curl -X GET -H 'Authorization: Token db02586eda69b432699b2f9031e02e8f5deda8db' http://localhost/program_girl/lottery/prize_list/
Response Data
| Name |
Description |
| name |
名称 |
| desc |
描述 |
| image_url |
图片地址 |
| taken_time |
获奖时间 |
| done |
完成处理 |
Response
{ "count":1, "next":null, "previous":null, "results":[{ "name":"200钻石", "desc":"200钻石", "image_url":"https://static1.bcjiaoyu.com//cxy/app/diamond.png", "taken_time":"2017-11-13T17:14:23.035504", "done":true }]}