crisp-api 1.1.2 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/EXAMPLES.md +577 -0
- data/README.md +809 -69
- data/crisp-api.gemspec +7 -7
- data/examples/website_send_message_in_conversation.rb +2 -2
- data/lib/crisp-api.rb +12 -6
- data/lib/resources/bucket.rb +1 -1
- data/lib/resources/website.rb +67 -24
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 67123868f362fec018c3fa0fdd7b7aac68d89c3c2f564ca8567166e28c43046b
|
4
|
+
data.tar.gz: 88fda25dbedf1f0e7af45e63e61cf3395164f978a54dbbc3866594e8b6073f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6dae8693f940577f1d2af31425298bacf0bd18d38e70d8cf85ccfd204b713cfab3be253b0e8d886061d6ce55d530724ba6f5142bcbafac401599304f7750068
|
7
|
+
data.tar.gz: be85d3d8b15ecee2d6cc624781fe9c1ac1c627b757a4e0dc7a9b8757367c8e87d0093b09e717bff11e35959104944acfac448e6b8db2bb2566f9416baf86ae2f
|
data/EXAMPLES.md
ADDED
@@ -0,0 +1,577 @@
|
|
1
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-conversations
|
2
|
+
|
3
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
4
|
+
page_number = 1
|
5
|
+
|
6
|
+
client.website.list_conversations(website_id, page_number);
|
7
|
+
|
8
|
+
=========================
|
9
|
+
|
10
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-conversations
|
11
|
+
|
12
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
13
|
+
page_number = 1
|
14
|
+
|
15
|
+
client.website.search_conversations(website_id, page_number, search_query, search_type, search_operator, include_empty, filter_unread, filter_resolved, filter_not_resolved, filter_mention, filter_assigned, filter_unassigned, filter_date_start, filter_date_end, order_date_created", order_date_updated);
|
16
|
+
|
17
|
+
=========================
|
18
|
+
|
19
|
+
https://docs.crisp.chat/references/rest-api/v1/#create-a-new-conversation
|
20
|
+
|
21
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
22
|
+
|
23
|
+
client.website.create_new_conversation(website_id);
|
24
|
+
|
25
|
+
=========================
|
26
|
+
|
27
|
+
https://docs.crisp.chat/references/rest-api/v1/#check-if-conversation-exists
|
28
|
+
|
29
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
30
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
31
|
+
|
32
|
+
client.website.check_conversation_exists(website_id, session_id);
|
33
|
+
|
34
|
+
=========================
|
35
|
+
|
36
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-a-conversation
|
37
|
+
|
38
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
39
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
40
|
+
|
41
|
+
client.website.get_conversation(website_id, session_id);
|
42
|
+
|
43
|
+
=========================
|
44
|
+
|
45
|
+
https://docs.crisp.chat/references/rest-api/v1/#remove-a-conversation
|
46
|
+
|
47
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
48
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
49
|
+
|
50
|
+
client.website.remove_conversation(website_id, session_id);
|
51
|
+
|
52
|
+
=========================
|
53
|
+
|
54
|
+
https://docs.crisp.chat/references/rest-api/v1/#initiate-a-conversation-with-existing-session
|
55
|
+
|
56
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
57
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
58
|
+
|
59
|
+
client.website.initiate_conversation_with_existing_session(website_id, session_id);
|
60
|
+
|
61
|
+
=========================
|
62
|
+
|
63
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-messages-in-conversation
|
64
|
+
|
65
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
66
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
67
|
+
|
68
|
+
client.website.get_messages_in_conversation(website_id, session_id, query);
|
69
|
+
|
70
|
+
=========================
|
71
|
+
|
72
|
+
https://docs.crisp.chat/references/rest-api/v1/#send-a-message-in-conversation
|
73
|
+
|
74
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
75
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
76
|
+
|
77
|
+
query = [
|
78
|
+
"type" => "text",
|
79
|
+
"from" => "operator",
|
80
|
+
"origin" => "chat",
|
81
|
+
"content" => "Hey there! Need help?"
|
82
|
+
]
|
83
|
+
|
84
|
+
client.website.send_message_in_conversation(website_id, session_id, query);
|
85
|
+
|
86
|
+
=========================
|
87
|
+
|
88
|
+
https://docs.crisp.chat/references/rest-api/v1/#update-a-message-in-conversation
|
89
|
+
|
90
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
91
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
92
|
+
fingerprint = 524653764345
|
93
|
+
|
94
|
+
data = "Hey there! Need help?"
|
95
|
+
|
96
|
+
client.website.update_message_in_conversation(website_id, session_id, fingerprint, data);
|
97
|
+
|
98
|
+
=========================
|
99
|
+
|
100
|
+
https://docs.crisp.chat/references/rest-api/v1/#compose-a-message-in-conversation
|
101
|
+
|
102
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
103
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
104
|
+
|
105
|
+
data = [
|
106
|
+
"type" => "start",
|
107
|
+
"from" => "operator"
|
108
|
+
]
|
109
|
+
|
110
|
+
client.website.compose_message_in_conversation(website_id, session_id, data);
|
111
|
+
|
112
|
+
=========================
|
113
|
+
|
114
|
+
https://docs.crisp.chat/references/rest-api/v1/#mark-messages-as-read-in-conversation
|
115
|
+
|
116
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
117
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
118
|
+
|
119
|
+
data = [
|
120
|
+
"from" => "operator",
|
121
|
+
"origin" => "urn:crisp.im:slack:0",
|
122
|
+
"fingerprints" => [
|
123
|
+
"5719231201"
|
124
|
+
]
|
125
|
+
]
|
126
|
+
|
127
|
+
client.website.mark_messages_read_in_conversation(website_id, session_id, data);
|
128
|
+
|
129
|
+
=========================
|
130
|
+
|
131
|
+
https://docs.crisp.chat/references/rest-api/v1/#mark-messages-as-delivered-in-conversation
|
132
|
+
|
133
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
134
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
135
|
+
|
136
|
+
data = [
|
137
|
+
"from" => "operator",
|
138
|
+
"origin" => "urn:crisp.im:slack:0",
|
139
|
+
"fingerprints" => [
|
140
|
+
"5719231201"
|
141
|
+
]
|
142
|
+
]
|
143
|
+
|
144
|
+
client.website.mark_messages_delivered_in_conversation(website_id, session_id, data);
|
145
|
+
|
146
|
+
=========================
|
147
|
+
|
148
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-conversation-routing-assign
|
149
|
+
|
150
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
151
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
152
|
+
|
153
|
+
client.website.get_conversation_routing_assign(website_id, session_id);
|
154
|
+
|
155
|
+
=========================
|
156
|
+
|
157
|
+
https://docs.crisp.chat/references/rest-api/v1/#assign-conversation-routing
|
158
|
+
|
159
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
160
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
161
|
+
|
162
|
+
data = [
|
163
|
+
"assigned" => [
|
164
|
+
"user_id" => "a4c32c68-be91-4e29-8a05-976e93abbe3f"
|
165
|
+
]
|
166
|
+
]
|
167
|
+
|
168
|
+
client.website.assign_conversation_routing(website_id, session_id, data);
|
169
|
+
|
170
|
+
=========================
|
171
|
+
|
172
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-conversation-metas
|
173
|
+
|
174
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
175
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
176
|
+
|
177
|
+
client.website.get_conversation_metas(website_id, session_id);
|
178
|
+
|
179
|
+
=========================
|
180
|
+
|
181
|
+
https://docs.crisp.chat/references/rest-api/v1/#update-conversation-metas
|
182
|
+
|
183
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
184
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
185
|
+
|
186
|
+
data = [
|
187
|
+
"nickname" => "John Doe",
|
188
|
+
"email" => "john.doe@acme-inc.com",
|
189
|
+
"segments" => [
|
190
|
+
"happy",
|
191
|
+
"customer",
|
192
|
+
"love"
|
193
|
+
],
|
194
|
+
"data" => [
|
195
|
+
"type" => "customer",
|
196
|
+
"signup" => "finished"
|
197
|
+
]
|
198
|
+
]
|
199
|
+
|
200
|
+
client.website.update_conversation_metas(website_id, session_id, data);
|
201
|
+
|
202
|
+
=========================
|
203
|
+
|
204
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-conversation-pages
|
205
|
+
|
206
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
207
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
208
|
+
page_number = 1
|
209
|
+
|
210
|
+
client.website.list_conversation_pages(website_id, session_id, page_number);
|
211
|
+
|
212
|
+
=========================
|
213
|
+
|
214
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-conversation-events
|
215
|
+
|
216
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
217
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
218
|
+
page_number = 1
|
219
|
+
|
220
|
+
client.website.list_conversation_events(website_id, session_id, page_number);
|
221
|
+
|
222
|
+
=========================
|
223
|
+
|
224
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-conversation-state
|
225
|
+
|
226
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
227
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
228
|
+
|
229
|
+
client.website.get_conversation_state(website_id, session_id);
|
230
|
+
|
231
|
+
=========================
|
232
|
+
|
233
|
+
https://docs.crisp.chat/references/rest-api/v1/#change-conversation-state
|
234
|
+
|
235
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
236
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
237
|
+
|
238
|
+
data = "unresolved"
|
239
|
+
|
240
|
+
client.website.change_conversation_state(website_id, session_id, data);
|
241
|
+
|
242
|
+
=========================
|
243
|
+
|
244
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-block-status-for-conversation
|
245
|
+
|
246
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
247
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
248
|
+
|
249
|
+
client.website.get_block_status_for_conversation(website_id, session_id);
|
250
|
+
|
251
|
+
=========================
|
252
|
+
|
253
|
+
https://docs.crisp.chat/references/rest-api/v1/#block-incoming-messages-for-conversation
|
254
|
+
|
255
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
256
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
257
|
+
|
258
|
+
data = true
|
259
|
+
|
260
|
+
client.website.block_incoming_messages_for_conversation(website_id, session_id, data);
|
261
|
+
|
262
|
+
=========================
|
263
|
+
|
264
|
+
https://docs.crisp.chat/references/rest-api/v1/#request-email-transcript-for-conversation
|
265
|
+
|
266
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
267
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
268
|
+
|
269
|
+
data = [
|
270
|
+
"to" => "operator",
|
271
|
+
"email" => "valerian@crisp.chat"
|
272
|
+
]
|
273
|
+
|
274
|
+
client.website.request_email_transcript_for_conversation(website_id, session_id, data);
|
275
|
+
|
276
|
+
=========================
|
277
|
+
|
278
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-people-statistics
|
279
|
+
|
280
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
281
|
+
|
282
|
+
client.website.get_people_statistics(website_id);
|
283
|
+
|
284
|
+
=========================
|
285
|
+
|
286
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-suggested-people-segments
|
287
|
+
|
288
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
289
|
+
page_number = 1
|
290
|
+
|
291
|
+
client.website.list_people_segments(website_id, page_number);
|
292
|
+
|
293
|
+
=========================
|
294
|
+
|
295
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-people-profiles
|
296
|
+
|
297
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
298
|
+
page_number = 1
|
299
|
+
|
300
|
+
client.website.list_people_profiles(website_id, page_number);
|
301
|
+
|
302
|
+
=========================
|
303
|
+
|
304
|
+
https://docs.crisp.chat/references/rest-api/v1/#add-new-people-profile
|
305
|
+
|
306
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
307
|
+
|
308
|
+
data = [
|
309
|
+
"email" => "valerian@crisp.chat",
|
310
|
+
"person" => [
|
311
|
+
"nickname" => "Valerian Saliou"
|
312
|
+
]
|
313
|
+
]
|
314
|
+
|
315
|
+
client.website.add_new_people_profile(website_id, data);
|
316
|
+
|
317
|
+
=========================
|
318
|
+
|
319
|
+
https://docs.crisp.chat/references/rest-api/v1/#check-if-people-profile-exists
|
320
|
+
|
321
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
322
|
+
people_id = "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
|
323
|
+
|
324
|
+
client.website.check_people_profile_exists(website_id, people_id);
|
325
|
+
|
326
|
+
=========================
|
327
|
+
|
328
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-people-profile
|
329
|
+
|
330
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
331
|
+
people_id = "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
|
332
|
+
|
333
|
+
client.website.get_people_profile(website_id, people_id);
|
334
|
+
|
335
|
+
=========================
|
336
|
+
|
337
|
+
https://docs.crisp.chat/references/rest-api/v1/#save-people-profile
|
338
|
+
|
339
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
340
|
+
people_id = "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
|
341
|
+
|
342
|
+
data = [
|
343
|
+
"email" => "valerian@crisp.chat",
|
344
|
+
"person" => [
|
345
|
+
"nickname" => "Valerian Saliou"
|
346
|
+
]
|
347
|
+
]
|
348
|
+
|
349
|
+
client.website.save_people_profile(website_id, people_id, data);
|
350
|
+
|
351
|
+
=========================
|
352
|
+
|
353
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-people-profile
|
354
|
+
|
355
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
356
|
+
|
357
|
+
client.website.find_people_profile_by_email(website_id, email);
|
358
|
+
|
359
|
+
=========================
|
360
|
+
|
361
|
+
https://docs.crisp.chat/references/rest-api/v1/#update-people-profile
|
362
|
+
|
363
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
364
|
+
people_id = "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
|
365
|
+
|
366
|
+
data = [
|
367
|
+
"email" => "valerian@crisp.chat",
|
368
|
+
"person" => [
|
369
|
+
"nickname" => "Valerian Saliou"
|
370
|
+
]
|
371
|
+
]
|
372
|
+
|
373
|
+
client.website.update_people_profile(website_id, people_id, data);
|
374
|
+
|
375
|
+
=========================
|
376
|
+
|
377
|
+
https://docs.crisp.chat/references/rest-api/v1/#remove-people-profile
|
378
|
+
|
379
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
380
|
+
people_id = "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
|
381
|
+
|
382
|
+
client.website.remove_people_profile(website_id, people_id);
|
383
|
+
|
384
|
+
=========================
|
385
|
+
|
386
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-people-conversations
|
387
|
+
|
388
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
389
|
+
people_id = "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
|
390
|
+
page_number = 1
|
391
|
+
|
392
|
+
client.website.list_people_conversations(website_id, people_id, page_number);
|
393
|
+
|
394
|
+
=========================
|
395
|
+
|
396
|
+
https://docs.crisp.chat/references/rest-api/v1/#create-website
|
397
|
+
|
398
|
+
client.website.create_website(data);
|
399
|
+
|
400
|
+
=========================
|
401
|
+
|
402
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-a-website
|
403
|
+
|
404
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
405
|
+
|
406
|
+
client.website.get_website(website_id);
|
407
|
+
|
408
|
+
=========================
|
409
|
+
|
410
|
+
https://docs.crisp.chat/references/rest-api/v1/#delete-a-website
|
411
|
+
|
412
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
413
|
+
|
414
|
+
client.website.delete_website(website_id);
|
415
|
+
|
416
|
+
=========================
|
417
|
+
|
418
|
+
https://docs.crisp.chat/references/rest-api/v1/#batch-resolve-items
|
419
|
+
|
420
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
421
|
+
|
422
|
+
client.website.batch_resolve_items(website_id, data);
|
423
|
+
|
424
|
+
=========================
|
425
|
+
|
426
|
+
https://docs.crisp.chat/references/rest-api/v1/#batch-read-items
|
427
|
+
|
428
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
429
|
+
|
430
|
+
client.website.batch_read_items(website_id, data);
|
431
|
+
|
432
|
+
=========================
|
433
|
+
|
434
|
+
https://docs.crisp.chat/references/rest-api/v1/#batch-remove-items
|
435
|
+
|
436
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
437
|
+
|
438
|
+
data = [
|
439
|
+
"session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
|
440
|
+
"session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
441
|
+
]
|
442
|
+
|
443
|
+
client.website.batch_remove_items(website_id, data);
|
444
|
+
|
445
|
+
=========================
|
446
|
+
|
447
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-website-availability-status
|
448
|
+
|
449
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
450
|
+
|
451
|
+
client.website.get_website_availability_status(website_id);
|
452
|
+
|
453
|
+
=========================
|
454
|
+
|
455
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-website-operators
|
456
|
+
|
457
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
458
|
+
|
459
|
+
client.website.list_website_operators(website_id);
|
460
|
+
|
461
|
+
=========================
|
462
|
+
|
463
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-last-active-website-operators
|
464
|
+
|
465
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
466
|
+
|
467
|
+
client.website.list_last_active_website_operators(website_id);
|
468
|
+
|
469
|
+
=========================
|
470
|
+
|
471
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-website-settings
|
472
|
+
|
473
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
474
|
+
|
475
|
+
client.website.get_website_settings(website_id);
|
476
|
+
|
477
|
+
=========================
|
478
|
+
|
479
|
+
https://docs.crisp.chat/references/rest-api/v1/#update-website-settings
|
480
|
+
|
481
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
482
|
+
|
483
|
+
data = [
|
484
|
+
"name" => "Crisp",
|
485
|
+
"domain" => "crisp.chat",
|
486
|
+
"logo" => "https://storage.crisp.chat/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/b6c2948d-b061-405e-91a9-2fdf855d1cc0.png",
|
487
|
+
"contact" => [
|
488
|
+
"email" => "contact@crisp.chat",
|
489
|
+
"phone" => "+33757905447"
|
490
|
+
],
|
491
|
+
"inbox" => [
|
492
|
+
"lock_removal" => false,
|
493
|
+
"force_operator_token" => false
|
494
|
+
],
|
495
|
+
"emails" => [
|
496
|
+
"rating" => true,
|
497
|
+
"transcript" => true,
|
498
|
+
"enrich" => true,
|
499
|
+
"junk_filter" => true
|
500
|
+
],
|
501
|
+
"chatbox" => [
|
502
|
+
"tile" => "default",
|
503
|
+
"wait_game" => false,
|
504
|
+
"last_operator_face" => false,
|
505
|
+
"ongoing_operator_face" => true,
|
506
|
+
"activity_metrics" => true,
|
507
|
+
"operator_privacy" => false,
|
508
|
+
"availability_tooltip" => true,
|
509
|
+
"hide_vacation" => false,
|
510
|
+
"hide_on_away" => false,
|
511
|
+
"hide_on_mobile" => false,
|
512
|
+
"position_reverse" => false,
|
513
|
+
"email_visitors" => false,
|
514
|
+
"phone_visitors" => false,
|
515
|
+
"force_identify" => false,
|
516
|
+
"ignore_privacy" => false,
|
517
|
+
"visitor_compose" => false,
|
518
|
+
"file_transfer" => true,
|
519
|
+
"helpdesk_link" => true,
|
520
|
+
"status_health_dead" => true,
|
521
|
+
"check_domain" => false,
|
522
|
+
"color_theme" => "blue",
|
523
|
+
"text_theme" => "default",
|
524
|
+
"welcome_message" => "default",
|
525
|
+
"locale" => "en",
|
526
|
+
"allowed_pages" => [],
|
527
|
+
"blocked_pages" => [
|
528
|
+
"status/*/",
|
529
|
+
"docs.crisp.chat/*",
|
530
|
+
"crisp.chat/terms/",
|
531
|
+
"https://crisp.chat/privacy/"
|
532
|
+
],
|
533
|
+
"blocked_countries" => [
|
534
|
+
"IT"
|
535
|
+
],
|
536
|
+
"blocked_locales" => [
|
537
|
+
"fa",
|
538
|
+
"he"
|
539
|
+
],
|
540
|
+
"blocked_ips" => [
|
541
|
+
"8.8.8.8",
|
542
|
+
"2001:0db8:85a3:0000:0000:8a2e:0370:7334",
|
543
|
+
"192.168.1.1/24"
|
544
|
+
]
|
545
|
+
]
|
546
|
+
]
|
547
|
+
|
548
|
+
client.website.update_website_settings(website_id, data);
|
549
|
+
|
550
|
+
=========================
|
551
|
+
|
552
|
+
https://docs.crisp.chat/references/rest-api/v1/#count-visitors
|
553
|
+
|
554
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
555
|
+
|
556
|
+
client.website.count_visitors(website_id);
|
557
|
+
|
558
|
+
=========================
|
559
|
+
|
560
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-visitors
|
561
|
+
|
562
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
563
|
+
page_number = 1
|
564
|
+
|
565
|
+
client.website.list_visitors(website_id, page_number);
|
566
|
+
|
567
|
+
=========================
|
568
|
+
|
569
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-session-identifier-from-token
|
570
|
+
|
571
|
+
session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
572
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
573
|
+
|
574
|
+
client.website.get_session_id_by_token(website_id, token);
|
575
|
+
|
576
|
+
=========================
|
577
|
+
|