Object Oriented API for Quire
Project description
Object Oriented API for Quire
A set of resources (classes) for working with quire API
All API resources available in resources.
Examples:
Before queries you need initialize Credential object (he singleton).
from pyquire.credentials import Credentials
from pyquire.resources.user_resource import UserResource
# Credentials.initialize(
# set_file="./conf.json"
# )
# or
# Credentials.initialize(
# access_token="ACCESS_TOKEN",
# expires_in=3599,
# refresh_token="REFRESH_TOKEN",
# client_id="CLIENT_ID",
# client_secret="CLIENT_SECRET"
# )
# or
Credentials.initialize(
client_id="CLIENT_ID",
client_secret="CLIENT_SECRET",
set_file="./conf.json"
)
print(UserResource().get_users())
# [User(oid='...', name='...', iconColor='43', image='...', ... email='...', website='')]
TODO
- Create credentials class
- When code received - stop server and continue work flow.
P.S.
Implemented for their needs, but if there are problems, suggestions, etc. create issue in the repository.
Changelog
v1.0.3:
- Create facade
- Add functools.wraps() decorator for each api decorator
v1.0.1:
- Fix requirements
v1.0.0:
- Just create
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyquire-1.0.3.tar.gz
(19.9 kB
view hashes)
Built Distribution
pyquire-1.0.3-py3-none-any.whl
(40.9 kB
view hashes)