Dixa Developer Kit for Python
Project description
Python Dixa SDK
A Python implementation of the Dixa API.
Installation
Install the package with pip
pip install dixa
Usage/Examples
Initialization
from dixa import DixaClient
client = DixaClient(api_key="<DIXA_API_KEY>")
Getting user data
# Get users by id, email or phone
user_by_id = client.get_end_users(user_id="abcd1234")
user_by_email = client.get_end_users(email="john.doe@example.com")
user_by_phone = client.get_end_users(phone_number="+447357000000")
# Get all users
all_users = client.get_all_end_users()
Upload bulk user data
from dixa import User, UserList
user1 = {
"displayName": "John Doe",
"email": "john.doe@example.com",
"middleNames": ["Bob", "Patrick"]
}
user2 = {
"givenName": "Juan",
"familyName": "Perez",
"displayName": "Juan Perez",
"phoneNumber": "+447777000000"
}
users = UserList(
data=[
User(**user1),
User(**user2)
]
)
client.post_end_users_bulk(user_list=users)
Create a Team
from dixa import Team
client.post_team(team=Team(name="New Team"))
Features
- Get users and agents by id, email or phone.
- Upload, patch and modify users and agents.
- Bulk upload of users.
- Get agents' presence.
- Activate and deactivate tags.
Ported Endpoints
Agents
-
GET /v1/agents/presence
-
GET /v1/agents/{agent_id}/teams
-
GET /v1/agents/{agent_id}/presence
-
POST /v1/agents/bulk
-
GET /v1/agents
-
PUT /v1/agents
-
POST /v1/agents
-
PATCH /v1/agents
-
GET /v1/agents/{agent_id}
-
PUT /v1/agents/{agent_id}
-
POST /v1/agents/{agent_id}
-
PATCH /v1/agents/{agent_id}
End Users
-
POST /v1/endusers/bulk
-
GET /v1/endusers/{user_id}
-
PATCH /v1/endusers/{user_id}
-
GET /v1/endusers
-
PUT /v1/endusers
-
POST /v1/endusers
-
PATCH /v1/endusers
-
PUT /v1/endusers/{enduser_id}
Teams
-
GET /v1/teams
-
POST /v1/teams
-
GET /v1/teams/{teamId}/agents
-
GET /v1/teams/{teamId}/presence
-
GET /v1/teams/{team_id}
-
DELETE /v1/teams/{team_id}
-
DELETE /v1/teams/{team_id}/agents
-
PATCH /v1/teams/{team_id}/agents
Conversations
-
PUT /v1/conversations/{conversationId}/close
-
PUT /v1/conversations/{conversationId}/reopen
-
PUT /v1/conversations/{conversationId}/transfer/queue
-
POST /v1/conversations/{conversationId}/notes/bulk
-
POST /v1/conversations/{conversationId}/notes
-
GET /v1/conversations/{csid}/rating
-
PUT /v1/conversations/{conversationId}/tags/{tagId}
-
DELETE /v1/conversations/{conversationId}/tags/{tagId}
-
GET /v1/conversations/{csid}/tags
-
POST /v1/conversations/{conversationId}/messages
-
POST /v1/conversations
-
PUT /v1/conversations/{conversationId}/claim
-
GET /v1/conversations/{csid}
-
GET /v1/conversations/{csid}/activitylog
-
GET /v1/conversations/activitylog
Queues
-
GET /v1/queues/{queue_id}/members
-
DELETE /v1/queues/{queueId}/members
-
PATCH /v1/queues/{queueId}/members
-
GET /v1/queues
-
POST /v1/queues
-
GET /v1/queues/{queue_id}
Tags
-
GET /v1/tags/{tagId}
-
GET /v1/tags
-
POST /v1/tags
-
PATCH/v1/tags/{tagId}/deactivate
-
PATCH /v1/tags/{tagId}/activate
Reference
History
v0.1.0
Added
- Dixa Client.
- Models:
User
,UserList
,Tag
,TagList
,Team
,TeamList
,Presence
,PresenceList
. - Methods:
get_end_users
get_all_end_users
post_end_user
post_end_users_bulk
put_end_user
patch_end_user
get_agents
get_all_agents
get_agents_presence
get_agent_teams
get_tags
patch_tag
get_teams
get_team_agents
get_team_presence
post_team
delete_team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dixa-0.1.0.tar.gz
(10.6 kB
view hashes)
Built Distribution
dixa-0.1.0-py3-none-any.whl
(9.8 kB
view hashes)