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

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.1.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.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trssapi-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 171e3c1f7fa23e6740a13434d2a0e5b6b0eb089fa05beb557a4877059726db57
MD5 962ec89a90ebf174013cbb5d1774924a
BLAKE2b-256 060c6f6f31021f699c72387bb96bf33d83daae55c88c913b3b67ca0da2e09227

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trssapi-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cbfb48a7e850b673cb9ca87845e7fc61ad311a75bec93d64c38077fb16a69a9
MD5 f56a1d1a9c98e3786dcd89fa5f142b9c
BLAKE2b-256 f173d96e6681a7c48b05f8e2ebd43542d0b4e0909f67baf8a04503dae86f13f3

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