crisp-api 1.1.14 → 1.1.15
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 +4 -4
- data/EXAMPLES.md +38 -1
- data/README.md +47 -2
- data/crisp-api.gemspec +1 -1
- data/lib/crisp-api.rb +1 -1
- data/lib/resources/website.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ea957d41f04a13f55e6b8c731557315638c7577e74d91a1d67a22f0ccbda321
|
|
4
|
+
data.tar.gz: 6a38da7abf1935d09b6b869c6c283eab35a3b01959d8691095c3e61ccdf819fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09087cb53e56fec2f6d31ef8d8cc75c3162d223c5e2a37ad069d9c1d46fd3a27e8976ff77de9823ded58368bd799a0af812a521616adcd105f2c794f0b9e4e21'
|
|
7
|
+
data.tar.gz: 181c79e98278976708742ba5f2cf13606968a7d129372dc2e194b252dd1451162fe9d4d737a23d01bc0e3a7ae9a57a678d8fd4cb377bb6118cbcbce8540e6acd
|
data/EXAMPLES.md
CHANGED
|
@@ -554,6 +554,44 @@ client.website.batch_inbox_items(website_id, data);
|
|
|
554
554
|
|
|
555
555
|
=========================
|
|
556
556
|
|
|
557
|
+
https://docs.crisp.chat/references/rest-api/v1/#batch-data-items
|
|
558
|
+
|
|
559
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
|
560
|
+
|
|
561
|
+
data = {
|
|
562
|
+
"sessions" => [
|
|
563
|
+
"session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
|
|
564
|
+
"session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
|
565
|
+
],
|
|
566
|
+
"data" => {
|
|
567
|
+
"plan" => "pro",
|
|
568
|
+
"subscribed" => true
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
client.website.batch_data_items(website_id, data);
|
|
573
|
+
|
|
574
|
+
=========================
|
|
575
|
+
|
|
576
|
+
https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items
|
|
577
|
+
|
|
578
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
|
579
|
+
|
|
580
|
+
data = {
|
|
581
|
+
"sessions" => [
|
|
582
|
+
"session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
|
|
583
|
+
"session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
|
584
|
+
],
|
|
585
|
+
"segments" => [
|
|
586
|
+
"vip",
|
|
587
|
+
"lead"
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
client.website.batch_segments_items(website_id, data);
|
|
592
|
+
|
|
593
|
+
=========================
|
|
594
|
+
|
|
557
595
|
https://docs.crisp.chat/references/rest-api/v1/#get-website-availability-status
|
|
558
596
|
|
|
559
597
|
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
|
@@ -605,7 +643,6 @@ data = [
|
|
|
605
643
|
"emails" => [
|
|
606
644
|
"rating" => true,
|
|
607
645
|
"transcript" => true,
|
|
608
|
-
"enrich" => true,
|
|
609
646
|
"junk_filter" => true
|
|
610
647
|
],
|
|
611
648
|
"chatbox" => [
|
data/README.md
CHANGED
|
@@ -16,7 +16,7 @@ You may follow the [REST API Quickstart](https://docs.crisp.chat/guides/rest-api
|
|
|
16
16
|
Add the library to your `Gemfile`:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
gem "crisp-api", "~> 1.1.
|
|
19
|
+
gem "crisp-api", "~> 1.1.15"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Then, import it:
|
|
@@ -855,6 +855,52 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
855
855
|
```
|
|
856
856
|
</details>
|
|
857
857
|
|
|
858
|
+
* **Batch Data Items**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-data-items)
|
|
859
|
+
* `client.website.batch_data_items(website_id, data)`
|
|
860
|
+
* <details>
|
|
861
|
+
<summary>See Example</summary>
|
|
862
|
+
|
|
863
|
+
```ruby
|
|
864
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
|
865
|
+
|
|
866
|
+
data = {
|
|
867
|
+
"sessions" => [
|
|
868
|
+
"session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
|
|
869
|
+
"session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
|
870
|
+
],
|
|
871
|
+
"data" => {
|
|
872
|
+
"plan" => "pro",
|
|
873
|
+
"subscribed" => true
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
client.website.batch_data_items(website_id, data);
|
|
878
|
+
```
|
|
879
|
+
</details>
|
|
880
|
+
|
|
881
|
+
* **Batch Segments Items**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items)
|
|
882
|
+
* `client.website.batch_segments_items(website_id, data)`
|
|
883
|
+
* <details>
|
|
884
|
+
<summary>See Example</summary>
|
|
885
|
+
|
|
886
|
+
```ruby
|
|
887
|
+
website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
|
|
888
|
+
|
|
889
|
+
data = {
|
|
890
|
+
"sessions" => [
|
|
891
|
+
"session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
|
|
892
|
+
"session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
|
|
893
|
+
],
|
|
894
|
+
"segments" => [
|
|
895
|
+
"vip",
|
|
896
|
+
"lead"
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
client.website.batch_segments_items(website_id, data);
|
|
901
|
+
```
|
|
902
|
+
</details>
|
|
903
|
+
|
|
858
904
|
|
|
859
905
|
* **Website Availability**
|
|
860
906
|
* **Get Website Availability Status**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-website-availability-status)
|
|
@@ -932,7 +978,6 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
932
978
|
"emails" => [
|
|
933
979
|
"rating" => true,
|
|
934
980
|
"transcript" => true,
|
|
935
|
-
"enrich" => true,
|
|
936
981
|
"junk_filter" => true
|
|
937
982
|
],
|
|
938
983
|
"chatbox" => [
|
data/crisp-api.gemspec
CHANGED
data/lib/crisp-api.rb
CHANGED
data/lib/resources/website.rb
CHANGED
|
@@ -107,6 +107,14 @@ module Crisp
|
|
|
107
107
|
return @parent.patch(self._url_website(website_id, "/batch/inbox"), data: data)
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
+
def batch_data_items(website_id, data)
|
|
111
|
+
return @parent.patch(self._url_website(website_id, "/batch/data"), data: data)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def batch_segments_items(website_id, data)
|
|
115
|
+
return @parent.patch(self._url_website(website_id, "/batch/segments"), data: data)
|
|
116
|
+
end
|
|
117
|
+
|
|
110
118
|
def get_website_availability_status(website_id)
|
|
111
119
|
return @parent.get(self._url_website(website_id, "/availability/status"))
|
|
112
120
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crisp-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Valerian Saliou
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|