pusher-chatkit-server 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/chatkit/client.rb +29 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 33f07005b4cb0c21c10e08a20c9bd900eaaed285
|
4
|
+
data.tar.gz: d10d392516329d82feb0faba20480ae83f86d320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 914f3bd6446f16d55cb994fe50ea2561d015df8c043e6a6740ef85f56911c644c5095d1a51c91f3f70d8aa40a0b6da5ed9c0caf68c264527d04669148741e0b9
|
7
|
+
data.tar.gz: 3ed09704600ab9a1d7a850cec77cc36d8d3f89f15c22dc5dccec8dd301011d3d5d13cd8c54a4aef7a56e396be2fb6f62041828c16ff8a1520bde983304362f02
|
data/lib/chatkit/client.rb
CHANGED
@@ -59,6 +59,13 @@ module Chatkit
|
|
59
59
|
service_version: 'v2'
|
60
60
|
})
|
61
61
|
)
|
62
|
+
|
63
|
+
@scheduler_instance = PusherPlatform::Instance.new(
|
64
|
+
base_options.merge({
|
65
|
+
service_name: 'chatkit_scheduler',
|
66
|
+
service_version: 'v1'
|
67
|
+
})
|
68
|
+
)
|
62
69
|
end
|
63
70
|
|
64
71
|
def authenticate(options)
|
@@ -144,18 +151,30 @@ module Chatkit
|
|
144
151
|
})
|
145
152
|
end
|
146
153
|
|
147
|
-
def
|
154
|
+
def async_delete_user(options)
|
148
155
|
if options[:id].nil?
|
149
156
|
raise Chatkit::MissingParameterError.new("You must provide the ID of the user you want to delete")
|
150
157
|
end
|
151
158
|
|
152
|
-
|
153
|
-
method: "
|
159
|
+
scheduler_request({
|
160
|
+
method: "PUT",
|
154
161
|
path: "/users/#{CGI::escape options[:id]}",
|
155
162
|
jwt: generate_su_token[:token]
|
156
163
|
})
|
157
164
|
end
|
158
165
|
|
166
|
+
def get_delete_status(options)
|
167
|
+
if options[:id].nil?
|
168
|
+
raise Chatkit::MissingParameterError.new("You must provide the ID of the job you want to query status of")
|
169
|
+
end
|
170
|
+
|
171
|
+
scheduler_request({
|
172
|
+
method: "GET",
|
173
|
+
path: "/status/#{CGI::escape options[:id]}",
|
174
|
+
jwt: generate_su_token[:token]
|
175
|
+
})
|
176
|
+
end
|
177
|
+
|
159
178
|
def get_user(options)
|
160
179
|
if options[:id].nil?
|
161
180
|
raise Chatkit::MissingParameterError.new("You must provide the ID of the user you want to fetch")
|
@@ -251,13 +270,13 @@ module Chatkit
|
|
251
270
|
})
|
252
271
|
end
|
253
272
|
|
254
|
-
def
|
273
|
+
def async_delete_room(options)
|
255
274
|
if options[:id].nil?
|
256
275
|
raise Chatkit::MissingParameterError.new("You must provide the ID of the room to delete")
|
257
276
|
end
|
258
277
|
|
259
|
-
|
260
|
-
method: "
|
278
|
+
scheduler_request({
|
279
|
+
method: "PUT",
|
261
280
|
path: "/rooms/#{CGI::escape options[:id]}",
|
262
281
|
jwt: generate_su_token[:token]
|
263
282
|
})
|
@@ -658,6 +677,10 @@ module Chatkit
|
|
658
677
|
make_request(@cursors_instance, options)
|
659
678
|
end
|
660
679
|
|
680
|
+
def scheduler_request(options)
|
681
|
+
make_request(@scheduler_instance, options)
|
682
|
+
end
|
683
|
+
|
661
684
|
private
|
662
685
|
|
663
686
|
def make_request(instance, options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pusher-chatkit-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pusher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pusher-platform
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
version: '0'
|
57
57
|
requirements: []
|
58
58
|
rubyforge_project:
|
59
|
-
rubygems_version: 2.
|
59
|
+
rubygems_version: 2.6.12
|
60
60
|
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: Pusher Chatkit Ruby SDK
|