Files
board-mate/api-customer/api-resources/game-components/docs/GameApi.md
2026-01-01 15:37:20 +01:00

5.7 KiB

board_mate.game.GameApi

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 time
import os
import board_mate.game
from board_mate.game.models.move_dto import MoveDto
from board_mate.game.models.response_body_string import ResponseBodyString
from board_mate.game.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.game.Configuration(
    host = "https://boardmate_api"
)


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

    try:
        # POST moves/add/{gameId}
        api_response = api_instance.add_move(game_id, move_dto)
        print("The response of GameApi->add_move:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GameApi->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 time
import os
import board_mate.game
from board_mate.game.models.game_dto import GameDto
from board_mate.game.models.response_body_string import ResponseBodyString
from board_mate.game.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.game.Configuration(
    host = "https://boardmate_api"
)


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

    try:
        # POST create
        api_response = api_instance.create_party(game_dto)
        print("The response of GameApi->create_party:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GameApi->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 time
import os
import board_mate.game
from board_mate.game.models.response_body_game_dto import ResponseBodyGameDto
from board_mate.game.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.game.Configuration(
    host = "https://boardmate_api"
)


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

    try:
        # GET games/{id}
        api_response = api_instance.retrieve_games(id)
        print("The response of GameApi->retrieve_games:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GameApi->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]