crisp-api 1.0.3 → 1.0.4
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 +66 -65
- data/crisp-api.gemspec +1 -1
- data/lib/crisp-api.rb +1 -1
- data/lib/resources/website.rb +7 -0
- 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: 2c5521904044f6743dfd77b88bba0e920201f5c4
|
4
|
+
data.tar.gz: 235b04eea4252238684644fa98a7ca98beb3d1a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46c8dd1e093a0b4919b1a59a447191cee259fe034f697fdd3c0df4f34b655164bf1074eb853d7d958f9b427f290d607cc6705a72e3293587c5a02b42a52c7d88
|
7
|
+
data.tar.gz: b3c9207ffe68d51e78ea15572e34bd7078096b3b4f266ec5daa367c4d18e4589398f66373b542ea3be63b1e81f2fd29e689365395f856040cf133503cf447a07
|
data/README.md
CHANGED
@@ -84,102 +84,103 @@ client.website.send_message_in_conversation(
|
|
84
84
|
### Website
|
85
85
|
|
86
86
|
* **Website Conversations**
|
87
|
-
* **List Conversations**: `client.website.list_conversations`
|
87
|
+
* **List Conversations**: `client.website.list_conversations(website_id, page_number)`
|
88
88
|
|
89
89
|
* **Website Conversation**
|
90
|
-
* **Create A New Conversation**: `client.website.create_new_conversation`
|
91
|
-
* **Check If Conversation Exists**: `client.website.check_conversation_exists`
|
92
|
-
* **Get A Conversation**: `client.website.get_conversation`
|
93
|
-
* **Remove A Conversation**: `client.website.remove_conversation`
|
94
|
-
* **Initiate A Conversation With Existing Session**: `client.website.initiate_conversation_with_existing_session`
|
95
|
-
* **Get Messages In Conversation**: `client.website.get_messages_in_conversation`
|
96
|
-
* **Send A Message In Conversation**: `client.website.send_message_in_conversation`
|
97
|
-
* **Update A Message In Conversation**: `client.website.update_message_in_conversation`
|
98
|
-
* **Compose A Message In Conversation**: `client.website.compose_message_in_conversation`
|
99
|
-
* **Mark Messages As Read In Conversation**: `client.website.mark_messages_read_in_conversation`
|
100
|
-
* **Mark Messages As Delivered In Conversation**: `client.website.mark_messages_delivered_in_conversation`
|
101
|
-
* **Get Conversation Routing Assign**: `client.website.get_conversation_routing_assign`
|
102
|
-
* **Assign Conversation Routing**: `client.website.assign_conversation_routing`
|
103
|
-
* **Get Conversation Metas**: `client.website.get_conversation_metas`
|
104
|
-
* **Update Conversation Metas**: `client.website.update_conversation_metas`
|
105
|
-
* **List Conversation Pages**: `client.website.list_conversation_pages`
|
106
|
-
* **List Conversation Events**: `client.website.list_conversation_events`
|
107
|
-
* **Get Conversation State**: `client.website.get_conversation_state`
|
108
|
-
* **Change Conversation State**: `client.website.change_conversation_state`
|
109
|
-
* **Get Block Status For Conversation**: `client.website.get_block_status_for_conversation`
|
110
|
-
* **Block Incoming Messages For Conversation**: `client.website.block_incoming_messages_for_conversation`
|
111
|
-
* **Request Email Transcript For Conversation**: `client.website.request_email_transcript_for_conversation`
|
90
|
+
* **Create A New Conversation**: `client.website.create_new_conversation(website_id, data)`
|
91
|
+
* **Check If Conversation Exists**: `client.website.check_conversation_exists(website_id, session_id)`
|
92
|
+
* **Get A Conversation**: `client.website.get_conversation(website_id, session_id)`
|
93
|
+
* **Remove A Conversation**: `client.website.remove_conversation(website_id, session_id)`
|
94
|
+
* **Initiate A Conversation With Existing Session**: `client.website.initiate_conversation_with_existing_session(website_id, session_id)`
|
95
|
+
* **Get Messages In Conversation**: `client.website.get_messages_in_conversation(website_id, session_id, query)`
|
96
|
+
* **Send A Message In Conversation**: `client.website.send_message_in_conversation(website_id, session_id, query)`
|
97
|
+
* **Update A Message In Conversation**: `client.website.update_message_in_conversation(website_id, session_id, fingerprint, data)`
|
98
|
+
* **Compose A Message In Conversation**: `client.website.compose_message_in_conversation(website_id, session_id, data)`
|
99
|
+
* **Mark Messages As Read In Conversation**: `client.website.mark_messages_read_in_conversation(website_id, session_id, data)`
|
100
|
+
* **Mark Messages As Delivered In Conversation**: `client.website.mark_messages_delivered_in_conversation(website_id, session_id, data)`
|
101
|
+
* **Get Conversation Routing Assign**: `client.website.get_conversation_routing_assign(website_id, session_id)`
|
102
|
+
* **Assign Conversation Routing**: `client.website.assign_conversation_routing(website_id, session_id, data)`
|
103
|
+
* **Get Conversation Metas**: `client.website.get_conversation_metas(website_id, session_id)`
|
104
|
+
* **Update Conversation Metas**: `client.website.update_conversation_metas(website_id, session_id, data)`
|
105
|
+
* **List Conversation Pages**: `client.website.list_conversation_pages(website_id, session_id, page_number)`
|
106
|
+
* **List Conversation Events**: `client.website.list_conversation_events(website_id, session_id, page_number)`
|
107
|
+
* **Get Conversation State**: `client.website.get_conversation_state(website_id, session_id)`
|
108
|
+
* **Change Conversation State**: `client.website.change_conversation_state(website_id, session_id, data)`
|
109
|
+
* **Get Block Status For Conversation**: `client.website.get_block_status_for_conversation(website_id, session_id)`
|
110
|
+
* **Block Incoming Messages For Conversation**: `client.website.block_incoming_messages_for_conversation(website_id, session_id, data)`
|
111
|
+
* **Request Email Transcript For Conversation**: `client.website.request_email_transcript_for_conversation(website_id, session_id, data)`
|
112
112
|
|
113
113
|
* **Website People**
|
114
|
-
* **Get People Statistics**: `client.website.get_people_statistics`
|
115
|
-
* **List People Segments**: `client.website.list_people_segments`
|
116
|
-
* **List People Profiles**: `client.website.list_people_profiles`
|
117
|
-
* **Add New People Profile**: `client.website.add_new_people_profile`
|
118
|
-
* **Check If People Profile Exists**: `client.website.check_people_profile_exists`
|
119
|
-
* **Get People Profile**: `client.website.get_people_profile`
|
120
|
-
* **Save People Profile**: `client.website.save_people_profile`
|
121
|
-
* **
|
122
|
-
* **
|
123
|
-
* **
|
124
|
-
|
125
|
-
+ **
|
126
|
-
+ **
|
127
|
-
+ **
|
128
|
-
+ **
|
129
|
-
+ **
|
114
|
+
* **Get People Statistics**: `client.website.get_people_statistics(website_id)`
|
115
|
+
* **List People Segments**: `client.website.list_people_segments(website_id, page_number)`
|
116
|
+
* **List People Profiles**: `client.website.list_people_profiles(website_id, page_number)`
|
117
|
+
* **Add New People Profile**: `client.website.add_new_people_profile(website_id, data)`
|
118
|
+
* **Check If People Profile Exists**: `client.website.check_people_profile_exists(website_id, people_id)`
|
119
|
+
* **Get People Profile**: `client.website.get_people_profile(website_id, people_id)`
|
120
|
+
* **Save People Profile**: `client.website.save_people_profile(website_id, people_id, data)`
|
121
|
+
* **Find People Profile By Email**: `find_people_profile_by_email(website_id, email)`
|
122
|
+
* **Update People Profile**: `client.website.update_people_profile(website_id, people_id, data)`
|
123
|
+
* **Remove People Profile**: `client.website.remove_people_profile(website_id, people_id)`
|
124
|
+
* **List People Conversations**: `client.website.list_people_conversations(website_id, people_id, page_number)`
|
125
|
+
+ **Add A People Event**: `client.website.add_people_event(website_id, people_id, data)`
|
126
|
+
+ **List People Events**: `client.website.list_people_events(website_id, people_id, page_number)`
|
127
|
+
+ **Get People Data**: `client.website.get_people_data(website_id, people_id)`
|
128
|
+
+ **Save People Data**: `client.website.save_people_data(website_id, people_id, data)`
|
129
|
+
+ **Get People Subscription Status**: `client.website.get_people_subscription_status(website_id, people_id)`
|
130
|
+
+ **Update People Subscription Status**: `client.website.update_people_subscription_status(website_id, people_id, data)`
|
130
131
|
|
131
132
|
* **Website Base**
|
132
|
-
* **Create Website**: `client.website.create_website`
|
133
|
-
* **Get A Website**: `client.website.get_website`
|
134
|
-
* **Delete A Website**: `client.website.delete_website`
|
133
|
+
* **Create Website**: `client.website.create_website(data)`
|
134
|
+
* **Get A Website**: `client.website.get_website(website_id)`
|
135
|
+
* **Delete A Website**: `client.website.delete_website(website_id)`
|
135
136
|
|
136
137
|
* **Website Batch**
|
137
|
-
* **Batch Resolve Items**: `client.website.batch_resolve_items`
|
138
|
-
* **Batch Read Items**: `client.website.batch_read_items`
|
139
|
-
* **Batch Remove Items**: `client.website.batch_remove_items`
|
138
|
+
* **Batch Resolve Items**: `client.website.batch_resolve_items(website_id, data)`
|
139
|
+
* **Batch Read Items**: `client.website.batch_read_items(website_id, data)`
|
140
|
+
* **Batch Remove Items**: `client.website.batch_remove_items(website_id, data)`
|
140
141
|
|
141
142
|
* **Website Availability**
|
142
|
-
* **Get Website Availability Status**: `client.website.get_website_availability_status`
|
143
|
+
* **Get Website Availability Status**: `client.website.get_website_availability_status(website_id)`
|
143
144
|
|
144
145
|
* **Website Operator**
|
145
|
-
* **List Website Operators**: `client.website.list_website_operators`
|
146
|
-
* **List Last Active Website Operators**: `client.website.list_last_active_website_operators`
|
146
|
+
* **List Website Operators**: `client.website.list_website_operators(website_id)`
|
147
|
+
* **List Last Active Website Operators**: `client.website.list_last_active_website_operators(website_id)`
|
147
148
|
|
148
149
|
* **Website Settings**
|
149
|
-
* **Get Website Settings**: `client.website.get_website_settings`
|
150
|
-
* **Update Website Settings**: `client.website.update_website_settings`
|
150
|
+
* **Get Website Settings**: `client.website.get_website_settings(website_id)`
|
151
|
+
* **Update Website Settings**: `client.website.update_website_settings(website_id, data)`
|
151
152
|
|
152
153
|
* **Website Visitors**
|
153
|
-
* **Count Visitors**: `client.website.count_visitors`
|
154
|
-
* **List Visitors**: `client.website.list_visitors`
|
154
|
+
* **Count Visitors**: `client.website.count_visitors(website_id)`
|
155
|
+
* **List Visitors**: `client.website.list_visitors(website_id, page_number)`
|
155
156
|
|
156
157
|
### Bucket
|
157
158
|
|
158
159
|
* **Bucket URL**
|
159
|
-
* **Generate Bucket URL**: `client.bucket.generate_bucket_url`
|
160
|
+
* **Generate Bucket URL**: `client.bucket.generate_bucket_url(data)`
|
160
161
|
|
161
162
|
### User
|
162
163
|
|
163
164
|
* **User Availability**
|
164
|
-
* **Get User Availability**: `client.user.get_user_availability`
|
165
|
-
* **Update User Availability**: `client.user.update_user_availability`
|
166
|
-
* **Get User Availability Status**: `client.user.get_user_availability_status`
|
165
|
+
* **Get User Availability**: `client.user.get_user_availability()`
|
166
|
+
* **Update User Availability**: `client.user.update_user_availability(data)`
|
167
|
+
* **Get User Availability Status**: `client.user.get_user_availability_status()`
|
167
168
|
|
168
169
|
* **User Account Base**
|
169
|
-
* **Get User Account**: `client.user.get_user_account`
|
170
|
-
* **Create User Account**: `client.user.create_user_account`
|
170
|
+
* **Get User Account**: `client.user.get_user_account()`
|
171
|
+
* **Create User Account**: `client.user.create_user_account(data)`
|
171
172
|
|
172
173
|
* **User Account Websites**
|
173
|
-
* **List Websites**: `client.user.list_websites`
|
174
|
+
* **List Websites**: `client.user.list_websites()`
|
174
175
|
|
175
176
|
* **User Account Profile**
|
176
|
-
* **Get Profile**: `client.user.get_profile`
|
177
|
-
* **Update Profile**: `client.user.update_profile`
|
177
|
+
* **Get Profile**: `client.user.get_profile()`
|
178
|
+
* **Update Profile**: `client.user.update_profile(data)`
|
178
179
|
|
179
180
|
* **User Session**
|
180
|
-
* **Check Session Validity**: `client.user.check_session_validity`
|
181
|
-
* **Create A New Session**: `client.user.create_new_session`
|
182
|
-
* **Destroy A Session**: `client.user.destroy_session`
|
181
|
+
* **Check Session Validity**: `client.user.check_session_validity()`
|
182
|
+
* **Create A New Session**: `client.user.create_new_session(data)`
|
183
|
+
* **Destroy A Session**: `client.user.destroy_session()`
|
183
184
|
|
184
185
|
* **User Statistics**
|
185
|
-
* **Count Total Unread Messages**: `client.user.count_total_unread_messages`
|
186
|
+
* **Count Total Unread Messages**: `client.user.count_total_unread_messages()`
|
data/crisp-api.gemspec
CHANGED
data/lib/crisp-api.rb
CHANGED
data/lib/resources/website.rb
CHANGED
@@ -193,6 +193,13 @@ module Crisp
|
|
193
193
|
return @parent.head(self._url_people("profile", website_id, people_id, ""))
|
194
194
|
end
|
195
195
|
|
196
|
+
def find_people_profile_by_email(website_id, email)
|
197
|
+
filter = [{:model => "people", :criterion => "email", :operator => "eq", query: [email]}]
|
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]
|
201
|
+
end
|
202
|
+
|
196
203
|
def get_people_profile(website_id, people_id)
|
197
204
|
return @parent.get(self._url_people("profile", website_id, people_id, ""))
|
198
205
|
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.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valerian Saliou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|