Files
gamenight/gamenight-api-client-rs/docs/DefaultApi.md

20 KiB

\DefaultApi

All URIs are relative to http://localhost:8080

Method HTTP request Description
game_game_id_delete DELETE /game/{gameId} Delete this game.
game_game_id_get GET /game/{gameId} Get this specific game
game_game_id_owner_user_id_delete DELETE /game/{gameId}/owner/{userId} Own this game
game_game_id_owners_post POST /game/{gameId}/owners Own this game
game_game_id_put PUT /game/{gameId} Changes this game resource
gamenight_gamenight_id_participant_user_id_delete DELETE /gamenight/{gamenightId}/participant/{userId}
gamenight_gamenight_id_participants_get GET /gamenight/{gamenightId}/participants Get all participants for a gamenight
gamenight_gamenight_id_participants_post POST /gamenight/{gamenightId}/participants Add a participant
games_get GET /games
games_post POST /games
get_gamenight GET /gamenight
get_gamenights GET /gamenights Get a all gamenights
location_location_id_authorized_users_get GET /location/{locationId}/authorized_users/ gets this locations authorized users
location_location_id_authorized_users_post POST /location/{locationId}/authorized_users/ Authorize a user
location_location_id_authorized_users_user_id_delete DELETE /location/{locationId}/authorized_users/{userId}
location_location_id_get GET /location/{locationId} gets this location
locations_get GET /locations
locations_post POST /locations
post_gamenight POST /gamenights
post_refresh_tokenz POST /refresh_token Refresh a user token
post_token POST /token Login a user.
post_user POST /users Registers a user into gamenight.
user_user_id_get GET /user/{userId}
user_user_id_owned_games_get GET /user/{userId}/owned_games Get owned games of user
users_get GET /users

game_game_id_delete

game_game_id_delete(game_id, game_id2) Delete this game.

Parameters

Name Type Description Required Notes
game_id String Uuid of game to delete. [required]
game_id2 Option<GameId>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

game_game_id_get

models::Game game_game_id_get(game_id) Get this specific game

Parameters

Name Type Description Required Notes
game_id String Uuid of game to get. [required]

Return type

models::Game

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

game_game_id_owner_user_id_delete

game_game_id_owner_user_id_delete(game_id, user_id) Own this game

Parameters

Name Type Description Required Notes
game_id String Uuid of game that user no longer owns. [required]
user_id String Uuid of user that no longer owns. [required]

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

game_game_id_owners_post

game_game_id_owners_post(game_id, own_game) Own this game

Parameters

Name Type Description Required Notes
game_id String Uuid of game to own. [required]
own_game Option<OwnGame>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

game_game_id_put

game_game_id_put(game_id, edit_game_request_body) Changes this game resource

Parameters

Name Type Description Required Notes
game_id String Uuid of game to change. [required]
edit_game_request_body Option<EditGameRequestBody>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

gamenight_gamenight_id_participant_user_id_delete

gamenight_gamenight_id_participant_user_id_delete(gamenight_id, user_id, gamenight_id2)

Parameters

Name Type Description Required Notes
gamenight_id String Uuid of gamenight to delete participant for [required]
user_id String Uuid of the of the participant to remove [required]
gamenight_id2 Option<GamenightId>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

gamenight_gamenight_id_participants_get

models::Participants gamenight_gamenight_id_participants_get(gamenight_id, gamenight_id2) Get all participants for a gamenight

Retrieve the participants of a single gamenight by id.

Parameters

Name Type Description Required Notes
gamenight_id String Uuid of gamenight to get participants for. [required]
gamenight_id2 Option<GamenightId>

Return type

models::Participants

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

gamenight_gamenight_id_participants_post

gamenight_gamenight_id_participants_post(gamenight_id, user_id) Add a participant

Parameters

Name Type Description Required Notes
gamenight_id String Uuid of gamenight to add participants for. [required]
user_id Option<UserId>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

games_get

Vecmodels::Game games_get()

Parameters

This endpoint does not need any parameter.

Return type

Vecmodels::Game

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

games_post

models::GameId games_post(add_game_request_body)

Parameters

Name Type Description Required Notes
add_game_request_body Option<AddGameRequestBody>

Return type

models::GameId

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_gamenight

models::Gamenight get_gamenight()

Parameters

This endpoint does not need any parameter.

Return type

models::Gamenight

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_gamenights

Vecmodels::Gamenight get_gamenights() Get a all gamenights

Retrieve the list of gamenights on this gamenight server. Requires authorization.

Parameters

This endpoint does not need any parameter.

Return type

Vecmodels::Gamenight

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

location_location_id_authorized_users_get

Vecmodels::UserId location_location_id_authorized_users_get(location_id) gets this locations authorized users

Parameters

Name Type Description Required Notes
location_id String Uuid of location to get authorized users for. [required]

Return type

Vecmodels::UserId

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

location_location_id_authorized_users_post

location_location_id_authorized_users_post(location_id, user_id) Authorize a user

Parameters

Name Type Description Required Notes
location_id String Uuid location to authorize for. [required]
user_id Option<UserId>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

location_location_id_authorized_users_user_id_delete

location_location_id_authorized_users_user_id_delete(location_id, user_id)

Parameters

Name Type Description Required Notes
location_id String Uuid of location to deauthorize for. [required]
user_id String Uuid of user ot deauthorize. [required]

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

location_location_id_get

models::Location location_location_id_get(location_id) gets this location

Parameters

Name Type Description Required Notes
location_id String Uuid of location to get. [required]

Return type

models::Location

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

locations_get

Vecmodels::Location locations_get()

Parameters

This endpoint does not need any parameter.

Return type

Vecmodels::Location

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

locations_post

models::LocationId locations_post(add_location_request_body)

Parameters

Name Type Description Required Notes
add_location_request_body Option<AddLocationRequestBody>

Return type

models::LocationId

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

post_gamenight

post_gamenight(add_gamenight_request_body)

Add a gamenight by providing a name and a date, only available when providing an JWT token.

Parameters

Name Type Description Required Notes
add_gamenight_request_body Option<AddGamenightRequestBody>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

post_refresh_tokenz

models::Token post_refresh_tokenz() Refresh a user token

Refresh your JWT-token without logging in again.

Parameters

This endpoint does not need any parameter.

Return type

models::Token

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

post_token

models::Token post_token(login) Login a user.

Submit your credentials to get a JWT-token to use with the rest of the api.

Parameters

Name Type Description Required Notes
login Option<Login>

Return type

models::Token

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

post_user

post_user(registration) Registers a user into gamenight.

Create a new user given a registration token and user information, username and email must be unique, and password and password_repeat must match.

Parameters

Name Type Description Required Notes
registration Option<Registration>

Return type

(empty response body)

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

user_user_id_get

models::User user_user_id_get(user_id)

Get a user from primary id

Parameters

Name Type Description Required Notes
user_id String Uuid of user to get [required]

Return type

models::User

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

user_user_id_owned_games_get

Vecmodels::OwnedGame user_user_id_owned_games_get(user_id) Get owned games of user

Parameters

Name Type Description Required Notes
user_id String Uuid of user to get owned games for. [required]

Return type

Vecmodels::OwnedGame

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

users_get

Vecmodels::User users_get()

Parameters

This endpoint does not need any parameter.

Return type

Vecmodels::User

Authorization

JWT-Auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]