TTX API Wrapper
Python 3.9+
If the python package is hosted on a repository, you can install directly using:
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:
import ttxInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import ttxExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import ttx
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.TTXApi(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 TTXApi->create_creator:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling TTXApi->create_creator: %s\n" % e)All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| TTXApi | create_creator | POST /creators | |
| TTXApi | discord_callback | GET /sessions/discord/callback | |
| TTXApi | gamba | PUT /players/me/lootboxes/{lootBoxId}/open | |
| TTXApi | get_creator | GET /creators/{slug} | |
| TTXApi | get_creator_transactions | GET /creators/{creatorSlug}/transactions | |
| TTXApi | get_creators | GET /creators | |
| TTXApi | get_player | GET /players/{username} | |
| TTXApi | get_players | GET /players | |
| TTXApi | get_self | GET /players/me | |
| TTXApi | link_discord_twitch | POST /sessions/discord/link | |
| TTXApi | place_order | POST /transactions | |
| TTXApi | twitch_callback | GET /sessions/twitch/callback |
- CreateTransactionDto
- CreatorDto
- CreatorOrderBy
- CreatorPartialDto
- CreatorPartialDtoPaginationDto
- CreatorRarityDto
- CreatorShareDto
- CreatorTransactionDto
- DiscordTokenDto
- LinkDiscordTwitchDto
- LootBoxDto
- LootBoxResultDto
- ModelId
- OrderDirection
- PlayerDto
- PlayerDtoPaginationDto
- PlayerOrderBy
- PlayerPartialDto
- PlayerShareDto
- PlayerTransactionDto
- PlayerType
- PortfolioSnapshotDto
- Rarity
- StreamStatusDto
- TimeStep
- TokenDto
- TransactionAction
- TwitchUserDto
- VoteDto
Endpoints do not require authorization.