90 lines
5.1 KiB
Markdown
90 lines
5.1 KiB
Markdown
# Rust API client for gamenight-api-client-rs
|
|
|
|
Api specification for a Gamenight server
|
|
|
|
For more information, please visit [https://brentj.es](https://brentj.es)
|
|
|
|
## Overview
|
|
|
|
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
|
|
|
- API version: 1.0
|
|
- Package version: 0.1.0
|
|
- Generator version: 7.18.0
|
|
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
|
|
|
|
## Installation
|
|
|
|
Put the package under your project folder in a directory named `gamenight-api-client-rs` and add the following to `Cargo.toml` under `[dependencies]`:
|
|
|
|
```
|
|
gamenight-api-client-rs = { path = "./gamenight-api-client-rs" }
|
|
```
|
|
|
|
## Documentation for API Endpoints
|
|
|
|
All URIs are relative to *http://localhost:8080*
|
|
|
|
Class | Method | HTTP request | Description
|
|
------------ | ------------- | ------------- | -------------
|
|
*DefaultApi* | [**game_game_id_delete**](docs/DefaultApi.md#game_game_id_delete) | **DELETE** /game/{gameId} | Delete this game.
|
|
*DefaultApi* | [**game_game_id_get**](docs/DefaultApi.md#game_game_id_get) | **GET** /game/{gameId} | Get this specific game
|
|
*DefaultApi* | [**game_game_id_owner_user_id_delete**](docs/DefaultApi.md#game_game_id_owner_user_id_delete) | **DELETE** /game/{gameId}/owner/{userId} | Own this game
|
|
*DefaultApi* | [**game_game_id_owners_post**](docs/DefaultApi.md#game_game_id_owners_post) | **POST** /game/{gameId}/owners | Own this game
|
|
*DefaultApi* | [**game_game_id_put**](docs/DefaultApi.md#game_game_id_put) | **PUT** /game/{gameId} | Changes this game resource
|
|
*DefaultApi* | [**gamenight_gamenight_id_participant_user_id_delete**](docs/DefaultApi.md#gamenight_gamenight_id_participant_user_id_delete) | **DELETE** /gamenight/{gamenightId}/participant/{userId} |
|
|
*DefaultApi* | [**gamenight_gamenight_id_participants_get**](docs/DefaultApi.md#gamenight_gamenight_id_participants_get) | **GET** /gamenight/{gamenightId}/participants | Get all participants for a gamenight
|
|
*DefaultApi* | [**gamenight_gamenight_id_participants_post**](docs/DefaultApi.md#gamenight_gamenight_id_participants_post) | **POST** /gamenight/{gamenightId}/participants | Add a participant
|
|
*DefaultApi* | [**games_get**](docs/DefaultApi.md#games_get) | **GET** /games |
|
|
*DefaultApi* | [**games_post**](docs/DefaultApi.md#games_post) | **POST** /games |
|
|
*DefaultApi* | [**get_gamenight**](docs/DefaultApi.md#get_gamenight) | **GET** /gamenight |
|
|
*DefaultApi* | [**get_gamenights**](docs/DefaultApi.md#get_gamenights) | **GET** /gamenights | Get a all gamenights
|
|
*DefaultApi* | [**location_location_id_authorized_users_get**](docs/DefaultApi.md#location_location_id_authorized_users_get) | **GET** /location/{locationId}/authorized_users/ | gets this locations authorized users
|
|
*DefaultApi* | [**location_location_id_authorized_users_post**](docs/DefaultApi.md#location_location_id_authorized_users_post) | **POST** /location/{locationId}/authorized_users/ | Authorize a user
|
|
*DefaultApi* | [**location_location_id_authorized_users_user_id_delete**](docs/DefaultApi.md#location_location_id_authorized_users_user_id_delete) | **DELETE** /location/{locationId}/authorized_users/{userId} |
|
|
*DefaultApi* | [**location_location_id_get**](docs/DefaultApi.md#location_location_id_get) | **GET** /location/{locationId} | gets this location
|
|
*DefaultApi* | [**locations_get**](docs/DefaultApi.md#locations_get) | **GET** /locations |
|
|
*DefaultApi* | [**locations_post**](docs/DefaultApi.md#locations_post) | **POST** /locations |
|
|
*DefaultApi* | [**post_gamenight**](docs/DefaultApi.md#post_gamenight) | **POST** /gamenights |
|
|
*DefaultApi* | [**post_refresh_tokenz**](docs/DefaultApi.md#post_refresh_tokenz) | **POST** /refresh_token | Refresh a user token
|
|
*DefaultApi* | [**post_token**](docs/DefaultApi.md#post_token) | **POST** /token | Login a user.
|
|
*DefaultApi* | [**post_user**](docs/DefaultApi.md#post_user) | **POST** /users | Registers a user into gamenight.
|
|
*DefaultApi* | [**user_user_id_get**](docs/DefaultApi.md#user_user_id_get) | **GET** /user/{userId} |
|
|
*DefaultApi* | [**user_user_id_owned_games_get**](docs/DefaultApi.md#user_user_id_owned_games_get) | **GET** /user/{userId}/owned_games | Get owned games of user
|
|
*DefaultApi* | [**users_get**](docs/DefaultApi.md#users_get) | **GET** /users |
|
|
|
|
|
|
## Documentation For Models
|
|
|
|
- [AddGameRequestBody](docs/AddGameRequestBody.md)
|
|
- [AddGamenightRequestBody](docs/AddGamenightRequestBody.md)
|
|
- [AddLocationRequestBody](docs/AddLocationRequestBody.md)
|
|
- [EditGameRequestBody](docs/EditGameRequestBody.md)
|
|
- [Failure](docs/Failure.md)
|
|
- [Game](docs/Game.md)
|
|
- [GameId](docs/GameId.md)
|
|
- [Gamenight](docs/Gamenight.md)
|
|
- [GamenightId](docs/GamenightId.md)
|
|
- [Location](docs/Location.md)
|
|
- [LocationId](docs/LocationId.md)
|
|
- [Login](docs/Login.md)
|
|
- [OwnGame](docs/OwnGame.md)
|
|
- [OwnedGame](docs/OwnedGame.md)
|
|
- [Participants](docs/Participants.md)
|
|
- [Registration](docs/Registration.md)
|
|
- [Token](docs/Token.md)
|
|
- [User](docs/User.md)
|
|
- [UserId](docs/UserId.md)
|
|
|
|
|
|
To get access to the crate's generated documentation, use:
|
|
|
|
```
|
|
cargo doc --open
|
|
```
|
|
|
|
## Author
|
|
|
|
dennis@brentj.es
|
|
|