Initial commit. This is based on code from ed_tools and fvbot.

This commit is contained in:
Anna Rose Wiggins 2016-01-21 11:11:53 -05:00
commit 010ff377e5
3 changed files with 166 additions and 0 deletions

21
Readme.md Normal file
View file

@ -0,0 +1,21 @@
# inara.py
This is a simple python library that is used to retrieve and store data to inara.py.
It subclasses requests_cache.core.CachedSession to provide a specialized HTTP session to talk to inara.
Usage is simple:
from inara.inara import InaraSession
session = InaraSession(inara_username, inara_password)
session.update_location('Chona')
session.update_credits(1000000000)
info = session.get_cmdr_info()
pprint(info)
If the logged-in user is a member of a Wing, you can get information about wing-mates like so:
info = session.get_cmdr_info(wing_id, cmdr_id)
where the 'id's are the numeric identifiers visible in inara's URLs.