rongcloud 0.1.5 → 0.1.6
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 +4 -4
- data/README.md +3 -1
- data/lib/rongcloud/service/message.rb +6 -0
- data/lib/rongcloud/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a15a74f4c7ce56d4fa40875d3cd617f169e6a1e
|
4
|
+
data.tar.gz: 5793f7e1c31c123e2a5b1768655b43392f703971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 659184751d956172bfdcc0e510966c62b9bf8b1dd725c58bdaac95e0a247d31c022c288645456b967ca4599d4a990c66b5066fee211997a865f52085bee82648
|
7
|
+
data.tar.gz: 33f659126afe71bfd375ca0dd9e8f80df44975c8b731329e10e5d5857d6736822ac0496355744128c08e3a0b23fcbd6e5ae819f9be4f2e6e56b1b89aa979935c
|
data/README.md
CHANGED
@@ -69,6 +69,8 @@ Rongcloud.app_secret = 'YOUR_SECRET' #融云APP_SECRET
|
|
69
69
|
model.from_user_id = '10086'
|
70
70
|
model.to_user_id = '0fd11abae5ce150247bf95831ee2d939'
|
71
71
|
model.object_name = 'CU:MoreImgTextMsg'
|
72
|
+
model.push_content = '测试'
|
73
|
+
model.push_data = '测试'
|
72
74
|
|
73
75
|
txt_msg = Rongcloud::Service::RCImgTextMsg.new
|
74
76
|
txt_msg.title = '订单已签收,请留意!!!!'
|
@@ -89,7 +91,7 @@ Rongcloud.app_secret = 'YOUR_SECRET' #融云APP_SECRET
|
|
89
91
|
imageUri: 'http://mmbiz.qpic.cn/mmbiz_jpg/EEtCXiaicRt14LYqXlCLEK1xTvKFISNB1ToPw74J7Ra7qh9QsCnaBAp6I9U3Mso9eIYOPvBdtbUnmczhdhDm9snw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1',
|
90
92
|
url: 'http://mp.weixin.qq.com/s?__biz=MjM5MDU4Njg5Mw==&mid=2247484325&idx=5&sn=312bbaedacd17220bc5ca73c49890070&scene=0#rd'
|
91
93
|
}]}.to_json
|
92
|
-
model.
|
94
|
+
model.system_public txt_msg
|
93
95
|
# => true
|
94
96
|
```
|
95
97
|
|
@@ -4,12 +4,16 @@ module Rongcloud
|
|
4
4
|
attr_accessor :from_user_id
|
5
5
|
attr_accessor :to_user_id
|
6
6
|
attr_accessor :object_name #消息类型
|
7
|
+
attr_accessor :push_data
|
8
|
+
attr_accessor :push_content
|
7
9
|
|
8
10
|
#发送单聊消息
|
9
11
|
def private_publish(rc_msg)
|
10
12
|
post = {uri: Rongcloud::Service::API_URI[:MSG_PRV_PUBLISH],
|
11
13
|
params: optional_params({fromUserId: self.from_user_id, toUserId: self.to_user_id,
|
12
14
|
objectName: self.object_name,
|
15
|
+
pushData: self.push_data,
|
16
|
+
pushContent: self.push_content,
|
13
17
|
content: rc_msg.json_content})
|
14
18
|
}
|
15
19
|
res = Rongcloud::Service.req_post(post)
|
@@ -21,6 +25,8 @@ module Rongcloud
|
|
21
25
|
post = {uri: Rongcloud::Service::API_URI[:MSG_SYSTEM_PUBLISH],
|
22
26
|
params: optional_params({fromUserId: self.from_user_id, toUserId: self.to_user_id,
|
23
27
|
objectName: self.object_name,
|
28
|
+
pushData: self.push_data,
|
29
|
+
pushContent: self.push_content,
|
24
30
|
content: rc_msg.json_content})
|
25
31
|
}
|
26
32
|
res = Rongcloud::Service.req_post(post)
|
data/lib/rongcloud/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rongcloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mumaoxi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|