DutyCalls.me SDK
Project description
Dutycalls.me SDK
DutyCalls.me SDK for the Python language
Installation
The easiest way is to use PyPI:
pip install dutycalls_sdk
Client
The DutyCalls.me Client needs to be initialized using a login and password.
See https://docs.dutycalls.me/rest-api/#authentication for instructions on how to get these credentials.
Example:
from dutycalls import Client
client = Client(login='abcdef123456', password='abcdef123456')
New ticket
Create a new ticket in DutyCalls.
Return value
[
{
"id": 123,
"channel": "my-first-channel"
},
{
"id": 456,
"channel": "my-second-channel"
}
]
Example:
# This ticket is based on a default source, you might have to change the
# ticket according your own source mapping.
ticket = {
'title': 'My Test Ticket',
'body': 'This is an example',
}
# multiple channels are supported
channels = 'my-first-channel', 'my-second-channel'
await client.new_ticket(ticket=ticket, *channels)
Close ticket
Close a ticket in DutyCalls.
Return value
None
Example:
await client.close_ticket(ticket_id=123)
Unacknowledge ticket
Unacknowledge a ticket in DutyCalls.
Return value
None
Example:
await client.unacknowledge_ticket(ticket_id=123)
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
dutycalls_sdk-0.1.1.tar.gz
(4.0 kB
view hashes)