jpush_api_ruby_client 0.0.2 → 0.0.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: 1dcf24ad12cdd2e9c070a378467810ef7f4315d8
4
- data.tar.gz: 9fffe72aa7ac54de69209edcab611012218acc6d
3
+ metadata.gz: d4d127c1bf6758f961bef53c99892a6590e21344
4
+ data.tar.gz: add7ab30c8d7f56ff885c1e7a79c3a763d611d92
5
5
  SHA512:
6
- metadata.gz: 508a1f2ba4b67dddde817b6717454e94e2ea7a90cb2b12aeeeb4d55541aa31bc31dcd13d3c91917c7c51afee0698e16d17fcf2b85beb3cd2091f632e0236247d
7
- data.tar.gz: b6f845e1d6c4080b6a3bdadde748623b3fabab0f9ed82b01d9e96788b1c5e5d6be002ca49870df3d6416a42f883ade45d7f695d41f27c6060745d128a80e363d
6
+ metadata.gz: 7c3f9d4c01f459826fda392d1b1e4b8ee88e0eb1da1d1bb01b20789950a64aad33b0e373c0681a73e7d72fdeb0166209486ebda7abbaee18a1b2700145845771
7
+ data.tar.gz: 7542d141005b6109979ad4ca0ae2b6d4d5c7c37daea11158883568590e977c8d197c4fd4571aeed9e13b3a63cfc377c505c9d306b2a52db808fab33e2c95756a
data/README.md CHANGED
@@ -30,11 +30,11 @@ local install
30
30
 
31
31
  ##Example
32
32
 
33
- Detailes refer to [Example](/example/client_example.rb)
33
+ Detailes refer to [Example](https://github.com/aaron-codes/jpush_api_ruby_client/blob/master/example/client_example.rb)
34
34
 
35
35
  ## Usage
36
36
 
37
- Detailes refer to [Doc](/doc/index.html)
37
+ Detailes refer to [Doc](http://rubydoc.info/gems/jpush_api_ruby_client/index)
38
38
 
39
39
  ## Contributing
40
40
 
@@ -2,8 +2,8 @@ require 'jpush_api_ruby_client'
2
2
 
3
3
  class ClientExample
4
4
 
5
- app_key = '3af172b794896c3e1de43fe7' #必填,例如466f7032ac604e02fb7bda89
6
- master_secret = '57c45646c772983eb0e7c455' #必填,每个应用都对应一个masterSecret
5
+ app_key = '466f7032ac604e02fb7bda89' #必填,例如466f7032ac604e02fb7bda89
6
+ master_secret = '57c45646c772983fede7c455' #必填,每个应用都对应一个masterSecret
7
7
 
8
8
  # 保存离线的时长。秒为单位。最多支持10天(864000秒)。
9
9
  # 0 表示该消息不保存离线。即:用户在线马上发出,当前不在线用户将不会收到此消息。
@@ -37,29 +37,47 @@ class ClientExample
37
37
  msg_title = 'JPushApiRubyClient实例'
38
38
 
39
39
  msg_content = '根据 appkey 发送广播通知'
40
- puts send_result = jpush_client.send_notification_with_appkey(send_no, msg_title, msg_content,'extras' => {'key1'=>'value1','key2' => 'value2'})
40
+ puts send_result = jpush_client.send_notification_with_appkey(send_no, msg_title, msg_content)
41
+
42
+ =begin
43
+ 带上可选参数调用 opts参数可包含 builder_id 、extras 、override_msg_id
44
+ puts send_result = jpush_client.send_notification_with_appkey(send_no,
45
+ msg_title,
46
+ msg_content,
47
+ 'builder_id' => 0,
48
+ 'extras' => {'key1'=> 'value1','key2'=>'value2'},
49
+ 'override_msg_id' => '这里输入你上一条消息的msg_id')
50
+ =end
41
51
 
42
52
  msg_content = '根据 tag 发送通知'
43
- puts send_result = jpush_client.send_notification_with_tag(send_no, 'ouyang', msg_title, msg_content)
53
+ puts send_result = jpush_client.send_notification_with_tag(send_no, '这里输入你的tag', msg_title, msg_content)
44
54
 
45
55
  msg_content = '根据 alias 发送通知'
46
- puts send_result = jpush_client.send_notification_with_alias(send_no, 'ouyang', msg_title, msg_content)
56
+ puts send_result = jpush_client.send_notification_with_alias(send_no, '这里输入你的alias', msg_title, msg_content)
47
57
 
48
58
  msg_content = '根据 imei 发送通知'
49
- puts send_result = jpush_client.send_notification_with_imei(send_no, '869274011252583', msg_title, msg_content)
59
+ puts send_result = jpush_client.send_notification_with_imei(send_no, '这里输入你的imei', msg_title, msg_content)
50
60
 
51
61
 
52
62
  msg_content = '根据 appkey 发送自定义消息'
53
- puts send_result = jpush_client.send_message_with_appkey(send_no, msg_title, msg_content,'extras' => {'key1'=>'value1','key2' => 'value2'})
63
+ puts send_result = jpush_client.send_message_with_appkey(send_no, msg_title, msg_content)
64
+ =begin
65
+ 带上可选参数调用 opts参数可包含 extras 、override_msg_id
66
+ puts send_result = jpush_client.send_message_with_appkey(send_no,
67
+ msg_title,
68
+ msg_content,
69
+ 'extras' => {'key1'=> 'value1','key2'=>'value2'},
70
+ 'override_msg_id' => '这里输入你上一条消息的msg_id')
71
+ =end
54
72
 
55
73
  msg_content = '根据 tag 发送自定义消息'
56
- puts send_result = jpush_client.send_message_with_alias(send_no, 'ouyang', msg_title, msg_content)
74
+ puts send_result = jpush_client.send_message_with_alias(send_no, '这里输入你的tag', msg_title, msg_content)
57
75
 
58
76
  msg_content = '根据 alias 发送自定义消息'
59
- puts send_result = jpush_client.send_message_with_tag(send_no, 'ouyang', msg_title, msg_content)
77
+ puts send_result = jpush_client.send_message_with_tag(send_no, '这里输入你的alias', msg_title, msg_content)
60
78
 
61
79
  msg_content = '根据 imei 发送自定义消息'
62
- puts send_result = jpush_client.send_message_with_imei(send_no, '869274011252583', msg_title, msg_content)
80
+ puts send_result = jpush_client.send_message_with_imei(send_no, '这里输入你的imei', msg_title, msg_content)
63
81
 
64
82
 
65
83
  end
@@ -1,3 +1,3 @@
1
1
  module JPushApiRubyClient
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpush_api_ruby_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xian OuYang