|
4 년 전 | |
---|---|---|
rival_regions_wrapper | 4 년 전 | |
tests | 4 년 전 | |
.gitignore | 4 년 전 | |
LICENSE | 4 년 전 | |
Pipfile | 4 년 전 | |
Pipfile.lock | 4 년 전 | |
README.md | 4 년 전 | |
setup.py | 4 년 전 |
This library will functions as an API wrapper for interaction with Rival Regions.
When using pipenv you can install this package with the following command:
pipenv install -e git+https://github.com/jjoo914/rival_regions_wrapper#egg=rival_regions_wrapper
The API wrapper uses middleware to decide where how to send the request. Middlewares can also be used to write direct requests to Rival Regions.
Current middleware
Use username, password, and login method to log in local instance of the authenticator.
Connect through a remote API using URL and authentication key.
Create local authentication middleman after that log in with environ variables and request region page from Rival Regions
import os
from rival_regions_wrapper import LocalAuthentication
middleware = LocalAuthentication(
os.environ["USERNAME"],
os.environ["PASSWORD"],
os.environ["LOGIN_METHOD"]
)
region = middleware.get('listed/upgrades/{}'.format(region_id))