Skip to main content

Simple module for interaction with Team Run Skin Storage database.

Project description

py-trss-api

py-trss-api is a simple module for interaction with Team Run Skin Storage database.

Team Run Skin Storage is an incredible app for saving and sharing IamTagir's Team Run game skins, made by aumnlify.

Usage

The module consists of two submodules: users and skins, for users-related and skins-related actions respectively.

Usage is quite simple:

>>> from trssapi.users import get_by_id
>>> from trssapi.skins import get_one_by_id
>>> get_by_id(6)
{'id': 6, 'login': 'DKorj', 'nick': 'Дкоржака', 'skin': 'trSkin17ZTbroMgEEV/aeQiND6BwP9/0sHSbtGxVHNsHxpNTFZGRtZGkKhcA11wwQU/AZ2k1LmUZjhr8OfAmptw/qgzuvZMIbwMOtXwT+dRJpXyNeQ7xjcaGIOu/c558CwfpTOUKzKSU/nZ0OdyWQ3/6JrBkOxMfuSIBIk23MLUU79nDJ27VwBRC70C40IvlkmJpJ5UO0HK1qoAHUhLsZB/qnLwgcx9LsCGxmtAF0+BpFjVxjrDmQNSNGAerEkIU8Oe7BvObD/3WjkzH6JcgbwaSYnpW+iYNeRCg6liij25ANhIpX1zQ/IdbrT1zpVDlNIiBcbwysZW/xgUwxpin/zz4BdnpOC5ijxSfMd5Wv5ky2+nGLoYKNjaGSngjEpQMUW7+n2VrkPQNOSwdoYGT4EuVM5y5rCl+hKqrkec033OUm18gkau89bnQNcf', 'primaryColor': '000cba', 'secondaryColor': '000000', 'moderator': 1, 'muted': 0, 'until': None}
>>> get_one_by_id(42)
{'id': 42, 'name': 'Defective looper', 'author': 6, 'skin': 'trSkin17ZJRCoAgEAWvtKal0pdZ3v9IsaVFEGJpKZbv482CwqACrKuHH3KDoJhSbGoQ/Zgxo5jUW5+yzQtSaK5NKTYhQAzm5uHXv0aUbRYQXE1GlmLjgxGzVcCJQWJ6uiw32SIa46ZItZYwBY2r64aqZQQ6J2rVkhrucPkWN7B6p5a2klneAt8LHyuv5w/1wQw=', 'primaryColor': '757575', 'secondaryColor': '292929', 'likes': 1, 'views': 9}

Tokens

Some actions require authentication with token - unique user identifier. To get one, use users.login().

>>> from trssapi.users import login, register_view
>>> login_response = login("login", "password")
>>> login_response
{'token': 'your-token-here', 'first': 0}
>>> token = login_response["token"]
>>> register_view(token, 42)
{'state': 1}

You can see full documentation in docs.md file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trssapi-0.0.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trssapi-0.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file trssapi-0.0.2.tar.gz.

File metadata

  • Download URL: trssapi-0.0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for trssapi-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8caebeb86ba70a5a62ab06d0b4e94e3923623aed3f7bb9c094ead0d14d36a096
MD5 89ccaf67b8f720ec24274ad895f9f046
BLAKE2b-256 113769fe2822365e114c8d881095a55cd5cc3bf847013a5b9fbc633e97f1d4ad

See more details on using hashes here.

File details

Details for the file trssapi-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: trssapi-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for trssapi-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 211f2458bb541cc35fa2778cec47a62c91a14597419b56d04316a1afc98ba6b8
MD5 46d5211c0214b8fb33bbd6516fc3057e
BLAKE2b-256 500d815ada9b582e7f20057aa4d33c09bf9fc19d963095d728ea7d1375d870ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page