Skip to content

Commit

Permalink
Add accounts example
Browse files Browse the repository at this point in the history
  • Loading branch information
peprolinbot committed Jul 14, 2023
1 parent 72da314 commit 32cb618
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions busGal_api/accounts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
"""
# Introduction
This submodule takes care of accounts and other stuff which requires logging in. This is all reverse-engineered using [mitmproxy](https://mitmproxy.org) and other techniques on the [Android app](https://play.google.com/store/apps/details?id=gal.xunta.transportepublico).
# Quick example
This is just a simple command-line "client" which shows your cards and makes you rename them:
``` python
from busGal_api import accounts as api
print("Please login to continue")
account=api.Account(input("Email: "), input("Password: "))
print("Here are your cards. You are going to rename each of them")
cards=account.get_cards()
for card in cards:
print(card)
card.rename(input("New name: "))
```
"""

from ..rest_adapter import RestAdapter as RestAdapter
from ..known_servers import XG_APP as BASE_URL

Expand Down

0 comments on commit 32cb618

Please sign in to comment.