-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
guoshijiang
committed
Mar 13, 2024
1 parent
a2964b3
commit 41e7ae1
Showing
6 changed files
with
186 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# 空投接口 | ||
|
||
## 1. 获取邀请码 | ||
|
||
接口请求 | ||
``` | ||
curl --location 'http://127.0.0.1:8000/api/get_invite_code_by_address' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"address": "0xe3b4ECd2EC88026F84cF17fef8bABfD9184C94F0" | ||
}' | ||
``` | ||
返回值 | ||
|
||
``` | ||
{ | ||
"ok": true, | ||
"code": 200, | ||
"result": { | ||
"invite_code": "0000-0000-0000" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## 2. 提交邀请信息 | ||
|
||
接口请求 | ||
``` | ||
curl --location 'http://127.0.0.1:8000/api/submit_invite_info' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"invite_code": "0000-0000-0000", | ||
"address": "0xe3b4ECd2EC88026F84cF17fef8bABfD9184C94F1" | ||
}' | ||
``` | ||
返回值 | ||
|
||
``` | ||
{ | ||
"ok": true, | ||
"code": 200, | ||
"result": {} | ||
} | ||
``` | ||
|
||
|
||
## 3. 获取个人信息和积分 | ||
|
||
接口请求 | ||
``` | ||
curl --location 'http://127.0.0.1:8000/api/get_points_by_address' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"address": "0xe3b4ECd2EC88026F84cF17fef8bABfD9184C94F1" | ||
}' | ||
``` | ||
返回值 | ||
|
||
``` | ||
{ | ||
"ok": true, | ||
"code": 200, | ||
"result": { | ||
"id": 5, | ||
"name": "unknown", | ||
"photo": "", | ||
"address": "0xe3b4ECd2EC88026F84cF17fef8bABfD9184C94F1", | ||
"email": null, | ||
"points": 0, | ||
"x_twitter": "", | ||
"discord": "", | ||
"telegram": "", | ||
"info": "" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## 4. 根据地址获取积分记录 | ||
|
||
接口请求 | ||
``` | ||
curl --location 'http://127.0.0.1:8000/api/get_points_record_by_address' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"address": "0xe3b4ECd2EC88026F84cF17fef8bABfD9184C94F0" | ||
}' | ||
``` | ||
返回值 | ||
|
||
``` | ||
{ | ||
"ok": true, | ||
"code": 200, | ||
"result": { | ||
"total": 1, | ||
"points": [ | ||
{ | ||
"id": 1, | ||
"name": "0xe3b4ECd2EC88026F84cF17fef8bABfD9184C94F0", | ||
"type": "BridgeTransfer", | ||
"points": 1 | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters