crisp-api 1.0.5 → 1.1.0

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: 17b745dc91f065e520e1472be2cd5db9e2fad8d8
4
- data.tar.gz: c124127cdef5d9261a1371609f948cf5cd60bb88
3
+ metadata.gz: 3dcb52c7cd84cfd52cf672db6ba448213a45b21e
4
+ data.tar.gz: c3ff479712a79c11ca68857e9fc6cff7b86780e8
5
5
  SHA512:
6
- metadata.gz: a8e64e5600e34654095b3c12c6e45e9306508d9d0a2bf309477f8132488e9d5b76f1dd70c1835b344f237c6bab587bad88a49bc6bbfcdcae8ffd5b94ab72287f
7
- data.tar.gz: 4718da28ce65e7f850302d957bec58d676a030e71d33f6a5fd7c7c7c18b38fc8c01646e4c4d1ddcde680dcfc1973af610378b3b9df847615be6bcccc58c14caa
6
+ metadata.gz: 20d99c221db89ad90d161b734080f4a1ebf6823b92e23024b775c4e778d982008f161d778dd283d88816ea3b10ac0f1c68b9da06ee015e670e1ec16c63919602
7
+ data.tar.gz: 91e4207c7e740743955d85b5cdd41b0a48446954e6c8b4a1c83d5ef9c374083a3ed65c321e835a3d8aa383163c49c90db082cd4b78e0f19a3f194e4c685628ef
data/README.md CHANGED
@@ -161,26 +161,7 @@ client.website.send_message_in_conversation(
161
161
 
162
162
  ### User
163
163
 
164
- * **User Availability**
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()`
168
-
169
- * **User Account Base**
170
- * **Get User Account**: `client.user.get_user_account()`
171
- * **Create User Account**: `client.user.create_user_account(data)`
172
-
173
- * **User Account Websites**
174
- * **List Websites**: `client.user.list_websites()`
175
-
176
- * **User Account Profile**
177
- * **Get Profile**: `client.user.get_profile()`
178
- * **Update Profile**: `client.user.update_profile(data)`
179
-
180
164
  * **User Session**
181
165
  * **Check Session Validity**: `client.user.check_session_validity()`
182
166
  * **Create A New Session**: `client.user.create_new_session(data)`
183
167
  * **Destroy A Session**: `client.user.destroy_session()`
184
-
185
- * **User Statistics**
186
- * **Count Total Unread Messages**: `client.user.count_total_unread_messages()`
data/crisp-api.gemspec CHANGED
@@ -2,7 +2,7 @@ require File.expand_path("../lib/crisp-api", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'crisp-api'
5
- s.version = '1.0.5'
5
+ s.version = '1.1.0'
6
6
  s.date = Date.today
7
7
  s.summary = "Crisp API Ruby"
8
8
  s.description = "Crisp API Ruby"
data/lib/crisp-api.rb CHANGED
@@ -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.5",
92
+ :user_agent => "ruby-crisp-api/1.1.0",
93
93
  :accept => :json,
94
94
  :content_type => :json,
95
95
  :params => query
@@ -21,38 +21,6 @@ module Crisp
21
21
 
22
22
  public
23
23
 
24
- def get_user_availability
25
- return @parent.get(self._url_user("/availability"))
26
- end
27
-
28
- def update_user_availability(data)
29
- return @parent.patch(self._url_user("/availability"), data: data)
30
- end
31
-
32
- def get_user_availability_status
33
- return @parent.get(self._url_user("/availability/status"))
34
- end
35
-
36
- def get_user_account
37
- return @parent.get(self._url_user("/account"))
38
- end
39
-
40
- def create_user_account(data)
41
- return @parent.post(self._url_user("/account"), data: data)
42
- end
43
-
44
- def list_websites
45
- return @parent.get(self._url_user("/account/websites"))
46
- end
47
-
48
- def get_profile
49
- return @parent.get(self._url_user("/account/profile"))
50
- end
51
-
52
- def update_profile(data)
53
- return @parent.patch(self._url_user("/account/profile"), data: data)
54
- end
55
-
56
24
  def check_session_validity
57
25
  return @parent.head(self._url_user("/session"))
58
26
  end
@@ -64,9 +32,5 @@ module Crisp
64
32
  def destroy_session
65
33
  return @parent.post(self._url_user("/session/logout"))
66
34
  end
67
-
68
- def count_total_unread_messages
69
- return @parent.get(self._url_user("/stats/unread"))
70
- end
71
35
  end
72
36
  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.5
4
+ version: 1.1.0
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-12 00:00:00.000000000 Z
11
+ date: 2018-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -35,7 +35,6 @@ files:
35
35
  - LICENSE
36
36
  - README.md
37
37
  - crisp-api.gemspec
38
- - examples/user_get_profile.rb
39
38
  - examples/website_send_message_in_conversation.rb
40
39
  - lib/crisp-api.rb
41
40
  - lib/errors/route.rb
@@ -1,19 +0,0 @@
1
- ##
2
- # ruby-crisp-api
3
- #
4
- # Copyright 2018, Valerian Saliou
5
- # Author: Valerian Saliou <valerian@valeriansaliou.name>
6
- ##
7
-
8
- require 'crisp-api'
9
-
10
- client = Crisp::Client.new
11
-
12
- client.authenticate(
13
- "5c0595b2-9381-4a76-a2e0-04aa00c1ede7",
14
- "3bdb0812d0f5352bf68901ddc731434dade419b98507971905acdd2f967df61c"
15
- )
16
-
17
- data = client.user.get_profile()
18
-
19
- puts data.inspect