crisp-api 1.1.1 → 1.1.2
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/README.md +4 -2
- data/crisp-api.gemspec +1 -1
- data/lib/crisp-api.rb +1 -1
- data/lib/resources/website.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6da906fecbb573028bc50f9f5a6fdb1e7131b27
|
4
|
+
data.tar.gz: 8e46bdc80cd1ef7745771dd229e002a8989f49cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74f5276f53b7067db9de22764af31684333f0a20eeddac02608e8fc61b749e9e6e7b8f0854c153f617e7edb89aaf0c739cc85714f3a5d0cb14a748576365c58a
|
7
|
+
data.tar.gz: 87a91dabd071566909b030b59e79f4b3e99b6320060f6a6fb469260c26cbc26267397e24c2a0cd9624e31cf9e2699b04af2afe28f3effeb6b3e8253094388aba
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
The Crisp API Ruby wrapper. Authenticate, send messages, fetch conversations, access your agent accounts from your Ruby code.
|
4
4
|
|
5
|
-
Copyright
|
5
|
+
Copyright 2019 Crisp IM SARL. See LICENSE for copying information.
|
6
6
|
|
7
7
|
* **📝 Implements**: [Crisp Platform - API ~ v1](https://docs.crisp.chat/api/v1/) at reference revision: 12/31/2017
|
8
8
|
* **😘 Maintainer**: [@valeriansaliou](https://github.com/valeriansaliou)
|
@@ -114,7 +114,7 @@ client.website.send_message_in_conversation(
|
|
114
114
|
* **Check If People Profile Exists**: `client.website.check_people_profile_exists(website_id, people_id)`
|
115
115
|
* **Get People Profile**: `client.website.get_people_profile(website_id, people_id)`
|
116
116
|
* **Save People Profile**: `client.website.save_people_profile(website_id, people_id, data)`
|
117
|
-
* **Find People Profile By Email**: `find_people_profile_by_email(website_id, email)`
|
117
|
+
* **Find People Profile By Email**: `client.website.find_people_profile_by_email(website_id, email)`
|
118
118
|
* **Update People Profile**: `client.website.update_people_profile(website_id, people_id, data)`
|
119
119
|
* **Remove People Profile**: `client.website.remove_people_profile(website_id, people_id)`
|
120
120
|
* **List People Conversations**: `client.website.list_people_conversations(website_id, people_id, page_number)`
|
@@ -149,8 +149,10 @@ client.website.send_message_in_conversation(
|
|
149
149
|
* **Website Visitors**
|
150
150
|
* **Count Visitors**: `client.website.count_visitors(website_id)`
|
151
151
|
* **List Visitors**: `client.website.list_visitors(website_id, page_number)`
|
152
|
+
* **Get Session ID**: `client.website.get_session_id_from_token(website_id, token)`
|
152
153
|
|
153
154
|
### Bucket
|
154
155
|
|
155
156
|
* **Bucket URL**
|
156
157
|
* **Generate Bucket URL**: `client.bucket.generate_bucket_url(data)`
|
158
|
+
|
data/crisp-api.gemspec
CHANGED
data/lib/crisp-api.rb
CHANGED
data/lib/resources/website.rb
CHANGED
@@ -194,10 +194,7 @@ module Crisp
|
|
194
194
|
end
|
195
195
|
|
196
196
|
def find_people_profile_by_email(website_id, email)
|
197
|
-
|
198
|
-
profiles = @parent.get(self._url_website(website_id, "/people/profiles/1?search_filter=%s" % CGI.escape(filter.to_json)))
|
199
|
-
|
200
|
-
return profiles[0]
|
197
|
+
return @parent.get(self._url_people("profile", website_id, email, ""))
|
201
198
|
end
|
202
199
|
|
203
200
|
def get_people_profile(website_id, people_id)
|
@@ -243,5 +240,9 @@ module Crisp
|
|
243
240
|
def update_people_subscription_status(website_id, people_id, data)
|
244
241
|
return @parent.patch(self._url_people("subscription", website_id, people_id, ""), data: data)
|
245
242
|
end
|
243
|
+
|
244
|
+
def get_session_id_by_token(website_id, token)
|
245
|
+
return @parent.get(self._url_website(website_id, "/visitors/token/#{token}"))
|
246
|
+
end
|
246
247
|
end
|
247
248
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valerian Saliou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|