Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 19, 2019. It is now read-only.

pathwar/python-pathwar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

python-pathwar

Deprecated! Go to the Pathwar monorepo: https://github.com/pathwar/pathwar

⚠️ THIS IS JUST A PLACEHOLDER, THE CODE IS NOT YET WORKING ⚠️

Pathwar API client in Python

Examples

from pathwar import Pathwar
## Connection
client = Pathwar(user="username", password="password") # Connect with user+pass couple
client = Pathwar(token="token") # Connect using generated token
## Switch organization
client.set_organization('roxxorz') # Switch to organization with name = `roxxorz`
client.set_organization('abcdef-ghij-klmn-opqr-stuvwx') # Switch to organization by `organization_id`
client.set_organization(session='super-final') # switch to the organization where session is `super-final`
## Some actions
client.levels.get(name='pnu').buy()
client.coupons.validate('cool-coupon')
## A level workflow
for level in client.levels.all():
 if not level.validated:
 print('You still need to validate the level {}'.format(level.name))
 # Try to use 'toto' as passphrase
 level.validate('toto')
 elif not level.bought:
 # Try to buy the level
 level.buy()

About

🐍 Pathwar API client in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /