# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://siriusnetdocs.gitbook.io/doc/sdks-and-apis/games/sdk-documentation/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
