diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index dff56d8..bc06b9e 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -11,7 +11,6 @@ docs/CreatorPartialDtoPaginationDto.md
docs/CreatorRarityDto.md
docs/CreatorShareDto.md
docs/CreatorTransactionDto.md
-docs/CreatorsApi.md
docs/DiscordTokenDto.md
docs/LinkDiscordTwitchDto.md
docs/LootBoxDto.md
@@ -25,15 +24,13 @@ docs/PlayerPartialDto.md
docs/PlayerShareDto.md
docs/PlayerTransactionDto.md
docs/PlayerType.md
-docs/PlayersApi.md
docs/PortfolioSnapshotDto.md
docs/Rarity.md
-docs/SessionsApi.md
docs/StreamStatusDto.md
+docs/TTXClientApi.md
docs/TimeStep.md
docs/TokenDto.md
docs/TransactionAction.md
-docs/TransactionsApi.md
docs/TwitchUserDto.md
docs/VoteDto.md
git_push.sh
@@ -43,46 +40,10 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
-test/test_create_transaction_dto.py
-test/test_creator_dto.py
-test/test_creator_order_by.py
-test/test_creator_partial_dto.py
-test/test_creator_partial_dto_pagination_dto.py
-test/test_creator_rarity_dto.py
-test/test_creator_share_dto.py
-test/test_creator_transaction_dto.py
-test/test_creators_api.py
-test/test_discord_token_dto.py
-test/test_link_discord_twitch_dto.py
-test/test_loot_box_dto.py
-test/test_loot_box_result_dto.py
-test/test_model_id.py
-test/test_order_direction.py
-test/test_player_dto.py
-test/test_player_dto_pagination_dto.py
-test/test_player_order_by.py
-test/test_player_partial_dto.py
-test/test_player_share_dto.py
-test/test_player_transaction_dto.py
-test/test_player_type.py
-test/test_players_api.py
-test/test_portfolio_snapshot_dto.py
-test/test_rarity.py
-test/test_sessions_api.py
-test/test_stream_status_dto.py
-test/test_time_step.py
-test/test_token_dto.py
-test/test_transaction_action.py
-test/test_transactions_api.py
-test/test_twitch_user_dto.py
-test/test_vote_dto.py
tox.ini
ttx/__init__.py
ttx/api/__init__.py
-ttx/api/creators_api.py
-ttx/api/players_api.py
-ttx/api/sessions_api.py
-ttx/api/transactions_api.py
+ttx/api/ttx_client_api.py
ttx/api_client.py
ttx/api_response.py
ttx/configuration.py
diff --git a/README.md b/README.md
index 08b69b3..a13fb6c 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,13 @@
-# Python API wrapper for TTX
+# ttx
-## Requirements.
+TTX API Wrapper
+
+## Requirements
Python 3.9+
## Installation & Usage
+
### pip install
If the python package is hosted on a repository, you can install directly using:
@@ -12,9 +15,11 @@ If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/ttxdev/ttx.py.git
```
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ttxdev/ttx.py.git`)
Then import the package:
+
```python
import ttx
```
@@ -26,9 +31,11 @@ Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
+
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
+
```python
import ttx
```
@@ -58,16 +65,16 @@ configuration = ttx.Configuration(
# Enter a context with an instance of the API client
with ttx.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = ttx.CreatorsApi(api_client)
+ api_instance = ttx.TTXClientApi(api_client)
username = 'username_example' # str | (optional)
ticker = 'ticker_example' # str | (optional)
try:
api_response = api_instance.create_creator(username=username, ticker=ticker)
- print("The response of CreatorsApi->create_creator:\n")
+ print("The response of TTXClientApi->create_creator:\n")
pprint(api_response)
except ApiException as e:
- print("Exception when calling CreatorsApi->create_creator: %s\n" % e)
+ print("Exception when calling TTXClientApi->create_creator: %s\n" % e)
```
@@ -77,61 +84,57 @@ All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
-*CreatorsApi* | [**create_creator**](docs/CreatorsApi.md#create_creator) | **POST** /creators |
-*CreatorsApi* | [**get_creator**](docs/CreatorsApi.md#get_creator) | **GET** /creators/{slug} |
-*CreatorsApi* | [**get_creator_transactions**](docs/CreatorsApi.md#get_creator_transactions) | **GET** /creators/{creatorSlug}/transactions |
-*CreatorsApi* | [**get_creators**](docs/CreatorsApi.md#get_creators) | **GET** /creators |
-*PlayersApi* | [**gamba**](docs/PlayersApi.md#gamba) | **PUT** /players/me/lootboxes/{lootBoxId}/open |
-*PlayersApi* | [**get_player**](docs/PlayersApi.md#get_player) | **GET** /players/{username} |
-*PlayersApi* | [**get_players**](docs/PlayersApi.md#get_players) | **GET** /players |
-*PlayersApi* | [**get_self**](docs/PlayersApi.md#get_self) | **GET** /players/me |
-*SessionsApi* | [**discord_callback**](docs/SessionsApi.md#discord_callback) | **GET** /sessions/discord/callback |
-*SessionsApi* | [**link_discord_twitch**](docs/SessionsApi.md#link_discord_twitch) | **POST** /sessions/discord/link |
-*SessionsApi* | [**twitch_callback**](docs/SessionsApi.md#twitch_callback) | **GET** /sessions/twitch/callback |
-*TransactionsApi* | [**place_order**](docs/TransactionsApi.md#place_order) | **POST** /transactions |
-
+*TTXClientApi* | [**create_creator**](docs/TTXClientApi.md#create_creator) | **POST** /creators |
+*TTXClientApi* | [**discord_callback**](docs/TTXClientApi.md#discord_callback) | **GET** /sessions/discord/callback |
+*TTXClientApi* | [**gamba**](docs/TTXClientApi.md#gamba) | **PUT** /players/me/lootboxes/{lootBoxId}/open |
+*TTXClientApi* | [**get_creator**](docs/TTXClientApi.md#get_creator) | **GET** /creators/{slug} |
+*TTXClientApi* | [**get_creator_transactions**](docs/TTXClientApi.md#get_creator_transactions) | **GET** /creators/{creatorSlug}/transactions |
+*TTXClientApi* | [**get_creators**](docs/TTXClientApi.md#get_creators) | **GET** /creators |
+*TTXClientApi* | [**get_player**](docs/TTXClientApi.md#get_player) | **GET** /players/{username} |
+*TTXClientApi* | [**get_players**](docs/TTXClientApi.md#get_players) | **GET** /players |
+*TTXClientApi* | [**get_self**](docs/TTXClientApi.md#get_self) | **GET** /players/me |
+*TTXClientApi* | [**link_discord_twitch**](docs/TTXClientApi.md#link_discord_twitch) | **POST** /sessions/discord/link |
+*TTXClientApi* | [**place_order**](docs/TTXClientApi.md#place_order) | **POST** /transactions |
+*TTXClientApi* | [**twitch_callback**](docs/TTXClientApi.md#twitch_callback) | **GET** /sessions/twitch/callback |
## Documentation For Models
- - [CreateTransactionDto](docs/CreateTransactionDto.md)
- - [CreatorDto](docs/CreatorDto.md)
- - [CreatorOrderBy](docs/CreatorOrderBy.md)
- - [CreatorPartialDto](docs/CreatorPartialDto.md)
- - [CreatorPartialDtoPaginationDto](docs/CreatorPartialDtoPaginationDto.md)
- - [CreatorRarityDto](docs/CreatorRarityDto.md)
- - [CreatorShareDto](docs/CreatorShareDto.md)
- - [CreatorTransactionDto](docs/CreatorTransactionDto.md)
- - [DiscordTokenDto](docs/DiscordTokenDto.md)
- - [LinkDiscordTwitchDto](docs/LinkDiscordTwitchDto.md)
- - [LootBoxDto](docs/LootBoxDto.md)
- - [LootBoxResultDto](docs/LootBoxResultDto.md)
- - [ModelId](docs/ModelId.md)
- - [OrderDirection](docs/OrderDirection.md)
- - [PlayerDto](docs/PlayerDto.md)
- - [PlayerDtoPaginationDto](docs/PlayerDtoPaginationDto.md)
- - [PlayerOrderBy](docs/PlayerOrderBy.md)
- - [PlayerPartialDto](docs/PlayerPartialDto.md)
- - [PlayerShareDto](docs/PlayerShareDto.md)
- - [PlayerTransactionDto](docs/PlayerTransactionDto.md)
- - [PlayerType](docs/PlayerType.md)
- - [PortfolioSnapshotDto](docs/PortfolioSnapshotDto.md)
- - [Rarity](docs/Rarity.md)
- - [StreamStatusDto](docs/StreamStatusDto.md)
- - [TimeStep](docs/TimeStep.md)
- - [TokenDto](docs/TokenDto.md)
- - [TransactionAction](docs/TransactionAction.md)
- - [TwitchUserDto](docs/TwitchUserDto.md)
- - [VoteDto](docs/VoteDto.md)
-
+- [CreateTransactionDto](docs/CreateTransactionDto.md)
+- [CreatorDto](docs/CreatorDto.md)
+- [CreatorOrderBy](docs/CreatorOrderBy.md)
+- [CreatorPartialDto](docs/CreatorPartialDto.md)
+- [CreatorPartialDtoPaginationDto](docs/CreatorPartialDtoPaginationDto.md)
+- [CreatorRarityDto](docs/CreatorRarityDto.md)
+- [CreatorShareDto](docs/CreatorShareDto.md)
+- [CreatorTransactionDto](docs/CreatorTransactionDto.md)
+- [DiscordTokenDto](docs/DiscordTokenDto.md)
+- [LinkDiscordTwitchDto](docs/LinkDiscordTwitchDto.md)
+- [LootBoxDto](docs/LootBoxDto.md)
+- [LootBoxResultDto](docs/LootBoxResultDto.md)
+- [ModelId](docs/ModelId.md)
+- [OrderDirection](docs/OrderDirection.md)
+- [PlayerDto](docs/PlayerDto.md)
+- [PlayerDtoPaginationDto](docs/PlayerDtoPaginationDto.md)
+- [PlayerOrderBy](docs/PlayerOrderBy.md)
+- [PlayerPartialDto](docs/PlayerPartialDto.md)
+- [PlayerShareDto](docs/PlayerShareDto.md)
+- [PlayerTransactionDto](docs/PlayerTransactionDto.md)
+- [PlayerType](docs/PlayerType.md)
+- [PortfolioSnapshotDto](docs/PortfolioSnapshotDto.md)
+- [Rarity](docs/Rarity.md)
+- [StreamStatusDto](docs/StreamStatusDto.md)
+- [TimeStep](docs/TimeStep.md)
+- [TokenDto](docs/TokenDto.md)
+- [TransactionAction](docs/TransactionAction.md)
+- [TwitchUserDto](docs/TwitchUserDto.md)
+- [VoteDto](docs/VoteDto.md)
+
## Documentation For Authorization
Endpoints do not require authorization.
-
## Author
-
-
-
+[NathanRoberts55](https://github.com/nathanroberts55)
\ No newline at end of file
diff --git a/config.yml b/config.yml
new file mode 100644
index 0000000..f2e9fa9
--- /dev/null
+++ b/config.yml
@@ -0,0 +1,12 @@
+generatorName: python
+inputSpec: https://api.ttx.gg/swagger/v1/swagger.json
+outputDir: .
+packageName: ttx
+packageVersion: 1.0.0
+projectName: ttx
+packageUrl: https://github.com/ttxdev/ttx.py
+gitHost: github.com
+gitUserId: ttxdev
+gitRepoId: ttx.py
+openapiNormalizer:
+ SET_TAGS_FOR_ALL_OPERATIONS: TTXClient
diff --git a/docs/TTXClientApi.md b/docs/TTXClientApi.md
new file mode 100644
index 0000000..614e657
--- /dev/null
+++ b/docs/TTXClientApi.md
@@ -0,0 +1,808 @@
+# ttx.TTXClientApi
+
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_creator**](TTXClientApi.md#create_creator) | **POST** /creators |
+[**discord_callback**](TTXClientApi.md#discord_callback) | **GET** /sessions/discord/callback |
+[**gamba**](TTXClientApi.md#gamba) | **PUT** /players/me/lootboxes/{lootBoxId}/open |
+[**get_creator**](TTXClientApi.md#get_creator) | **GET** /creators/{slug} |
+[**get_creator_transactions**](TTXClientApi.md#get_creator_transactions) | **GET** /creators/{creatorSlug}/transactions |
+[**get_creators**](TTXClientApi.md#get_creators) | **GET** /creators |
+[**get_player**](TTXClientApi.md#get_player) | **GET** /players/{username} |
+[**get_players**](TTXClientApi.md#get_players) | **GET** /players |
+[**get_self**](TTXClientApi.md#get_self) | **GET** /players/me |
+[**link_discord_twitch**](TTXClientApi.md#link_discord_twitch) | **POST** /sessions/discord/link |
+[**place_order**](TTXClientApi.md#place_order) | **POST** /transactions |
+[**twitch_callback**](TTXClientApi.md#twitch_callback) | **GET** /sessions/twitch/callback |
+
+
+# **create_creator**
+> CreatorDto create_creator(username=username, ticker=ticker)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.creator_dto import CreatorDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ username = 'username_example' # str | (optional)
+ ticker = 'ticker_example' # str | (optional)
+
+ try:
+ api_response = api_instance.create_creator(username=username, ticker=ticker)
+ print("The response of TTXClientApi->create_creator:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->create_creator: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| | [optional]
+ **ticker** | **str**| | [optional]
+
+### Return type
+
+[**CreatorDto**](CreatorDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **discord_callback**
+> DiscordTokenDto discord_callback(code=code)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.discord_token_dto import DiscordTokenDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ code = 'code_example' # str | (optional)
+
+ try:
+ api_response = api_instance.discord_callback(code=code)
+ print("The response of TTXClientApi->discord_callback:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->discord_callback: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **code** | **str**| | [optional]
+
+### Return type
+
+[**DiscordTokenDto**](DiscordTokenDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **gamba**
+> LootBoxResultDto gamba(loot_box_id)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.loot_box_result_dto import LootBoxResultDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ loot_box_id = 56 # int |
+
+ try:
+ api_response = api_instance.gamba(loot_box_id)
+ print("The response of TTXClientApi->gamba:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->gamba: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **loot_box_id** | **int**| |
+
+### Return type
+
+[**LootBoxResultDto**](LootBoxResultDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_creator**
+> CreatorDto get_creator(slug, step=step, after=after)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.creator_dto import CreatorDto
+from ttx.models.time_step import TimeStep
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ slug = 'slug_example' # str |
+ step = ttx.TimeStep() # TimeStep | (optional)
+ after = '2013-10-20T19:20:30+01:00' # datetime | (optional)
+
+ try:
+ api_response = api_instance.get_creator(slug, step=step, after=after)
+ print("The response of TTXClientApi->get_creator:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->get_creator: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **slug** | **str**| |
+ **step** | [**TimeStep**](.md)| | [optional]
+ **after** | **datetime**| | [optional]
+
+### Return type
+
+[**CreatorDto**](CreatorDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_creator_transactions**
+> List[PlayerTransactionDto] get_creator_transactions(creator_slug, slug=slug)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.player_transaction_dto import PlayerTransactionDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ creator_slug = 'creator_slug_example' # str |
+ slug = 'slug_example' # str | (optional)
+
+ try:
+ api_response = api_instance.get_creator_transactions(creator_slug, slug=slug)
+ print("The response of TTXClientApi->get_creator_transactions:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->get_creator_transactions: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **creator_slug** | **str**| |
+ **slug** | **str**| | [optional]
+
+### Return type
+
+[**List[PlayerTransactionDto]**](PlayerTransactionDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_creators**
+> CreatorPartialDtoPaginationDto get_creators(page=page, limit=limit, search=search, order_by=order_by, order_dir=order_dir)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.creator_order_by import CreatorOrderBy
+from ttx.models.creator_partial_dto_pagination_dto import CreatorPartialDtoPaginationDto
+from ttx.models.order_direction import OrderDirection
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ page = 1 # int | (optional) (default to 1)
+ limit = 20 # int | (optional) (default to 20)
+ search = 'search_example' # str | (optional)
+ order_by = ttx.CreatorOrderBy() # CreatorOrderBy | (optional)
+ order_dir = ttx.OrderDirection() # OrderDirection | (optional)
+
+ try:
+ api_response = api_instance.get_creators(page=page, limit=limit, search=search, order_by=order_by, order_dir=order_dir)
+ print("The response of TTXClientApi->get_creators:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->get_creators: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **page** | **int**| | [optional] [default to 1]
+ **limit** | **int**| | [optional] [default to 20]
+ **search** | **str**| | [optional]
+ **order_by** | [**CreatorOrderBy**](.md)| | [optional]
+ **order_dir** | [**OrderDirection**](.md)| | [optional]
+
+### Return type
+
+[**CreatorPartialDtoPaginationDto**](CreatorPartialDtoPaginationDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_player**
+> PlayerDto get_player(username, step=step, after=after)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.player_dto import PlayerDto
+from ttx.models.time_step import TimeStep
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ username = 'username_example' # str |
+ step = ttx.TimeStep() # TimeStep | (optional)
+ after = '2013-10-20T19:20:30+01:00' # datetime | (optional)
+
+ try:
+ api_response = api_instance.get_player(username, step=step, after=after)
+ print("The response of TTXClientApi->get_player:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->get_player: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| |
+ **step** | [**TimeStep**](.md)| | [optional]
+ **after** | **datetime**| | [optional]
+
+### Return type
+
+[**PlayerDto**](PlayerDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_players**
+> PlayerDtoPaginationDto get_players(page=page, limit=limit, search=search, order_by=order_by, order_dir=order_dir)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.order_direction import OrderDirection
+from ttx.models.player_dto_pagination_dto import PlayerDtoPaginationDto
+from ttx.models.player_order_by import PlayerOrderBy
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ page = 1 # int | (optional) (default to 1)
+ limit = 20 # int | (optional) (default to 20)
+ search = 'search_example' # str | (optional)
+ order_by = ttx.PlayerOrderBy() # PlayerOrderBy | (optional)
+ order_dir = ttx.OrderDirection() # OrderDirection | (optional)
+
+ try:
+ api_response = api_instance.get_players(page=page, limit=limit, search=search, order_by=order_by, order_dir=order_dir)
+ print("The response of TTXClientApi->get_players:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->get_players: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **page** | **int**| | [optional] [default to 1]
+ **limit** | **int**| | [optional] [default to 20]
+ **search** | **str**| | [optional]
+ **order_by** | [**PlayerOrderBy**](.md)| | [optional]
+ **order_dir** | [**OrderDirection**](.md)| | [optional]
+
+### Return type
+
+[**PlayerDtoPaginationDto**](PlayerDtoPaginationDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_self**
+> PlayerDto get_self()
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.player_dto import PlayerDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+
+ try:
+ api_response = api_instance.get_self()
+ print("The response of TTXClientApi->get_self:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->get_self: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**PlayerDto**](PlayerDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **link_discord_twitch**
+> TokenDto link_discord_twitch(link_discord_twitch_dto=link_discord_twitch_dto)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.link_discord_twitch_dto import LinkDiscordTwitchDto
+from ttx.models.token_dto import TokenDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ link_discord_twitch_dto = ttx.LinkDiscordTwitchDto() # LinkDiscordTwitchDto | (optional)
+
+ try:
+ api_response = api_instance.link_discord_twitch(link_discord_twitch_dto=link_discord_twitch_dto)
+ print("The response of TTXClientApi->link_discord_twitch:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->link_discord_twitch: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **link_discord_twitch_dto** | [**LinkDiscordTwitchDto**](LinkDiscordTwitchDto.md)| | [optional]
+
+### Return type
+
+[**TokenDto**](TokenDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, text/json, application/*+json
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **place_order**
+> CreatorTransactionDto place_order(create_transaction_dto=create_transaction_dto)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.create_transaction_dto import CreateTransactionDto
+from ttx.models.creator_transaction_dto import CreatorTransactionDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ create_transaction_dto = ttx.CreateTransactionDto() # CreateTransactionDto | (optional)
+
+ try:
+ api_response = api_instance.place_order(create_transaction_dto=create_transaction_dto)
+ print("The response of TTXClientApi->place_order:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->place_order: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_transaction_dto** | [**CreateTransactionDto**](CreateTransactionDto.md)| | [optional]
+
+### Return type
+
+[**CreatorTransactionDto**](CreatorTransactionDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, text/json, application/*+json
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **twitch_callback**
+> TokenDto twitch_callback(code=code)
+
+### Example
+
+
+```python
+import ttx
+from ttx.models.token_dto import TokenDto
+from ttx.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = ttx.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with ttx.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = ttx.TTXClientApi(api_client)
+ code = 'code_example' # str | (optional)
+
+ try:
+ api_response = api_instance.twitch_callback(code=code)
+ print("The response of TTXClientApi->twitch_callback:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TTXClientApi->twitch_callback: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **code** | **str**| | [optional]
+
+### Return type
+
+[**TokenDto**](TokenDto.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/generate.ps1 b/generate.ps1
index 9022f3f..ee5755f 100644
--- a/generate.ps1
+++ b/generate.ps1
@@ -1,8 +1 @@
-openapi-generator-cli `
- generate `
- -g python `
- -i https://api.ttx.gg/swagger/v1/swagger.json `
- -o . `
- --package-name ttx `
-
-
+openapi-generator-cli generate -c config.yml
\ No newline at end of file
diff --git a/git_push.sh b/git_push.sh
index f53a75d..3fac81f 100644
--- a/git_push.sh
+++ b/git_push.sh
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
fi
if [ "$git_user_id" = "" ]; then
- git_user_id="GIT_USER_ID"
+ git_user_id="ttxdev"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
- git_repo_id="GIT_REPO_ID"
+ git_repo_id="ttx.py"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
diff --git a/pyproject.toml b/pyproject.toml
index e7d91ca..effae9e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
[tool.poetry]
name = "ttx"
version = "1.0.0"
-description = "TTX API wrapper"
+description = "TTX API Wrapper"
authors = ["TTX "]
license = "AGPL-3.0"
readme = "README.md"
diff --git a/setup.py b/setup.py
index b82ab1e..7fbdfa2 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@
description="TTX.Api",
author="OpenAPI Generator community",
author_email="team@openapitools.org",
- url="",
+ url="https://github.com/ttxdev/ttx.py",
keywords=["OpenAPI", "OpenAPI-Generator", "TTX.Api"],
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
diff --git a/test/test_ttx_client_api.py b/test/test_ttx_client_api.py
new file mode 100644
index 0000000..436a34b
--- /dev/null
+++ b/test/test_ttx_client_api.py
@@ -0,0 +1,103 @@
+# coding: utf-8
+
+"""
+ TTX.Api
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+ The version of the OpenAPI document: 1.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from ttx.api.ttx_client_api import TTXClientApi
+
+
+class TestTTXClientApi(unittest.TestCase):
+ """TTXClientApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = TTXClientApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_creator(self) -> None:
+ """Test case for create_creator
+
+ """
+ pass
+
+ def test_discord_callback(self) -> None:
+ """Test case for discord_callback
+
+ """
+ pass
+
+ def test_gamba(self) -> None:
+ """Test case for gamba
+
+ """
+ pass
+
+ def test_get_creator(self) -> None:
+ """Test case for get_creator
+
+ """
+ pass
+
+ def test_get_creator_transactions(self) -> None:
+ """Test case for get_creator_transactions
+
+ """
+ pass
+
+ def test_get_creators(self) -> None:
+ """Test case for get_creators
+
+ """
+ pass
+
+ def test_get_player(self) -> None:
+ """Test case for get_player
+
+ """
+ pass
+
+ def test_get_players(self) -> None:
+ """Test case for get_players
+
+ """
+ pass
+
+ def test_get_self(self) -> None:
+ """Test case for get_self
+
+ """
+ pass
+
+ def test_link_discord_twitch(self) -> None:
+ """Test case for link_discord_twitch
+
+ """
+ pass
+
+ def test_place_order(self) -> None:
+ """Test case for place_order
+
+ """
+ pass
+
+ def test_twitch_callback(self) -> None:
+ """Test case for twitch_callback
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/ttx/__init__.py b/ttx/__init__.py
index 74147bf..f5ca636 100644
--- a/ttx/__init__.py
+++ b/ttx/__init__.py
@@ -17,10 +17,7 @@
__version__ = "1.0.0"
# import apis into sdk package
-from ttx.api.creators_api import CreatorsApi
-from ttx.api.players_api import PlayersApi
-from ttx.api.sessions_api import SessionsApi
-from ttx.api.transactions_api import TransactionsApi
+from ttx.api.ttx_client_api import TTXClientApi
# import ApiClient
from ttx.api_response import ApiResponse
diff --git a/ttx/api/__init__.py b/ttx/api/__init__.py
index 0be0071..43b4481 100644
--- a/ttx/api/__init__.py
+++ b/ttx/api/__init__.py
@@ -1,8 +1,5 @@
# flake8: noqa
# import apis into api package
-from ttx.api.creators_api import CreatorsApi
-from ttx.api.players_api import PlayersApi
-from ttx.api.sessions_api import SessionsApi
-from ttx.api.transactions_api import TransactionsApi
+from ttx.api.ttx_client_api import TTXClientApi
diff --git a/ttx/api/ttx_client_api.py b/ttx/api/ttx_client_api.py
new file mode 100644
index 0000000..53324c5
--- /dev/null
+++ b/ttx/api/ttx_client_api.py
@@ -0,0 +1,3426 @@
+# coding: utf-8
+
+"""
+ TTX.Api
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+ The version of the OpenAPI document: 1.0
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Any, Dict, List, Optional, Tuple, Union
+from typing_extensions import Annotated
+
+from datetime import datetime
+from pydantic import StrictInt, StrictStr
+from typing import List, Optional
+from ttx.models.create_transaction_dto import CreateTransactionDto
+from ttx.models.creator_dto import CreatorDto
+from ttx.models.creator_order_by import CreatorOrderBy
+from ttx.models.creator_partial_dto_pagination_dto import CreatorPartialDtoPaginationDto
+from ttx.models.creator_transaction_dto import CreatorTransactionDto
+from ttx.models.discord_token_dto import DiscordTokenDto
+from ttx.models.link_discord_twitch_dto import LinkDiscordTwitchDto
+from ttx.models.loot_box_result_dto import LootBoxResultDto
+from ttx.models.order_direction import OrderDirection
+from ttx.models.player_dto import PlayerDto
+from ttx.models.player_dto_pagination_dto import PlayerDtoPaginationDto
+from ttx.models.player_order_by import PlayerOrderBy
+from ttx.models.player_transaction_dto import PlayerTransactionDto
+from ttx.models.time_step import TimeStep
+from ttx.models.token_dto import TokenDto
+
+from ttx.api_client import ApiClient, RequestSerialized
+from ttx.api_response import ApiResponse
+from ttx.rest import RESTResponseType
+
+
+class TTXClientApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def create_creator(
+ self,
+ username: Optional[StrictStr] = None,
+ ticker: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreatorDto:
+ """create_creator
+
+
+ :param username:
+ :type username: str
+ :param ticker:
+ :type ticker: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_creator_serialize(
+ username=username,
+ ticker=ticker,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def create_creator_with_http_info(
+ self,
+ username: Optional[StrictStr] = None,
+ ticker: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreatorDto]:
+ """create_creator
+
+
+ :param username:
+ :type username: str
+ :param ticker:
+ :type ticker: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_creator_serialize(
+ username=username,
+ ticker=ticker,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def create_creator_without_preload_content(
+ self,
+ username: Optional[StrictStr] = None,
+ ticker: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """create_creator
+
+
+ :param username:
+ :type username: str
+ :param ticker:
+ :type ticker: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._create_creator_serialize(
+ username=username,
+ ticker=ticker,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_creator_serialize(
+ self,
+ username,
+ ticker,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if username is not None:
+
+ _query_params.append(('username', username))
+
+ if ticker is not None:
+
+ _query_params.append(('ticker', ticker))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/creators',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def discord_callback(
+ self,
+ code: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> DiscordTokenDto:
+ """discord_callback
+
+
+ :param code:
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._discord_callback_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DiscordTokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def discord_callback_with_http_info(
+ self,
+ code: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[DiscordTokenDto]:
+ """discord_callback
+
+
+ :param code:
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._discord_callback_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DiscordTokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def discord_callback_without_preload_content(
+ self,
+ code: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """discord_callback
+
+
+ :param code:
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._discord_callback_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DiscordTokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _discord_callback_serialize(
+ self,
+ code,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if code is not None:
+
+ _query_params.append(('code', code))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/sessions/discord/callback',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def gamba(
+ self,
+ loot_box_id: StrictInt,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> LootBoxResultDto:
+ """gamba
+
+
+ :param loot_box_id: (required)
+ :type loot_box_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gamba_serialize(
+ loot_box_id=loot_box_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LootBoxResultDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def gamba_with_http_info(
+ self,
+ loot_box_id: StrictInt,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[LootBoxResultDto]:
+ """gamba
+
+
+ :param loot_box_id: (required)
+ :type loot_box_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gamba_serialize(
+ loot_box_id=loot_box_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LootBoxResultDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def gamba_without_preload_content(
+ self,
+ loot_box_id: StrictInt,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """gamba
+
+
+ :param loot_box_id: (required)
+ :type loot_box_id: int
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gamba_serialize(
+ loot_box_id=loot_box_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "LootBoxResultDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _gamba_serialize(
+ self,
+ loot_box_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if loot_box_id is not None:
+ _path_params['lootBoxId'] = loot_box_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/players/me/lootboxes/{lootBoxId}/open',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_creator(
+ self,
+ slug: StrictStr,
+ step: Optional[TimeStep] = None,
+ after: Optional[datetime] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreatorDto:
+ """get_creator
+
+
+ :param slug: (required)
+ :type slug: str
+ :param step:
+ :type step: TimeStep
+ :param after:
+ :type after: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creator_serialize(
+ slug=slug,
+ step=step,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_creator_with_http_info(
+ self,
+ slug: StrictStr,
+ step: Optional[TimeStep] = None,
+ after: Optional[datetime] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreatorDto]:
+ """get_creator
+
+
+ :param slug: (required)
+ :type slug: str
+ :param step:
+ :type step: TimeStep
+ :param after:
+ :type after: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creator_serialize(
+ slug=slug,
+ step=step,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_creator_without_preload_content(
+ self,
+ slug: StrictStr,
+ step: Optional[TimeStep] = None,
+ after: Optional[datetime] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_creator
+
+
+ :param slug: (required)
+ :type slug: str
+ :param step:
+ :type step: TimeStep
+ :param after:
+ :type after: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creator_serialize(
+ slug=slug,
+ step=step,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_creator_serialize(
+ self,
+ slug,
+ step,
+ after,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if slug is not None:
+ _path_params['slug'] = slug
+ # process the query parameters
+ if step is not None:
+
+ _query_params.append(('step', step.value))
+
+ if after is not None:
+ if isinstance(after, datetime):
+ _query_params.append(
+ (
+ 'after',
+ after.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('after', after))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/creators/{slug}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_creator_transactions(
+ self,
+ creator_slug: StrictStr,
+ slug: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[PlayerTransactionDto]:
+ """get_creator_transactions
+
+
+ :param creator_slug: (required)
+ :type creator_slug: str
+ :param slug:
+ :type slug: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creator_transactions_serialize(
+ creator_slug=creator_slug,
+ slug=slug,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[PlayerTransactionDto]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_creator_transactions_with_http_info(
+ self,
+ creator_slug: StrictStr,
+ slug: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[PlayerTransactionDto]]:
+ """get_creator_transactions
+
+
+ :param creator_slug: (required)
+ :type creator_slug: str
+ :param slug:
+ :type slug: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creator_transactions_serialize(
+ creator_slug=creator_slug,
+ slug=slug,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[PlayerTransactionDto]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_creator_transactions_without_preload_content(
+ self,
+ creator_slug: StrictStr,
+ slug: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_creator_transactions
+
+
+ :param creator_slug: (required)
+ :type creator_slug: str
+ :param slug:
+ :type slug: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creator_transactions_serialize(
+ creator_slug=creator_slug,
+ slug=slug,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[PlayerTransactionDto]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_creator_transactions_serialize(
+ self,
+ creator_slug,
+ slug,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if creator_slug is not None:
+ _path_params['creatorSlug'] = creator_slug
+ # process the query parameters
+ if slug is not None:
+
+ _query_params.append(('slug', slug))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/creators/{creatorSlug}/transactions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_creators(
+ self,
+ page: Optional[StrictInt] = None,
+ limit: Optional[StrictInt] = None,
+ search: Optional[StrictStr] = None,
+ order_by: Optional[CreatorOrderBy] = None,
+ order_dir: Optional[OrderDirection] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreatorPartialDtoPaginationDto:
+ """get_creators
+
+
+ :param page:
+ :type page: int
+ :param limit:
+ :type limit: int
+ :param search:
+ :type search: str
+ :param order_by:
+ :type order_by: CreatorOrderBy
+ :param order_dir:
+ :type order_dir: OrderDirection
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creators_serialize(
+ page=page,
+ limit=limit,
+ search=search,
+ order_by=order_by,
+ order_dir=order_dir,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorPartialDtoPaginationDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_creators_with_http_info(
+ self,
+ page: Optional[StrictInt] = None,
+ limit: Optional[StrictInt] = None,
+ search: Optional[StrictStr] = None,
+ order_by: Optional[CreatorOrderBy] = None,
+ order_dir: Optional[OrderDirection] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreatorPartialDtoPaginationDto]:
+ """get_creators
+
+
+ :param page:
+ :type page: int
+ :param limit:
+ :type limit: int
+ :param search:
+ :type search: str
+ :param order_by:
+ :type order_by: CreatorOrderBy
+ :param order_dir:
+ :type order_dir: OrderDirection
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creators_serialize(
+ page=page,
+ limit=limit,
+ search=search,
+ order_by=order_by,
+ order_dir=order_dir,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorPartialDtoPaginationDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_creators_without_preload_content(
+ self,
+ page: Optional[StrictInt] = None,
+ limit: Optional[StrictInt] = None,
+ search: Optional[StrictStr] = None,
+ order_by: Optional[CreatorOrderBy] = None,
+ order_dir: Optional[OrderDirection] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_creators
+
+
+ :param page:
+ :type page: int
+ :param limit:
+ :type limit: int
+ :param search:
+ :type search: str
+ :param order_by:
+ :type order_by: CreatorOrderBy
+ :param order_dir:
+ :type order_dir: OrderDirection
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_creators_serialize(
+ page=page,
+ limit=limit,
+ search=search,
+ order_by=order_by,
+ order_dir=order_dir,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorPartialDtoPaginationDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_creators_serialize(
+ self,
+ page,
+ limit,
+ search,
+ order_by,
+ order_dir,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if search is not None:
+
+ _query_params.append(('search', search))
+
+ if order_by is not None:
+
+ _query_params.append(('orderBy', order_by.value))
+
+ if order_dir is not None:
+
+ _query_params.append(('orderDir', order_dir.value))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/creators',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_player(
+ self,
+ username: StrictStr,
+ step: Optional[TimeStep] = None,
+ after: Optional[datetime] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PlayerDto:
+ """get_player
+
+
+ :param username: (required)
+ :type username: str
+ :param step:
+ :type step: TimeStep
+ :param after:
+ :type after: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_player_serialize(
+ username=username,
+ step=step,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_player_with_http_info(
+ self,
+ username: StrictStr,
+ step: Optional[TimeStep] = None,
+ after: Optional[datetime] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PlayerDto]:
+ """get_player
+
+
+ :param username: (required)
+ :type username: str
+ :param step:
+ :type step: TimeStep
+ :param after:
+ :type after: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_player_serialize(
+ username=username,
+ step=step,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_player_without_preload_content(
+ self,
+ username: StrictStr,
+ step: Optional[TimeStep] = None,
+ after: Optional[datetime] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_player
+
+
+ :param username: (required)
+ :type username: str
+ :param step:
+ :type step: TimeStep
+ :param after:
+ :type after: datetime
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_player_serialize(
+ username=username,
+ step=step,
+ after=after,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_player_serialize(
+ self,
+ username,
+ step,
+ after,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if username is not None:
+ _path_params['username'] = username
+ # process the query parameters
+ if step is not None:
+
+ _query_params.append(('step', step.value))
+
+ if after is not None:
+ if isinstance(after, datetime):
+ _query_params.append(
+ (
+ 'after',
+ after.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('after', after))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/players/{username}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_players(
+ self,
+ page: Optional[StrictInt] = None,
+ limit: Optional[StrictInt] = None,
+ search: Optional[StrictStr] = None,
+ order_by: Optional[PlayerOrderBy] = None,
+ order_dir: Optional[OrderDirection] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PlayerDtoPaginationDto:
+ """get_players
+
+
+ :param page:
+ :type page: int
+ :param limit:
+ :type limit: int
+ :param search:
+ :type search: str
+ :param order_by:
+ :type order_by: PlayerOrderBy
+ :param order_dir:
+ :type order_dir: OrderDirection
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_players_serialize(
+ page=page,
+ limit=limit,
+ search=search,
+ order_by=order_by,
+ order_dir=order_dir,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDtoPaginationDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_players_with_http_info(
+ self,
+ page: Optional[StrictInt] = None,
+ limit: Optional[StrictInt] = None,
+ search: Optional[StrictStr] = None,
+ order_by: Optional[PlayerOrderBy] = None,
+ order_dir: Optional[OrderDirection] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PlayerDtoPaginationDto]:
+ """get_players
+
+
+ :param page:
+ :type page: int
+ :param limit:
+ :type limit: int
+ :param search:
+ :type search: str
+ :param order_by:
+ :type order_by: PlayerOrderBy
+ :param order_dir:
+ :type order_dir: OrderDirection
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_players_serialize(
+ page=page,
+ limit=limit,
+ search=search,
+ order_by=order_by,
+ order_dir=order_dir,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDtoPaginationDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_players_without_preload_content(
+ self,
+ page: Optional[StrictInt] = None,
+ limit: Optional[StrictInt] = None,
+ search: Optional[StrictStr] = None,
+ order_by: Optional[PlayerOrderBy] = None,
+ order_dir: Optional[OrderDirection] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_players
+
+
+ :param page:
+ :type page: int
+ :param limit:
+ :type limit: int
+ :param search:
+ :type search: str
+ :param order_by:
+ :type order_by: PlayerOrderBy
+ :param order_dir:
+ :type order_dir: OrderDirection
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_players_serialize(
+ page=page,
+ limit=limit,
+ search=search,
+ order_by=order_by,
+ order_dir=order_dir,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDtoPaginationDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_players_serialize(
+ self,
+ page,
+ limit,
+ search,
+ order_by,
+ order_dir,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if search is not None:
+
+ _query_params.append(('search', search))
+
+ if order_by is not None:
+
+ _query_params.append(('orderBy', order_by.value))
+
+ if order_dir is not None:
+
+ _query_params.append(('orderDir', order_dir.value))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/players',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def get_self(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PlayerDto:
+ """get_self
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_self_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_self_with_http_info(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PlayerDto]:
+ """get_self
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_self_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def get_self_without_preload_content(
+ self,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """get_self
+
+
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._get_self_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PlayerDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_self_serialize(
+ self,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/players/me',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def link_discord_twitch(
+ self,
+ link_discord_twitch_dto: Optional[LinkDiscordTwitchDto] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TokenDto:
+ """link_discord_twitch
+
+
+ :param link_discord_twitch_dto:
+ :type link_discord_twitch_dto: LinkDiscordTwitchDto
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._link_discord_twitch_serialize(
+ link_discord_twitch_dto=link_discord_twitch_dto,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def link_discord_twitch_with_http_info(
+ self,
+ link_discord_twitch_dto: Optional[LinkDiscordTwitchDto] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TokenDto]:
+ """link_discord_twitch
+
+
+ :param link_discord_twitch_dto:
+ :type link_discord_twitch_dto: LinkDiscordTwitchDto
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._link_discord_twitch_serialize(
+ link_discord_twitch_dto=link_discord_twitch_dto,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def link_discord_twitch_without_preload_content(
+ self,
+ link_discord_twitch_dto: Optional[LinkDiscordTwitchDto] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """link_discord_twitch
+
+
+ :param link_discord_twitch_dto:
+ :type link_discord_twitch_dto: LinkDiscordTwitchDto
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._link_discord_twitch_serialize(
+ link_discord_twitch_dto=link_discord_twitch_dto,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _link_discord_twitch_serialize(
+ self,
+ link_discord_twitch_dto,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if link_discord_twitch_dto is not None:
+ _body_params = link_discord_twitch_dto
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'text/json',
+ 'application/*+json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/sessions/discord/link',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def place_order(
+ self,
+ create_transaction_dto: Optional[CreateTransactionDto] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> CreatorTransactionDto:
+ """place_order
+
+
+ :param create_transaction_dto:
+ :type create_transaction_dto: CreateTransactionDto
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._place_order_serialize(
+ create_transaction_dto=create_transaction_dto,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorTransactionDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def place_order_with_http_info(
+ self,
+ create_transaction_dto: Optional[CreateTransactionDto] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[CreatorTransactionDto]:
+ """place_order
+
+
+ :param create_transaction_dto:
+ :type create_transaction_dto: CreateTransactionDto
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._place_order_serialize(
+ create_transaction_dto=create_transaction_dto,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorTransactionDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def place_order_without_preload_content(
+ self,
+ create_transaction_dto: Optional[CreateTransactionDto] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """place_order
+
+
+ :param create_transaction_dto:
+ :type create_transaction_dto: CreateTransactionDto
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._place_order_serialize(
+ create_transaction_dto=create_transaction_dto,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "CreatorTransactionDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _place_order_serialize(
+ self,
+ create_transaction_dto,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_transaction_dto is not None:
+ _body_params = create_transaction_dto
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+ # set the HTTP header `Content-Type`
+ if _content_type:
+ _header_params['Content-Type'] = _content_type
+ else:
+ _default_content_type = (
+ self.api_client.select_header_content_type(
+ [
+ 'application/json',
+ 'text/json',
+ 'application/*+json'
+ ]
+ )
+ )
+ if _default_content_type is not None:
+ _header_params['Content-Type'] = _default_content_type
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/transactions',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def twitch_callback(
+ self,
+ code: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> TokenDto:
+ """twitch_callback
+
+
+ :param code:
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._twitch_callback_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def twitch_callback_with_http_info(
+ self,
+ code: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[TokenDto]:
+ """twitch_callback
+
+
+ :param code:
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._twitch_callback_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def twitch_callback_without_preload_content(
+ self,
+ code: Optional[StrictStr] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """twitch_callback
+
+
+ :param code:
+ :type code: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._twitch_callback_serialize(
+ code=code,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TokenDto",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _twitch_callback_serialize(
+ self,
+ code,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
+ ] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if code is not None:
+
+ _query_params.append(('code', code))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/sessions/twitch/callback',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+