Без опису

JoostSijm 05fd5c6bf5 Change quotation mark 5 роки тому
rival_regions_wrapper a3020f28b6 Make profile work, add tests 5 роки тому
tests a3020f28b6 Make profile work, add tests 5 роки тому
.gitignore a3020f28b6 Make profile work, add tests 5 роки тому
LICENSE baaed2455a Add setup.py and license, moved some files 5 роки тому
Pipfile a3020f28b6 Make profile work, add tests 5 роки тому
Pipfile.lock a3020f28b6 Make profile work, add tests 5 роки тому
README.md 3492ac4c3d Improve readme 5 роки тому
setup.py 05fd5c6bf5 Change quotation mark 5 роки тому

README.md

Rival-Regions-Wrapper

This library will functions as an API wrapper for interaction with Rival Regions.

Middleware

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

LocalAuthentication

Use username, password, and login method to log in local instance of the authenticator.

RemoteAuthentication

Connect through a remote API using URL and authentication key.

Examples

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))

Contact