Commit 0b8a4a6a authored by Lakr Aream's avatar Lakr Aream 👼🏽

Update README.md

parent f2ffe1cf
......@@ -131,15 +131,19 @@ echo $signStr;
</details>
### Root API
### API Record -- User Management
<details>
<summary>Create</summary>
#### Create User
- Requires: Root/Admin Ticket, Request Sign
- Location: ./users/c?
- Tips: none
- Parameters:
```
{
"action": "user.create", # action
"from": "root", # user name
"name": "Lakr233", # any name with a-z A-Z 0-9
"password": "base64editems==", # password could be any
"role": "admin", # admin, developer, user
......@@ -147,7 +151,7 @@ echo $signStr;
}
```
- Examples:
> http://www.candiay.backend/users/c?action=user.create&name=Lakr233&password=base64editems==&role=admin&timestamp=1585910739
> http://www.candiay.backend/users/c?action=user.create&from=root&name=Lakr233&password=base64editems==&role=admin&timestamp=1585910739
- Call Back Example
```
{
......@@ -155,3 +159,109 @@ echo $signStr;
"loginToken": "A5BF9EE4", # a token available for 1 day or none
}
```
</details>
<details>
<summary>Delete</summary>
- Requires: Root/Admin Ticket, Request Sign
- Location: ./users/c?
- Tips: User can delete itself for no reason
- Parameters:
```
{
"action": "user.delete", # action
"from": "root", # user name
"name": "Lakr233", # any name with a-z A-Z 0-9
"timestamp": 1585910739 # timestamp since 1970
}
```
- Examples:
> http://www.candiay.backend/users/c?action=user.delete&from=root&name=Lakr233&timestamp=1585910739
- Call Back Example
```
{
"result": "success", # success, fail, invaildSign
}
```
</details>
<details>
<summary>Change User Info</summary>
- Requires: Root/Admin/UserSelf Ticket, Request Sign
- Location: ./users/c?
- Tips: none
- Parameters:
```
{
"action": "user.modify.name", # .name, .password
"from": "Lakr233", # user name
"meta": "QAQ", # change to
"timestamp": 1585910739 # timestamp since 1970
}
```
- Examples:
> http://www.candiay.backend/users/c?action=user.modify.name&from=Lakr233&meta=QAQ&timestamp=1585910739
- Call Back Example
```
{
"result": "success" # success, fail, invaildSign
}
```
</details>
<details>
<summary>List User Info</summary>
- Requires: Root/Admin/Developer Ticket, Request Sign
- Location: ./users/c?
- Tips: none
- Parameters:
```
{
"action": "user.list", # action
"from": "Lakr233", # user name
"timestamp": 1585910739 # timestamp since 1970
}
```
- Examples:
> http://www.candiay.backend/users/c?action=user.list&from=Lakr233&timestamp=1585910739
- Call Back Example
```
{
"username": "userrole",
"username2": "developer",
}
```
</details>
<details>
<summary>Get User Info</summary>
- Requires: Root/Admin/Developer/Userself Ticket, Request Sign
- Location: ./users/c?
- Tips: none
- Parameters:
```
{
"action": "user.info", # action
"from": "Lakr233", # user name
"to": "Lakr233", # user to be checked
"timestamp": 1585910739 # timestamp since 1970
}
```
- Examples:
> http://www.candiay.backend/users/c?action=user.list&from=Lakr233&to=Lakr233&timestamp=1585910739
- Call Back Example
```
{
"name": "Lakr233",
"role": "admin",
"icon": "https://www.candiay.backend/users/Lakr233/icon.png",
"debs": 12
...
}
```
</details>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment