rongcloud 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: cda8994af264108daa03cb4065ae4e972c97ad91
4
- data.tar.gz: f4e67794162e9d3717587b137d8caa1ccb08710c
3
+ metadata.gz: ef8cb1aaf04e7d88af2961c854717f6867030efe
4
+ data.tar.gz: ae8d2ae75ec6176e32f4bf3096a76995892f4db3
5
5
  SHA512:
6
- metadata.gz: 0c6468d54941ee86ba4f3b7a4570eab27aa77f89c823e8bce9f9479077d34959bcb26abbbd93a93d091d2c2d696d27a77bcd649573c74b6a8ed94c63c55f4390
7
- data.tar.gz: 02d9e0fc270590d23f74174a5ddba1286c33bebcf85f0462b7e816fd61b70b15e63a5eb4b68cb927c13f53b449d76b4608e50d71e1b2c649d6bc006208541510
6
+ metadata.gz: cd138619d0a7afbe65dbcfcfb4963ef43ac86386cc70caaa866c1d898c2a78475eb6c4bbc349d3d479981d50a5f020b20ba219a50e510cf4485ba98bb27a2899
7
+ data.tar.gz: c55309190cfe49016cc6747b0a84ba86e3ed0e5e5c21e44a5cff36fda4b9ba009e3e33b67defc5935139428c838f9f648232c577928f1943fa3c838ec159dae4
data/.gitignore CHANGED
@@ -7,4 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- /.idea/
10
+ /.idea/
11
+ *.gem
@@ -3,7 +3,8 @@ module Rongcloud
3
3
 
4
4
  API_URI = {
5
5
  USER_GET_TOKEN: '/user/getToken.json',
6
- MSG_PRV_PUBLISH: '/message/private/publish.json'
6
+ MSG_PRV_PUBLISH: '/message/private/publish.json',
7
+ MSG_HISTORY: '/message/history.json'
7
8
  }
8
9
 
9
10
  def self.req_get(config)
@@ -5,6 +5,7 @@ module Rongcloud
5
5
  attr_accessor :to_user_id
6
6
  attr_accessor :object_name #消息类型
7
7
 
8
+ #发送单聊消息
8
9
  def private_publish(rc_msg)
9
10
  post = {uri: Rongcloud::Service::API_URI[:MSG_PRV_PUBLISH],
10
11
  params: optional_params({fromUserId: self.from_user_id, toUserId: self.to_user_id,
@@ -14,6 +15,14 @@ module Rongcloud
14
15
  res = Rongcloud::Service.req_post(post)
15
16
  res[:code]==200
16
17
  end
18
+
19
+ #消息历史记录
20
+ def history(date_str)
21
+ post = {uri: Rongcloud::Service::API_URI[:MSG_HISTORY],
22
+ params: optional_params({date: date_str})
23
+ }
24
+ Rongcloud::Service.req_post(post)
25
+ end
17
26
  end
18
27
  # 不同类型的消息
19
28
  class RCMsg < Rongcloud::Service::Model
@@ -1,3 +1,3 @@
1
1
  module Rongcloud
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mumaoxi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.9.1
69
- description: "融云及时通讯"
69
+ description: 融云及时通讯
70
70
  email:
71
71
  - 15201280641@qq.com
72
72
  executables: []
@@ -110,8 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.4.3
113
+ rubygems_version: 2.4.6
114
114
  signing_key:
115
115
  specification_version: 4
116
- summary: "融云及时通讯"
116
+ summary: 融云及时通讯
117
117
  test_files: []