@@ -9,18 +9,18 @@ For protocol documentation of LiveChat APIs, please go to [Livechat Platform Doc
9
9
## Technical docs
10
10
11
11
Agent Chat API:
12
- * [ RTM API] ( https://livechat.github.io/lc-sdk-python/agent_rtm.html )
13
- * [ WEB API] ( https://livechat.github.io/lc-sdk-python/agent_web.html )
12
+ * [ RTM API] ( https://livechat.github.io/lc-sdk-python/agent_rtm/index .html )
13
+ * [ WEB API] ( https://livechat.github.io/lc-sdk-python/agent_web/index .html )
14
14
15
15
Customer Chat API:
16
- * [ RTM API] ( https://livechat.github.io/lc-sdk-python/customer_rtm.html )
17
- * [ WEB API] ( https://livechat.github.io/lc-sdk-python/customer_web.html )
16
+ * [ RTM API] ( https://livechat.github.io/lc-sdk-python/customer_rtm/index .html )
17
+ * [ WEB API] ( https://livechat.github.io/lc-sdk-python/customer_web/index .html )
18
18
19
19
Management:
20
- * [ Configuration API] ( https://livechat.github.io/lc-sdk-python/configuration_api .html )
20
+ * [ Configuration API] ( https://livechat.github.io/lc-sdk-python/configuration/index .html )
21
21
22
22
Reports:
23
- * [ Reports API] ( https://livechat.github.io/lc-sdk-python/reports_api .html )
23
+ * [ Reports API] ( https://livechat.github.io/lc-sdk-python/reports/index .html )
24
24
25
25
## Installation
26
26
@@ -32,91 +32,8 @@ pip install lc-sdk-python
32
32
33
33
## Usage
34
34
35
- ### Agent RTM API usage example
36
-
37
- Basic example on how to login as an agent and change routing status to ` not_accepting_chats ` .
38
-
39
- First, create your AgentRTM client and log in:
40
- ``` python
41
- >> > from livechat.agent import AgentRTM
42
- >> > my_agent = AgentRTM.get_client()
43
- >> > my_agent.login(token = ' Bearer <your bearer token>' )
44
- INFO :root:
45
- REQUEST :
46
- {
47
- " action" : " login" ,
48
- " payload" : {
49
- " token" : " Bearer <your bearer token>
50
- },
51
- " request_id" : " 5571081909"
52
- }
53
- INFO :root:
54
- RESPONSES :
55
- {
56
- " response" : {
57
- " request_id" : " 5571081909" ,
58
- " action" : " login" ,
59
- " type" : " response" ,
60
- " payload" : {
61
- ...
62
- },
63
- " success" : true
64
- },
65
- " pushes" : []
66
- }
67
- ```
68
-
69
- Now you can change the routing status of the agent:
70
-
71
- ``` python
72
- >> > my_agent.set_routing_status(status = ' not_accepting_chats' )
73
- INFO :root:
74
- REQUEST :
75
- {
76
- " action" : " set_routing_status" ,
77
- " payload" : {
78
- " status" : " not_accepting_chats"
79
- },
80
- " request_id" : " 8214452850"
81
- }
82
- INFO :root:
83
- RESPONSES :
84
- {
85
- " response" : {
86
- " request_id" : " 8214452850" ,
87
- " action" : " set_routing_status" ,
88
- " type" : " response" ,
89
- " payload" : {},
90
- " success" : true
91
- ...
92
- }
93
- }
94
- ```
95
-
96
- Finally, log out:
97
-
98
- ``` python
99
- >> > my_agent.logout()
100
- INFO :root:
101
- REQUEST :
102
- {
103
- " action" : " logout" ,
104
- " payload" : {},
105
- " request_id" : " 629300202"
106
- }
107
- INFO :root:
108
- RESPONSES :
109
- {
110
- " response" : {
111
- " request_id" : " 629300202" ,
112
- " action" : " logout" ,
113
- " type" : " response" ,
114
- " success" : true
115
- },
116
- " pushes" : []
117
- }
118
- ```
119
-
35
+ Usage examples can be found here:
36
+ [ examples] ( https://github.com/livechat/lc-sdk-python/tree/master/examples )
120
37
121
38
## Feedback
122
39
0 commit comments