Update API docs
parent
7fa849edf9
commit
a9dd8088de
|
@ -5,7 +5,7 @@ Send it the unhashed username and pin, and it'll store it in the `users.json` fi
|
||||||
|
|
||||||
## API Documentation
|
## API Documentation
|
||||||
|
|
||||||
`POST /api/register/<name>/<pin>` Register the username with the pin provided if it doesn't already exist
|
`POST /api/register/<name>/<pin>/<pronouns>` Register the username with the pin provided if it doesn't already exist
|
||||||
|
|
||||||
`GET /api/users/<name>` Check if the user exists
|
`GET /api/users/<name>` Check if the user exists
|
||||||
|
|
||||||
|
@ -13,6 +13,10 @@ Send it the unhashed username and pin, and it'll store it in the `users.json` fi
|
||||||
|
|
||||||
`POST /api/users/change/<name>/<pin>/<new-name>/<new-pin>` Change a users pin/name
|
`POST /api/users/change/<name>/<pin>/<new-name>/<new-pin>` Change a users pin/name
|
||||||
|
|
||||||
|
`GET /api/about/name/<name>` Get's the name of a user, probably just for checking if they exist
|
||||||
|
|
||||||
|
`GET /api/about/pronouns/<name>` Get's the pronouns of a user
|
||||||
|
|
||||||
## Chat Planning
|
## Chat Planning
|
||||||
|
|
||||||
Clientside js will register & check login of users, if login is correct will ask for a random token.
|
Clientside js will register & check login of users, if login is correct will ask for a random token.
|
||||||
|
|
|
@ -8,13 +8,17 @@ use serde_json::Result;
|
||||||
pub fn index() -> &'static str {
|
pub fn index() -> &'static str {
|
||||||
"API Info:
|
"API Info:
|
||||||
|
|
||||||
`POST /api/register/<name>/<pin>` Register the username with the pin provided if it doesn't already exist
|
`POST /api/register/<name>/<pin>/<pronouns>` Register the username with the pin provided if it doesn't already exist
|
||||||
|
|
||||||
`GET /api/users/<name>` Check if the user exists
|
`GET /api/users/<name>` Check if the user exists
|
||||||
|
|
||||||
`GET /api/users/<name>/<pin>` Check if the user exists, and if the pin provided matches
|
`GET /api/users/<name>/<pin>` Check if the user exists, and if the pin provided matches
|
||||||
|
|
||||||
`POST /api/users/change/<name>/<pin>/<new-name>/<new-pin>` Change a users name and/or pin"
|
`POST /api/users/change/<name>/<pin>/<new-name>/<new-pin>` Change a users name and/or pin
|
||||||
|
|
||||||
|
`GET /api/about/name/<name>` Get the name of a user
|
||||||
|
|
||||||
|
`GET /api/about/pronouns/<name>` Get the pronouns of a user"
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// The output is wrapped in a Result to allow matching on errors
|
// The output is wrapped in a Result to allow matching on errors
|
||||||
|
|
Loading…
Reference in New Issue