Sen descrición

JoostSijm b79f353247 Working on work module %!s(int64=4) %!d(string=hai) anos
rival_regions_wrapper b79f353247 Working on work module %!s(int64=4) %!d(string=hai) anos
tests b79f353247 Working on work module %!s(int64=4) %!d(string=hai) anos
.gitignore a3020f28b6 Make profile work, add tests %!s(int64=4) %!d(string=hai) anos
LICENSE baaed2455a Add setup.py and license, moved some files %!s(int64=4) %!d(string=hai) anos
Pipfile cb151ead9b Add perks function, add dependancy %!s(int64=4) %!d(string=hai) anos
Pipfile.lock cb151ead9b Add perks function, add dependancy %!s(int64=4) %!d(string=hai) anos
README.md e8cafeb51f Add install instructions %!s(int64=4) %!d(string=hai) anos
setup.py 01b7f73bde Add missing coma %!s(int64=4) %!d(string=hai) anos

README.md

Rival-Regions-Wrapper

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

Install

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

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