tim_sdk 0.1.4 → 0.1.5

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: 03e0b33df1b7960bef8fb7bb33338885d8ec78c9b820e9e9e14c1c30fa22bf57
4
- data.tar.gz: 361e71cddf1baef18bfab1da454edc5aca8406fdc0b28d5757ae3e2a6d73db1a
3
+ metadata.gz: b1f7fb651a64296028fcbf838c1e3ef76fac84ea553404b6af53f8c9d4604275
4
+ data.tar.gz: e8ebec57f11e951d112f8cb5b1d9b1324429fcf84447ad919834149e6f067b45
5
5
  SHA512:
6
- metadata.gz: d5438ce5e5f57a343ad691df72b7c4c2d7ee4c8892597cf9f969f7ba6535617ed9a208a3a0bf04e02b21f61072a845c3c87c55f6dee564a09d7425194c134e2a
7
- data.tar.gz: c0a9c7aec4117097a594e8dba478a5b0886f1a4ac2a241063f015830f411ecc9e468385447beb0c3738b7026bf695608d618fb5dde6ee910b5f19aa50009b7db
6
+ metadata.gz: c03ce841cc96917efbd911fb69d0da053e30676f9bacf31f4b3d7bf7018916f72cb44b7f2e1c65508a7c0761af3ae1acd07298906ed83d835a3b1c17d80bb193
7
+ data.tar.gz: 67b98e15cbef3769f8e8736abf2d3e30ddd9057c250bab17fc273037af63981f16e25d9f1bc50f8a17bea049328e8c094358371986c91c032a8244b4f9de67a5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tim_sdk (0.1.3)
4
+ tim_sdk (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -116,6 +116,12 @@ TimSdk::Api.invoke_import_msg(
116
116
  #=> {:ActionStatus=>"OK", :ErrorInfo=>"", :ErrorCode=>0}
117
117
  ```
118
118
 
119
+ 撤回单聊消息
120
+ ```ruby
121
+ TimSdk::Api.invoke_admin_msg_withdraw('foo', 'bar', '1927400049_48863998_1599827627')
122
+ #=> {:ActionStatus=>"OK", :ErrorInfo=>"", :ErrorCode=>0}
123
+ ```
124
+
119
125
  设置资料
120
126
  ```ruby
121
127
  TimSdk::Api.invoke_portrait_set('foo', [
@@ -108,6 +108,19 @@ module TimSdk
108
108
  JSON.parse(response.body, symbolize_names: true) if response.success?
109
109
  end
110
110
 
111
+ # 撤回单聊消息
112
+ def self.invoke_admin_msg_withdraw(from_account, to_account, msg_key)
113
+ response = connection.post('/v4/openim/admin_msgwithdraw') do |request|
114
+ request.body = {
115
+ :From_Account => from_account.to_s,
116
+ :To_Account => to_account.to_s,
117
+ :MsgKey => msg_key.to_s,
118
+ }.to_json
119
+ end
120
+ raise TimServerError, "Response Status: #{response.status}" unless response.success?
121
+ JSON.parse(response.body, symbolize_names: true) if response.success?
122
+ end
123
+
111
124
  # 设置资料
112
125
  def self.invoke_portrait_set(account, items)
113
126
  response = connection.post('/v4/profile/portrait_set') do |request|
@@ -1,3 +1,3 @@
1
1
  module TimSdk
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tim_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiangYongKang