Files
board-mate/rpi/api-resources/board_mate_client/docs/DefaultApi.md
2025-12-27 17:45:08 +01:00

5.7 KiB

openapi_client.DefaultApi

All URIs are relative to https://boardmate_api

Method HTTP request Description
add_move POST /moves/add/{gameId} POST moves/add/{gameId}
create_party POST /create POST create
retrieve_games GET /games/{id} GET games/{id}

add_move

ResponseBodyString add_move(game_id, move_dto)

POST moves/add/{gameId}

Example

import board_mate_client
from board_mate_client.models.move_dto import MoveDto
from board_mate_client.models.response_body_string import ResponseBodyString
from board_mate_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://boardmate_api
# See configuration.py for a list of all supported configuration parameters.
configuration = board_mate_client.Configuration(
    host="https://boardmate_api"
)

# Enter a context with an instance of the API client
with board_mate_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = board_mate_client.DefaultApi(api_client)
    game_id = 'game_id_example'  # str | 
    move_dto = board_mate_client.MoveDto()  # MoveDto | 

    try:
        # POST moves/add/{gameId}
        api_response = api_instance.add_move(game_id, move_dto)
        print("The response of DefaultApi->add_move:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->add_move: %s\n" % e)

Parameters

Name Type Description Notes
game_id str
move_dto MoveDto

Return type

ResponseBodyString

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

create_party

ResponseBodyString create_party(game_dto)

POST create

Example

import board_mate_client
from board_mate_client.models.game_dto import GameDto
from board_mate_client.models.response_body_string import ResponseBodyString
from board_mate_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://boardmate_api
# See configuration.py for a list of all supported configuration parameters.
configuration = board_mate_client.Configuration(
    host="https://boardmate_api"
)

# Enter a context with an instance of the API client
with board_mate_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = board_mate_client.DefaultApi(api_client)
    game_dto = board_mate_client.GameDto()  # GameDto | 

    try:
        # POST create
        api_response = api_instance.create_party(game_dto)
        print("The response of DefaultApi->create_party:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->create_party: %s\n" % e)

Parameters

Name Type Description Notes
game_dto GameDto

Return type

ResponseBodyString

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

retrieve_games

ResponseBodyGameDto retrieve_games(id)

GET games/{id}

Example

import board_mate_client
from board_mate_client.models.response_body_game_dto import ResponseBodyGameDto
from board_mate_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://boardmate_api
# See configuration.py for a list of all supported configuration parameters.
configuration = board_mate_client.Configuration(
    host="https://boardmate_api"
)

# Enter a context with an instance of the API client
with board_mate_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = board_mate_client.DefaultApi(api_client)
    id = 'id_example'  # str | 

    try:
        # GET games/{id}
        api_response = api_instance.retrieve_games(id)
        print("The response of DefaultApi->retrieve_games:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->retrieve_games: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

ResponseBodyGameDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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