crisp-api 1.0.1 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 704987e5c967c926caf8629b2dcc11a6137e80d6
4
- data.tar.gz: 60555599bd6529c0c7a619a88214784855148e4f
3
+ metadata.gz: f535e101dd3d19d6b95b77280611b6da76e67e17
4
+ data.tar.gz: 53ba9775a4ed69fd9df548d6f2f13c18691e9e53
5
5
  SHA512:
6
- metadata.gz: 428fb0189315af090ffed1a0505ffcda531ef78dfc74aed8eb41f988c0323710739c32385d8711a55c915f92887c7c30921d93ad7aafe063b6c69b854806b630
7
- data.tar.gz: 3d97221cd573e943ca21a89ddb9f08986c117b72d52dae26f3d9c7293e59436621639dff2937ab0a3baa32e36db61e74d0350511d6d51f0b720c83e32f2fffb8
6
+ metadata.gz: 784aea903c5ac6b07ca6ba41c25dacc329e3e3f7b5d1be4a4f7130919152355fc80bf3da99aefbf18eceefe2c208567a815acec809fd23b94faed13d0dc61ebb
7
+ data.tar.gz: ef0ada6743000946846b9a27e6b1ea1595bf18b6c0b97e192783f12497fdb047ee21e15dc26d5e0c3f6dd36d335b8888c73da9a6c0a893c36b1e94b91f419992
data/README.md CHANGED
@@ -63,75 +63,26 @@ Thus, it is straightforward to look for them in the library while reading the [A
63
63
 
64
64
  In the following method prototypes, `crisp` is to be replaced with your Crisp API instance. For example, instanciate `client = Crisp()` and then call eg: `client.user.check_session_validity()`.
65
65
 
66
- When calling a method that writes data to the API (eg: `client.user.create_user_account()`), you need to build an account instance and submit it this way:
66
+ When calling a method that writes data to the API (eg. send a message with: `client.website.send_message_in_conversation()`), you need to submit it this way:
67
67
 
68
68
  ```ruby
69
- client.user.create_user_account({
70
- "email" => "john@acme-inc.com",
71
- "password" => "SecurePassword",
72
- "first_name" => "John",
73
- "last_name" => "Doe"
74
- })
69
+ website_id = "6497e4a4-b17c-41e0-bfea-eea97ba8115a"
70
+ session_id = "session_f32bc993-f7ce-41af-bcd1-110fc147a392"
71
+
72
+ client.website.send_message_in_conversation(
73
+ website_id, session_id,
74
+
75
+ {
76
+ "type" => "text",
77
+ "content" => "This message was sent from python-crisp-api! :)",
78
+ "from" => "operator",
79
+ "origin" => "chat"
80
+ }
81
+ )
75
82
  ```
76
83
 
77
- ### Bucket
78
-
79
- * **Bucket URL**
80
- * **Generate Bucket URL**: `client.bucket.generate_bucket_url`
81
-
82
- ### User
83
-
84
- * **User Availability**
85
- * **Get User Availability**: `client.user.get_user_availability`
86
- * **Update User Availability**: `client.user.update_user_availability`
87
- * **Get User Availability Status**: `client.user.get_user_availability_status`
88
-
89
- * **User Account Base**
90
- * **Get User Account**: `client.user.get_user_account`
91
- * **Create User Account**: `client.user.create_user_account`
92
-
93
- * **User Account Websites**
94
- * **List Websites**: `client.user.list_websites`
95
-
96
- * **User Account Profile**
97
- * **Get Profile**: `client.user.get_profile`
98
- * **Update Profile**: `client.user.update_profile`
99
-
100
- * **User Session**
101
- * **Check Session Validity**: `client.user.check_session_validity`
102
- * **Create A New Session**: `client.user.create_new_session`
103
- * **Destroy A Session**: `client.user.destroy_session`
104
-
105
- * **User Statistics**
106
- * **Count Total Unread Messages**: `client.user.count_total_unread_messages`
107
-
108
84
  ### Website
109
85
 
110
- * **Website Base**
111
- * **Create Website**: `client.website.create_website`
112
- * **Get A Website**: `client.website.get_website`
113
- * **Delete A Website**: `client.website.delete_website`
114
-
115
- * **Website Batch**
116
- * **Batch Resolve Items**: `client.website.batch_resolve_items`
117
- * **Batch Read Items**: `client.website.batch_read_items`
118
- * **Batch Remove Items**: `client.website.batch_remove_items`
119
-
120
- * **Website Availability**
121
- * **Get Website Availability Status**: `client.website.get_website_availability_status`
122
-
123
- * **Website Operator**
124
- * **List Website Operators**: `client.website.list_website_operators`
125
- * **List Last Active Website Operators**: `client.website.list_last_active_website_operators`
126
-
127
- * **Website Settings**
128
- * **Get Website Settings**: `client.website.get_website_settings`
129
- * **Update Website Settings**: `client.website.update_website_settings`
130
-
131
- * **Website Visitors**
132
- * **Count Visitors**: `client.website.count_visitors`
133
- * **List Visitors**: `client.website.list_visitors`
134
-
135
86
  * **Website Conversations**
136
87
  * **List Conversations**: `client.website.list_conversations`
137
88
 
@@ -176,3 +127,59 @@ client.user.create_user_account({
176
127
  + **Save People Data**: `client.website.save_people_data`
177
128
  + **Get People Subscription Status**: `client.website.get_people_subscription_status`
178
129
  + **Update People Subscription Status**: `client.website.update_people_subscription_status`
130
+
131
+ * **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`
135
+
136
+ * **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`
140
+
141
+ * **Website Availability**
142
+ * **Get Website Availability Status**: `client.website.get_website_availability_status`
143
+
144
+ * **Website Operator**
145
+ * **List Website Operators**: `client.website.list_website_operators`
146
+ * **List Last Active Website Operators**: `client.website.list_last_active_website_operators`
147
+
148
+ * **Website Settings**
149
+ * **Get Website Settings**: `client.website.get_website_settings`
150
+ * **Update Website Settings**: `client.website.update_website_settings`
151
+
152
+ * **Website Visitors**
153
+ * **Count Visitors**: `client.website.count_visitors`
154
+ * **List Visitors**: `client.website.list_visitors`
155
+
156
+ ### Bucket
157
+
158
+ * **Bucket URL**
159
+ * **Generate Bucket URL**: `client.bucket.generate_bucket_url`
160
+
161
+ ### User
162
+
163
+ * **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`
167
+
168
+ * **User Account Base**
169
+ * **Get User Account**: `client.user.get_user_account`
170
+ * **Create User Account**: `client.user.create_user_account`
171
+
172
+ * **User Account Websites**
173
+ * **List Websites**: `client.user.list_websites`
174
+
175
+ * **User Account Profile**
176
+ * **Get Profile**: `client.user.get_profile`
177
+ * **Update Profile**: `client.user.update_profile`
178
+
179
+ * **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`
183
+
184
+ * **User Statistics**
185
+ * **Count Total Unread Messages**: `client.user.count_total_unread_messages`
data/crisp-api.gemspec CHANGED
@@ -1,6 +1,8 @@
1
+ require File.expand_path("../lib/crisp-api", __FILE__)
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = 'crisp-api'
3
- s.version = '1.0.1'
5
+ s.version = '1.0.2'
4
6
  s.date = Date.today
5
7
  s.summary = "Crisp API Ruby"
6
8
  s.description = "Crisp API Ruby"
@@ -89,7 +89,7 @@ module Crisp
89
89
  :payload => (data ? data.to_json : nil),
90
90
 
91
91
  :headers => {
92
- :user_agent => "ruby-crisp-api/1.0.1",
92
+ :user_agent => "ruby-crisp-api/1.0.2",
93
93
  :accept => :json,
94
94
  :content_type => :json,
95
95
  :params => query
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.1
4
+ version: 1.0.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: 2018-01-04 00:00:00.000000000 Z
11
+ date: 2018-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -37,7 +37,7 @@ files:
37
37
  - crisp-api.gemspec
38
38
  - examples/user_get_profile.rb
39
39
  - examples/website_send_message_in_conversation.rb
40
- - lib/crisp.rb
40
+ - lib/crisp-api.rb
41
41
  - lib/errors/route.rb
42
42
  - lib/resources/bucket.rb
43
43
  - lib/resources/user.rb