qismo 0.8.2 → 0.8.4

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
  SHA256:
3
- metadata.gz: 784cac790679eccf0e7cf96c065bf1a6ff3e1e960ee5ca18339c9d3e525ab93c
4
- data.tar.gz: deec3480220cfed5bc67e4d3227dc66ff70ed63cb9fb2acdfacbfa4849d93c1c
3
+ metadata.gz: 0eb5507d6cf58078ced31764f32c26888d7ef0004ff38a41c4b9213f2327844e
4
+ data.tar.gz: 2a8441a6e40bc565cbaa9a93a0e8defa150f9482c6c0a6fb2879a1387aa580d1
5
5
  SHA512:
6
- metadata.gz: 6e97fc457f9be9dd7f3cc44785074934ea18632c58f2b4e8ea7a659932d9acebbc08879b5a1bb0d1c639012dd6770112fa1d09adb5eb49156630e8317eea529e
7
- data.tar.gz: bc6cc22a8f8c2e3ec9eef850210737869ae2b81ce5ef47bd0659bba2e8ffda594954a8ab7e1174fc9266d759f65441c972333ce22e2f6f6b069a93c1d292a507
6
+ metadata.gz: 378107cd1698b521a16a871680571926b1fa0c5d4f028f595994bfa77ce90b10ebdd56ed7db51fa5dc5961d390cb6da81f535479b2410bf6c801335f23f95769
7
+ data.tar.gz: 97938e4566a11e9611fc3c0430950258c140dcbc3da18f965c6875ea4ce80ca57293134fd87198b68ce6ec6cc5decc71a74460d1c985a806e11390c5cf0af0e4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qismo (0.8.1)
4
+ qismo (0.8.3)
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
@@ -65,7 +78,7 @@ module Qismo
65
78
 
66
79
  def resolve(room_id, last_comment_id, **opt)
67
80
  body = post("/api/v1/admin/service/mark_as_resolved",
68
- opt.merge(room_id: room_id, last_comment_id: last_comment_id))
81
+ opt.merge(room_id: room_id.to_s, last_comment_id: last_comment_id))
69
82
  body.data.service
70
83
  end
71
84
 
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.2"
4
+ VERSION = "0.8.4"
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.2
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Qiscus Integration