# record\_battle method

## Method: `record_battle`

The `record_battle` method is a part of the `SiriusnetSDK` class and is used to record a battle result for a player in a specific game on the Siriusnet Blockchain.

### Signature

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

### Parameters

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

### Returns

A dictionary with information about the recorded battle. The exact structure of this dictionary depends on the Siriusnet Blockchain API, but it typically includes information such as the player ID, game ID, result, and timestamp of the battle.

### Example

```python
sdk = SiriusnetSDK(api_key='your_api_key')
battle_info = sdk.record_battle('player123', 'game456', 'win')
print(battle_info)
```

In this example, we're recording a win for the player with ID 'player123' in the game with ID 'game456'. The `record_battle` method returns a dictionary with information about the recorded battle, which we then print.


---

# 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/record_battle-method.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.
