zquickblox 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zquickblox/dialog/get_dialogs_request.rb +12 -0
- data/lib/zquickblox/dialog.rb +9 -0
- data/lib/zquickblox/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ff41a6dbca65c15a90c93db9924966e331558e2
|
4
|
+
data.tar.gz: ae79a98bbc334f6bc48fc80e0d98e72a85d97561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b216ef31fa8102fa654818b56d338e5a1afd4e1f0cd426c11ffd8e23b6ac7bbecedf4de1b8be694e1ea002c98f65cdabfd57747c573c2d678d91e09e2a4e166d
|
7
|
+
data.tar.gz: 1a1c6d15a2086314efba5b8a3f1ea04d5160885fc55afaab65b5db62290b7916ab83d29d396eff65d1cec45e7a8f50274b8ccc884d920d996675bfd6b01d33a7
|
data/lib/zquickblox/dialog.rb
CHANGED
@@ -1,9 +1,18 @@
|
|
1
1
|
require_relative "dialog/create_dialog_request"
|
2
2
|
require_relative "dialog/update_dialog_request"
|
3
|
+
require_relative "dialog/get_dialogs_request"
|
3
4
|
|
4
5
|
module ZQuickblox
|
5
6
|
module Dialog
|
6
7
|
class << self
|
8
|
+
def get(login, password, params)
|
9
|
+
request = ZQuickblox::Dialog::GetDialogsRequest.new(params)
|
10
|
+
run_request(login, password, request)
|
11
|
+
response = ZQuickblox::Util.symbolize_keys(request.response_body)
|
12
|
+
dialogs = response[:items].map { |item| Dialog.new(item) }
|
13
|
+
return dialogs
|
14
|
+
end
|
15
|
+
|
7
16
|
def create(login, password, params)
|
8
17
|
dialog = Dialog.new(params)
|
9
18
|
params = dialog.build_params
|
data/lib/zquickblox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zquickblox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thuong Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- lib/zquickblox.rb
|
103
103
|
- lib/zquickblox/dialog.rb
|
104
104
|
- lib/zquickblox/dialog/create_dialog_request.rb
|
105
|
+
- lib/zquickblox/dialog/get_dialogs_request.rb
|
105
106
|
- lib/zquickblox/dialog/update_dialog_request.rb
|
106
107
|
- lib/zquickblox/error.rb
|
107
108
|
- lib/zquickblox/request.rb
|