https://github.com/marselester/pychain
Python API client for Chain.com
https://github.com/marselester/pychain
Last synced: about 1 year ago
JSON representation
Python API client for Chain.com
- Host: GitHub
- URL: https://github.com/marselester/pychain
- Owner: marselester
- License: mit
- Created: 2014-08-26T08:58:01.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-09T04:12:56.000Z (over 11 years ago)
- Last Synced: 2024-05-02T00:42:34.257Z (about 2 years ago)
- Language: Python
- Size: 170 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=======
PyChain
=======
PyChain is a Python API client for Chain.com_.
Usage example:
.. code-block:: python
import chain
chain.conf.api_key = 'YOUR-KEY'
chain.conf.api_secret = 'YOUR-SECRET'
try:
webhook = chain.Webhook.create('https://your-server-url.com')
except chain.ChainException as exc:
print exc
Webhook
-------
Creating a webhook
~~~~~~~~~~~~~~~~~~
.. code-block:: python
webhook = chain.Webhook.create('https://your-server-url.com')
Retrieving a list of webhooks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
webhook_list = chain.Webhook.list()
Updating a webhook
~~~~~~~~~~~~~~~~~~
.. code-block:: python
webhook = chain.Webhook('FFA21991-5669-4728-8C83-74DEC4C93A4A')
webhook.url = 'https://your-new-url.com'
webhook.save()
Deleting a webhook
~~~~~~~~~~~~~~~~~~
.. code-block:: python
webhook = chain.Webhook('FFA21991-5669-4728-8C83-74DEC4C93A4A')
webhook.delete()
.. _Chain.com: https://chain.com