qismo 0.8.1 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 303405e0a510d866ccee020b05461f78dc2495dc1d79c00f9aa7c5cc5f05cac6
4
- data.tar.gz: bcc7bc0d00e334ffb620190589421aedee83b89dbdeed9ac151f207152bde65f
3
+ metadata.gz: 432eecb4742527b3f65eae6e3573ed8ca122d5b9a73f27820aaa4fb7b7dbf7b3
4
+ data.tar.gz: ddf9cf75dd7d4ed5edfe0d5b1b6c51f88f6bc2e858b5fd40b16983df56cb9ea0
5
5
  SHA512:
6
- metadata.gz: 7b8ff7453b441a91a12c02d34447ba41a8f6c9fe0b2d17037707d92691ff3174e76e7251b74bcde9f626ef8cb6546176792fbc4afc2157bd898e15c1c373b7d0
7
- data.tar.gz: a764e416f07d2be5023cd3aaf363940548cd4004634650dfb62111eff4bf434327c47200611d32f5c9e08ab0cf0c44fc13de4679217e7a09ccb2becfce7c0e7e
6
+ metadata.gz: 41146b0199a762cc4668d11c4a59c24cc4c67d1121a412fcec4540e1466f6e5e8251f56920af99d5a56aa443299c54c2b1cb03ed78a947c5a531f386df963e34
7
+ data.tar.gz: a6dba9bd3173c934f3d8b6a91995d14fa2c8a0b910d686503874e5db2c3ac3a9070512ffe2827cb07cd548185d94aeaa62dbd5fa75add89e0e8e4e4866a73ddc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qismo (0.8.0)
4
+ qismo (0.8.2)
5
5
  activesupport
6
6
  http
7
7
 
data/lib/qismo/api.rb CHANGED
@@ -22,6 +22,19 @@ module Qismo
22
22
  body
23
23
  end
24
24
 
25
+ def room_tags(room_id)
26
+ get("/api/v2/room_tags/#{room_id}").data
27
+ end
28
+
29
+ def add_room_tag(room_id, tag)
30
+ post("/api/v2/room_tags/#{room_id}", tag: tag).data
31
+ end
32
+
33
+ def delete_room_tag(room_id, tag_id)
34
+ delete("/api/v2/room_tags/#{room_id}/#{tag_id}")
35
+ true
36
+ end
37
+
25
38
  def room_additional_info(room_id)
26
39
  body = get("/api/v1/qiscus/room/#{room_id}/user_info")
27
40
  body.data.extras.user_properties
@@ -69,6 +82,8 @@ module Qismo
69
82
  body.data.service
70
83
  end
71
84
 
85
+ alias_method :resolve_room, :resolve
86
+
72
87
  def allocate_agent(source, **opt)
73
88
  body = post("/api/v1/admin/service/allocate_agent", opt.merge(source: source))
74
89
  body.data.agent
data/lib/qismo/client.rb CHANGED
@@ -30,6 +30,10 @@ module Qismo
30
30
  request(:get, path, params: params)
31
31
  end
32
32
 
33
+ def delete(path)
34
+ request(:delete, path)
35
+ end
36
+
33
37
  def request(method, path, **opt)
34
38
  res = connection.request(method, @url + path, opt.compact)
35
39
  if res.status.success?
data/lib/qismo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Qismo
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qismo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Qiscus Integration