tim_sdk 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/lib/tim_sdk/api.rb +13 -0
- data/lib/tim_sdk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1f7fb651a64296028fcbf838c1e3ef76fac84ea553404b6af53f8c9d4604275
|
4
|
+
data.tar.gz: e8ebec57f11e951d112f8cb5b1d9b1324429fcf84447ad919834149e6f067b45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c03ce841cc96917efbd911fb69d0da053e30676f9bacf31f4b3d7bf7018916f72cb44b7f2e1c65508a7c0761af3ae1acd07298906ed83d835a3b1c17d80bb193
|
7
|
+
data.tar.gz: 67b98e15cbef3769f8e8736abf2d3e30ddd9057c250bab17fc273037af63981f16e25d9f1bc50f8a17bea049328e8c094358371986c91c032a8244b4f9de67a5
|
data/Gemfile.lock
CHANGED
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', [
|
data/lib/tim_sdk/api.rb
CHANGED
@@ -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|
|
data/lib/tim_sdk/version.rb
CHANGED