> For the complete documentation index, see [llms.txt](https://siriusnetdocs.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://siriusnetdocs.gitbook.io/doc/sdks-and-apis/games/sdk-documentation/api-reference.md).

# API Reference

### Class: `SiriusnetSDK`

This is the main class that you'll interact with when using the SDK. It provides methods for recording and retrieving battle records.

#### `__init__(self, api_key: str) -> None`

This is the constructor for the `SiriusnetSDK` class. It takes one parameter:

* `api_key` (str): Your API key for the Siriusnet Blockchain.

#### `record_battle(self, player_id: str, game_id: str, result: str) -> dict`

This method records a battle result for a player in a specific game. It takes three parameters:

* `player_id` (str): The ID of the player.
* `game_id` (str): The ID of the game.
* `result` (str): The result of the battle. This should be either 'win' or 'lose'.

The method returns a dictionary with information about the recorded battle.

#### `get_player_battles(self, player_id: str) -> list`

This method retrieves all the battle records for a specific player. It takes one parameter:

* `player_id` (str): The ID of the player.

The method returns a list of dictionaries, each representing a battle record.
