Python 3 interface library for swgoh-comlink (https://github.com/swgoh-utils/swgoh-comlink)
Project description
comlink-python
Description
A python wrapper for the swgoh-comlink tool.
Installation
Install from PyPi package repository using the following shell command.
pip install swgoh_comlink
Usage
Usage example:
from swgoh_comlink import SwgohComlink
comlink = SwgohComlink()
player_data = comlink.get_player(245866537)
player_name = player_data['name']
guild_id = player_data['guildId']
guild = comlink.get_guild(guild_id)
guild_name = guild['profile']['name']
Usage example with MHAC enabled:
from swgoh_comlink import SwgohComlink
comlink = SwgohComlink(
url='http://localhost:3000',
access_key='public_key',
secret_key='this_string_should_be_secret'
)
player_data = comlink.get_player(allycode=245866537)
player_name = player_data['name']
Parameters
- url: the URL where the swgoh-comlink service is running. Defaults to
http://localhost:3000
- access_key: The "public" portion of the shared key used in HMAC request signing. Defaults to
None
which disables HMAC signing of requests. Can also be read from the ACCESS_KEY environment variable. - secret_key: The "private" portion of the key used in HMAC request signing. Defaults to
None
which disables HMAC signing of requests. Can also be read from the SECRET_KEY environment variable.
See the online wiki for more information.
Support
Issues can be reported in GitHub.
Join the discord server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swgoh_comlink-1.8.0.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for swgoh_comlink-1.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51ca12f9d05ab46eb760d0cce3f5c9fbb2ec3338cd686b8b33f952ce7078003d |
|
MD5 | cc8eaf23a9f4f5726c6b4935665e7c1c |
|
BLAKE2b-256 | 6df3d57819e37f62a9fd60ac4d521cd0a67f3a31f1b41fd1f80338155b991d15 |