This is a quick introduction, for a complete guide please go to client
or examples
.
Credentials can be created via the Mopinion Suite at Integrations » Feedback API in the classic interface or in the Raspberry interface, provided your package includes API access.
You can also take a look at this link with the steps to get a private_key
and a public_key
.
>>> from mopinion import MopinionClient
>>> client = MopinionClient(public_key=YOUR_PUBLIC_KEY, private_key=YOUR_PRIVATE_KEY)
>>> assert client.is_available()
Request your account.
>>> response = client.resource("account")
>>> assert response.json()["_meta"]["code"] == 200
Or request deployments.
>>> response = client.resource("deployments")
>>> assert response.json()["_meta"]["code"] == 200
If you need further examples about requesting resources please go to client
or examples
.