rongcloud 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 71db14d612f9142090dae9d4e92a27d4a73e24b0
4
- data.tar.gz: c238fb06e27332feb441550afa9480dc7b0d6761
3
+ metadata.gz: 0a15a74f4c7ce56d4fa40875d3cd617f169e6a1e
4
+ data.tar.gz: 5793f7e1c31c123e2a5b1768655b43392f703971
5
5
  SHA512:
6
- metadata.gz: 4c51c3e73dd119c20342dec86d69d30c556c63fb5ab7d767cd38fe2a69bc6022ab369f46c7c3609553968254b5eef0d1fe389d503dc822649a3aef1bcaf8afbb
7
- data.tar.gz: e45adb26c8f242c0e7d0aa400acd30941c99ef485b4c3dbf8ca86dc738a74e2c8a4a89726812cadb07931c3383d52a0a1faeff1c5a8a3d4a986b9141b6562e88
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.system_publish txt_msg
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)
@@ -1,3 +1,3 @@
1
1
  module Rongcloud
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-26 00:00:00.000000000 Z
11
+ date: 2016-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday