https://github.com/yowenter/daovoice-py-sdk
Python SDK For DaoVoice
https://github.com/yowenter/daovoice-py-sdk
crm daovoice python-sdk
Last synced: about 2 months ago
JSON representation
Python SDK For DaoVoice
- Host: GitHub
- URL: https://github.com/yowenter/daovoice-py-sdk
- Owner: yowenter
- Created: 2017-05-18T08:56:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T06:27:59.000Z (over 8 years ago)
- Last Synced: 2025-02-08T20:04:42.639Z (10 months ago)
- Topics: crm, daovoice, python-sdk
- Language: Python
- Homepage: http://docs.daovoice.io/api/
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
DaoVoice Python Sdk
====================================
Installation
------------------
::
pip install daovoice-sdk
Basic Usage
-----------------------
.. code:: python
from daovoice.client import Client
daovoice_client = Client(token="Your Token Here")
Note that you can find your token in `http://dashboard.daovoice.io/app/{app_id}/apps/settings/open-api`
Resources
~~~~~~~~~~~~~~~~~~
Resources this API supports:
https://api.daovoice.io/v1/conversations
https://api.daovoice.io/v1/admins
https://api.daovoice.io/v1/users
Examples
~~~~~~~~~~~~~~~~~
Conversations
^^^^^^^^^^^^^
.. code:: python
# Get Conversation by id
conversation = daovoice_client.conversations.get(id="conversation_id")
print conversation.conversation_parts
print conversation.conversation_message
# Reply
daovoice_client.conversations.reply(id="conversation_id",admin_id="***",body="reply msg")
Admins
^^^^^^
.. code:: python
# list admins
admins = daovoice_client.admins.all()
for ad in admins:
print ad.name
User
^^^^^^
.. code:: python
# create user
user = daovoice_client.user.create(user_id="123456",name="example", email="example@daovoice.io")