jpush_api_ruby_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +45 -0
  6. data/Rakefile +1 -0
  7. data/doc/Gemfile.html +105 -0
  8. data/doc/JPushApiRubyClient/Client.html +774 -0
  9. data/doc/JPushApiRubyClient/MsgType.html +159 -0
  10. data/doc/JPushApiRubyClient/PlatformType.html +164 -0
  11. data/doc/JPushApiRubyClient/ReceiverType.html +169 -0
  12. data/doc/JPushApiRubyClient.html +166 -0
  13. data/doc/LICENSE_txt.html +121 -0
  14. data/doc/Rakefile.html +101 -0
  15. data/doc/created.rid +15 -0
  16. data/doc/doc/created_rid.html +99 -0
  17. data/doc/images/add.png +0 -0
  18. data/doc/images/arrow_up.png +0 -0
  19. data/doc/images/brick.png +0 -0
  20. data/doc/images/brick_link.png +0 -0
  21. data/doc/images/bug.png +0 -0
  22. data/doc/images/bullet_black.png +0 -0
  23. data/doc/images/bullet_toggle_minus.png +0 -0
  24. data/doc/images/bullet_toggle_plus.png +0 -0
  25. data/doc/images/date.png +0 -0
  26. data/doc/images/delete.png +0 -0
  27. data/doc/images/find.png +0 -0
  28. data/doc/images/loadingAnimation.gif +0 -0
  29. data/doc/images/macFFBgHack.png +0 -0
  30. data/doc/images/package.png +0 -0
  31. data/doc/images/page_green.png +0 -0
  32. data/doc/images/page_white_text.png +0 -0
  33. data/doc/images/page_white_width.png +0 -0
  34. data/doc/images/plugin.png +0 -0
  35. data/doc/images/ruby.png +0 -0
  36. data/doc/images/tag_blue.png +0 -0
  37. data/doc/images/tag_green.png +0 -0
  38. data/doc/images/transparent.png +0 -0
  39. data/doc/images/wrench.png +0 -0
  40. data/doc/images/wrench_orange.png +0 -0
  41. data/doc/images/zoom.png +0 -0
  42. data/doc/index.html +96 -0
  43. data/doc/jpush_api_ruby_client_gemspec.html +126 -0
  44. data/doc/js/darkfish.js +155 -0
  45. data/doc/js/jquery.js +18 -0
  46. data/doc/js/navigation.js +142 -0
  47. data/doc/js/search.js +94 -0
  48. data/doc/js/search_index.js +1 -0
  49. data/doc/js/searcher.js +228 -0
  50. data/doc/rdoc.css +595 -0
  51. data/doc/table_of_contents.html +99 -0
  52. data/example/client_example.rb +66 -0
  53. data/jpush_api_ruby_client.gemspec +25 -0
  54. data/lib/jpush_api_ruby_client/client.rb +233 -0
  55. data/lib/jpush_api_ruby_client/msg_type.rb +12 -0
  56. data/lib/jpush_api_ruby_client/platform_type.rb +14 -0
  57. data/lib/jpush_api_ruby_client/receiver_type.rb +16 -0
  58. data/lib/jpush_api_ruby_client/version.rb +3 -0
  59. data/lib/jpush_api_ruby_client.rb +8 -0
  60. metadata +158 -0
@@ -0,0 +1,774 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class JPushApiRubyClient::Client - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+
47
+
48
+ <div id="file-metadata">
49
+ <nav id="file-list-section" class="section">
50
+ <h3 class="section-header">Defined In</h3>
51
+ <ul>
52
+ <li>lib/jpush_api_ruby_client/client.rb
53
+ </ul>
54
+ </nav>
55
+
56
+
57
+ </div>
58
+
59
+ <div id="class-metadata">
60
+
61
+ <nav id="parent-class-section" class="section">
62
+ <h3 class="section-header">Parent</h3>
63
+
64
+ <p class="link">Object
65
+
66
+ </nav>
67
+
68
+ <!-- Included Modules -->
69
+ <nav id="includes-section" class="section">
70
+ <h3 class="section-header">Included Modules</h3>
71
+
72
+ <ul class="link-list">
73
+
74
+
75
+ <li><a class="include" href="PlatformType.html">JPushApiRubyClient::PlatformType</a>
76
+
77
+
78
+ </ul>
79
+ </nav>
80
+
81
+
82
+ <!-- Method Quickref -->
83
+ <nav id="method-list-section" class="section">
84
+ <h3 class="section-header">Methods</h3>
85
+
86
+ <ul class="link-list">
87
+
88
+ <li ><a href="#method-c-new">::new</a>
89
+
90
+ <li ><a href="#method-i-enable_ssl">#enable_ssl</a>
91
+
92
+ <li ><a href="#method-i-generate_send_no">#generate_send_no</a>
93
+
94
+ <li ><a href="#method-i-send_message_with_alias">#send_message_with_alias</a>
95
+
96
+ <li ><a href="#method-i-send_message_with_appkey">#send_message_with_appkey</a>
97
+
98
+ <li ><a href="#method-i-send_message_with_imei">#send_message_with_imei</a>
99
+
100
+ <li ><a href="#method-i-send_message_with_tag">#send_message_with_tag</a>
101
+
102
+ <li ><a href="#method-i-send_notification_with_alias">#send_notification_with_alias</a>
103
+
104
+ <li ><a href="#method-i-send_notification_with_appkey">#send_notification_with_appkey</a>
105
+
106
+ <li ><a href="#method-i-send_notification_with_imei">#send_notification_with_imei</a>
107
+
108
+ <li ><a href="#method-i-send_notification_with_tag">#send_notification_with_tag</a>
109
+
110
+ </ul>
111
+ </nav>
112
+
113
+ </div>
114
+
115
+ <div id="project-metadata">
116
+ <nav id="fileindex-section" class="section project-section">
117
+ <h3 class="section-header">Pages</h3>
118
+
119
+ <ul>
120
+
121
+ <li class="file"><a href="../Gemfile.html">Gemfile</a>
122
+
123
+ <li class="file"><a href="../LICENSE_txt.html">LICENSE</a>
124
+
125
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
126
+
127
+ <li class="file"><a href="../doc/created_rid.html">created.rid</a>
128
+
129
+ <li class="file"><a href="../jpush_api_ruby_client_gemspec.html">jpush_api_ruby_client.gemspec</a>
130
+
131
+ </ul>
132
+ </nav>
133
+
134
+ <nav id="classindex-section" class="section project-section">
135
+ <h3 class="section-header">Class and Module Index</h3>
136
+
137
+ <ul class="link-list">
138
+
139
+ <li><a href="../JPushApiRubyClient.html">JPushApiRubyClient</a>
140
+
141
+ <li><a href="../JPushApiRubyClient/Client.html">JPushApiRubyClient::Client</a>
142
+
143
+ <li><a href="../JPushApiRubyClient/MsgType.html">JPushApiRubyClient::MsgType</a>
144
+
145
+ <li><a href="../JPushApiRubyClient/PlatformType.html">JPushApiRubyClient::PlatformType</a>
146
+
147
+ <li><a href="../JPushApiRubyClient/ReceiverType.html">JPushApiRubyClient::ReceiverType</a>
148
+
149
+ </ul>
150
+ </nav>
151
+
152
+ </div>
153
+ </nav>
154
+
155
+ <div id="documentation">
156
+ <h1 class="class">class JPushApiRubyClient::Client</h1>
157
+
158
+ <div id="description" class="description">
159
+
160
+ </div><!-- description -->
161
+
162
+
163
+
164
+
165
+ <section id="5Buntitled-5D" class="documentation-section">
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <!-- Attributes -->
174
+ <section id="attribute-method-details" class="method-section section">
175
+ <h3 class="section-header">Attributes</h3>
176
+
177
+
178
+ <div id="attribute-i-app_key" class="method-detail">
179
+ <div class="method-heading attribute-method-heading">
180
+ <span class="method-name">app_key</span><span
181
+ class="attribute-access-type">[RW]</span>
182
+ </div>
183
+
184
+ <div class="method-description">
185
+
186
+
187
+
188
+ </div>
189
+ </div>
190
+
191
+ <div id="attribute-i-https" class="method-detail">
192
+ <div class="method-heading attribute-method-heading">
193
+ <span class="method-name">https</span><span
194
+ class="attribute-access-type">[RW]</span>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+
199
+
200
+
201
+ </div>
202
+ </div>
203
+
204
+ <div id="attribute-i-master_secret" class="method-detail">
205
+ <div class="method-heading attribute-method-heading">
206
+ <span class="method-name">master_secret</span><span
207
+ class="attribute-access-type">[RW]</span>
208
+ </div>
209
+
210
+ <div class="method-description">
211
+
212
+
213
+
214
+ </div>
215
+ </div>
216
+
217
+ <div id="attribute-i-platform" class="method-detail">
218
+ <div class="method-heading attribute-method-heading">
219
+ <span class="method-name">platform</span><span
220
+ class="attribute-access-type">[RW]</span>
221
+ </div>
222
+
223
+ <div class="method-description">
224
+
225
+
226
+
227
+ </div>
228
+ </div>
229
+
230
+ <div id="attribute-i-time_to_live" class="method-detail">
231
+ <div class="method-heading attribute-method-heading">
232
+ <span class="method-name">time_to_live</span><span
233
+ class="attribute-access-type">[RW]</span>
234
+ </div>
235
+
236
+ <div class="method-description">
237
+
238
+
239
+
240
+ </div>
241
+ </div>
242
+
243
+ </section><!-- attribute-method-details -->
244
+
245
+
246
+ <!-- Methods -->
247
+
248
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
249
+ <h3 class="section-header">Public Class Methods</h3>
250
+
251
+
252
+ <div id="method-c-new" class="method-detail ">
253
+
254
+ <div class="method-heading">
255
+ <span class="method-name">new</span><span
256
+ class="method-args">(app_key, master_secret, opts ={}, &block)</span>
257
+
258
+ <span class="method-click-advice">click to toggle source</span>
259
+
260
+ </div>
261
+
262
+
263
+ <div class="method-description">
264
+
265
+ <ul><li>
266
+ <p>@param [String] <a href="Client.html#attribute-i-app_key">#app_key</a></p>
267
+ </li><li>
268
+ <p>@param [String] <a
269
+ href="Client.html#attribute-i-master_secret">#master_secret</a></p>
270
+ </li><li>
271
+ <p>@param [Hash] opts opts可选参数可包含time_to_live、platform</p>
272
+ </li></ul>
273
+
274
+
275
+
276
+
277
+ <div class="method-source-code" id="new-source">
278
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 19</span>
279
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_key</span>, <span class="ruby-identifier">master_secret</span>, <span class="ruby-identifier">opts</span> ={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
280
+ <span class="ruby-ivar">@app_key</span> = <span class="ruby-identifier">app_key</span>
281
+ <span class="ruby-ivar">@master_secret</span> = <span class="ruby-identifier">master_secret</span>
282
+ <span class="ruby-ivar">@time_to_live</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-string">&#39;time_to_live&#39;</span>] <span class="ruby-operator">||</span> <span class="ruby-value">86400</span>
283
+ <span class="ruby-ivar">@platform</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-string">&#39;platform&#39;</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">PlatformType</span><span class="ruby-operator">::</span><span class="ruby-constant">BOTH</span>
284
+ <span class="ruby-keyword">end</span></pre>
285
+ </div><!-- new-source -->
286
+
287
+ </div>
288
+
289
+
290
+
291
+
292
+ </div><!-- new-method -->
293
+
294
+
295
+ </section><!-- public-class-method-details -->
296
+
297
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
298
+ <h3 class="section-header">Public Instance Methods</h3>
299
+
300
+
301
+ <div id="method-i-enable_ssl" class="method-detail ">
302
+
303
+ <div class="method-heading">
304
+ <span class="method-name">enable_ssl</span><span
305
+ class="method-args">(https = false)</span>
306
+
307
+ <span class="method-click-advice">click to toggle source</span>
308
+
309
+ </div>
310
+
311
+
312
+ <div class="method-description">
313
+
314
+ <ul><li>
315
+ <p>是否启用https ssl连接,缺省false</p>
316
+ </li><li>
317
+ <p>@param [Object] true or false</p>
318
+ </li></ul>
319
+
320
+
321
+
322
+
323
+ <div class="method-source-code" id="enable_ssl-source">
324
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 38</span>
325
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">enable_ssl</span>(<span class="ruby-identifier">https</span> = <span class="ruby-keyword">false</span>)
326
+ <span class="ruby-ivar">@https</span> = <span class="ruby-identifier">https</span>
327
+ <span class="ruby-keyword">end</span></pre>
328
+ </div><!-- enable_ssl-source -->
329
+
330
+ </div>
331
+
332
+
333
+
334
+
335
+ </div><!-- enable_ssl-method -->
336
+
337
+
338
+ <div id="method-i-generate_send_no" class="method-detail ">
339
+
340
+ <div class="method-heading">
341
+ <span class="method-name">generate_send_no</span><span
342
+ class="method-args">()</span>
343
+
344
+ <span class="method-click-advice">click to toggle source</span>
345
+
346
+ </div>
347
+
348
+
349
+ <div class="method-description">
350
+
351
+ <ul><li>
352
+ <p>当前时间戳生成send_no</p>
353
+ </li><li>
354
+ <p>@return [Integer]</p>
355
+ </li></ul>
356
+
357
+
358
+
359
+
360
+ <div class="method-source-code" id="generate_send_no-source">
361
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 30</span>
362
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">generate_send_no</span>
363
+ <span class="ruby-constant">Integer</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>)
364
+ <span class="ruby-keyword">end</span></pre>
365
+ </div><!-- generate_send_no-source -->
366
+
367
+ </div>
368
+
369
+
370
+
371
+
372
+ </div><!-- generate_send_no-method -->
373
+
374
+
375
+ <div id="method-i-send_message_with_alias" class="method-detail ">
376
+
377
+ <div class="method-heading">
378
+ <span class="method-name">send_message_with_alias</span><span
379
+ class="method-args">(send_no, alias_, msg_title, msg_content, opts = {})</span>
380
+
381
+ <span class="method-click-advice">click to toggle source</span>
382
+
383
+ </div>
384
+
385
+
386
+ <div class="method-description">
387
+
388
+ <ul><li>
389
+ <p>发送带别名推送的自定义消息</p>
390
+ </li><li>
391
+ <p>@param [Integer] send_no</p>
392
+ </li><li>
393
+ <p>@param [String] alias_</p>
394
+ </li><li>
395
+ <p>@param [String] msg_title</p>
396
+ </li><li>
397
+ <p>@param [String] msg_content</p>
398
+ </li><li>
399
+ <p>@param [Hash] opts opts参数可包含 extras、override_msg_id</p>
400
+ </li><li>
401
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
402
+ </li></ul>
403
+
404
+
405
+
406
+
407
+ <div class="method-source-code" id="send_message_with_alias-source">
408
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 79</span>
409
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_message_with_alias</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">alias_</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
410
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">ALIAS</span>,
411
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">alias_</span>}
412
+ <span class="ruby-identifier">send_custom_message</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
413
+ <span class="ruby-keyword">end</span></pre>
414
+ </div><!-- send_message_with_alias-source -->
415
+
416
+ </div>
417
+
418
+
419
+
420
+
421
+ </div><!-- send_message_with_alias-method -->
422
+
423
+
424
+ <div id="method-i-send_message_with_appkey" class="method-detail ">
425
+
426
+ <div class="method-heading">
427
+ <span class="method-name">send_message_with_appkey</span><span
428
+ class="method-args">(send_no, msg_title, msg_content, opts = {})</span>
429
+
430
+ <span class="method-click-advice">click to toggle source</span>
431
+
432
+ </div>
433
+
434
+
435
+ <div class="method-description">
436
+
437
+ <ul><li>
438
+ <p>发送使用 appkey 推送的自定义消息</p>
439
+ </li><li>
440
+ <p>@param [Integer] send_no</p>
441
+ </li><li>
442
+ <p>@param [String] msg_title</p>
443
+ </li><li>
444
+ <p>@param [String] msg_content</p>
445
+ </li><li>
446
+ <p>@param [Hash] opts opts可选参数包含 extras、override_msg_id</p>
447
+ </li><li>
448
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
449
+ </li></ul>
450
+
451
+
452
+
453
+
454
+ <div class="method-source-code" id="send_message_with_appkey-source">
455
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 50</span>
456
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_message_with_appkey</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
457
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">BROADCAST</span>}
458
+ <span class="ruby-identifier">send_custom_message</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
459
+ <span class="ruby-keyword">end</span></pre>
460
+ </div><!-- send_message_with_appkey-source -->
461
+
462
+ </div>
463
+
464
+
465
+
466
+
467
+ </div><!-- send_message_with_appkey-method -->
468
+
469
+
470
+ <div id="method-i-send_message_with_imei" class="method-detail ">
471
+
472
+ <div class="method-heading">
473
+ <span class="method-name">send_message_with_imei</span><span
474
+ class="method-args">(send_no, imei, msg_title, msg_content, opts = {})</span>
475
+
476
+ <span class="method-click-advice">click to toggle source</span>
477
+
478
+ </div>
479
+
480
+
481
+ <div class="method-description">
482
+
483
+ <ul><li>
484
+ <p>发送带 imei 推送的自定义消息</p>
485
+ </li><li>
486
+ <p>@param [Integer] send_no</p>
487
+ </li><li>
488
+ <p>@param [String] imei</p>
489
+ </li><li>
490
+ <p>@param [String] msg_title</p>
491
+ </li><li>
492
+ <p>@param [String] msg_content</p>
493
+ </li><li>
494
+ <p>@param [Hash] opts opts参数可包含 extras、override_msg_id</p>
495
+ </li><li>
496
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
497
+ </li></ul>
498
+
499
+
500
+
501
+
502
+ <div class="method-source-code" id="send_message_with_imei-source">
503
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 94</span>
504
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_message_with_imei</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">imei</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
505
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">IMEI</span>,
506
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">imei</span>}
507
+ <span class="ruby-identifier">send_custom_message</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
508
+ <span class="ruby-keyword">end</span></pre>
509
+ </div><!-- send_message_with_imei-source -->
510
+
511
+ </div>
512
+
513
+
514
+
515
+
516
+ </div><!-- send_message_with_imei-method -->
517
+
518
+
519
+ <div id="method-i-send_message_with_tag" class="method-detail ">
520
+
521
+ <div class="method-heading">
522
+ <span class="method-name">send_message_with_tag</span><span
523
+ class="method-args">(send_no, tag, msg_title, msg_content, opts = {})</span>
524
+
525
+ <span class="method-click-advice">click to toggle source</span>
526
+
527
+ </div>
528
+
529
+
530
+ <div class="method-description">
531
+
532
+ <ul><li>
533
+ <p>发送标签带推送的自定义消息</p>
534
+ </li><li>
535
+ <p>@param [Integer] send_no</p>
536
+ </li><li>
537
+ <p>@param [String] tag</p>
538
+ </li><li>
539
+ <p>@param [String] msg_title</p>
540
+ </li><li>
541
+ <p>@param [String] msg_content</p>
542
+ </li><li>
543
+ <p>@param [Hash] opts opts参数可包含 extras、override_msg_id</p>
544
+ </li><li>
545
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
546
+ </li></ul>
547
+
548
+
549
+
550
+
551
+ <div class="method-source-code" id="send_message_with_tag-source">
552
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 64</span>
553
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_message_with_tag</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">tag</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
554
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">TAG</span>,
555
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tag</span>}
556
+ <span class="ruby-identifier">send_custom_message</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
557
+ <span class="ruby-keyword">end</span></pre>
558
+ </div><!-- send_message_with_tag-source -->
559
+
560
+ </div>
561
+
562
+
563
+
564
+
565
+ </div><!-- send_message_with_tag-method -->
566
+
567
+
568
+ <div id="method-i-send_notification_with_alias" class="method-detail ">
569
+
570
+ <div class="method-heading">
571
+ <span class="method-name">send_notification_with_alias</span><span
572
+ class="method-args">(send_no, alias_, msg_title, msg_content, opts = {})</span>
573
+
574
+ <span class="method-click-advice">click to toggle source</span>
575
+
576
+ </div>
577
+
578
+
579
+ <div class="method-description">
580
+
581
+ <ul><li>
582
+ <p>发送带别名推送的通知</p>
583
+ </li><li>
584
+ <p>@param [Integer] send_no</p>
585
+ </li><li>
586
+ <p>@param [String] alias_</p>
587
+ </li><li>
588
+ <p>@param [String] msg_title</p>
589
+ </li><li>
590
+ <p>@param [String] msg_content</p>
591
+ </li><li>
592
+ <p>@param [Hash] opts opts参数可包含builder_id 、extras、override_msg_id</p>
593
+ </li><li>
594
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
595
+ </li></ul>
596
+
597
+
598
+
599
+
600
+ <div class="method-source-code" id="send_notification_with_alias-source">
601
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 138</span>
602
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_notification_with_alias</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">alias_</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
603
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">ALIAS</span>,
604
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">alias_</span>}
605
+ <span class="ruby-identifier">send_notification</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
606
+ <span class="ruby-keyword">end</span></pre>
607
+ </div><!-- send_notification_with_alias-source -->
608
+
609
+ </div>
610
+
611
+
612
+
613
+
614
+ </div><!-- send_notification_with_alias-method -->
615
+
616
+
617
+ <div id="method-i-send_notification_with_appkey" class="method-detail ">
618
+
619
+ <div class="method-heading">
620
+ <span class="method-name">send_notification_with_appkey</span><span
621
+ class="method-args">(send_no, msg_title, msg_content, opts = {})</span>
622
+
623
+ <span class="method-click-advice">click to toggle source</span>
624
+
625
+ </div>
626
+
627
+
628
+ <div class="method-description">
629
+
630
+ <ul><li>
631
+ <p>发送使用 appkey 推送的通知</p>
632
+ </li><li>
633
+ <p>@param [Integer] send_no</p>
634
+ </li><li>
635
+ <p>@param [String] msg_title</p>
636
+ </li><li>
637
+ <p>@param [String] msg_content</p>
638
+ </li><li>
639
+ <p>@param [Hash] opts opts参数可包含 builder_id 、extras 、override_msg_id</p>
640
+ </li><li>
641
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
642
+ </li></ul>
643
+
644
+
645
+
646
+
647
+ <div class="method-source-code" id="send_notification_with_appkey-source">
648
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 108</span>
649
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_notification_with_appkey</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
650
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">BROADCAST</span>,
651
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;&#39;</span>}
652
+ <span class="ruby-identifier">send_notification</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
653
+ <span class="ruby-keyword">end</span></pre>
654
+ </div><!-- send_notification_with_appkey-source -->
655
+
656
+ </div>
657
+
658
+
659
+
660
+
661
+ </div><!-- send_notification_with_appkey-method -->
662
+
663
+
664
+ <div id="method-i-send_notification_with_imei" class="method-detail ">
665
+
666
+ <div class="method-heading">
667
+ <span class="method-name">send_notification_with_imei</span><span
668
+ class="method-args">(send_no, imei, msg_title, msg_content, opts = {})</span>
669
+
670
+ <span class="method-click-advice">click to toggle source</span>
671
+
672
+ </div>
673
+
674
+
675
+ <div class="method-description">
676
+
677
+ <ul><li>
678
+ <p>发送带IMEI号推送的通知</p>
679
+ </li><li>
680
+ <p>@param [Integer] send_no</p>
681
+ </li><li>
682
+ <p>@param [String] imei</p>
683
+ </li><li>
684
+ <p>@param [String] msg_title</p>
685
+ </li><li>
686
+ <p>@param [String] msg_content</p>
687
+ </li><li>
688
+ <p>@param [Hash] opts opts参数可包含 builder_id、extras、override_msg_id</p>
689
+ </li><li>
690
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
691
+ </li></ul>
692
+
693
+
694
+
695
+
696
+ <div class="method-source-code" id="send_notification_with_imei-source">
697
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 153</span>
698
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_notification_with_imei</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">imei</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
699
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">IMEI</span>,
700
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">imei</span>}
701
+ <span class="ruby-identifier">send_notification</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
702
+ <span class="ruby-keyword">end</span></pre>
703
+ </div><!-- send_notification_with_imei-source -->
704
+
705
+ </div>
706
+
707
+
708
+
709
+
710
+ </div><!-- send_notification_with_imei-method -->
711
+
712
+
713
+ <div id="method-i-send_notification_with_tag" class="method-detail ">
714
+
715
+ <div class="method-heading">
716
+ <span class="method-name">send_notification_with_tag</span><span
717
+ class="method-args">(send_no, tag, msg_title, msg_content, opts = {})</span>
718
+
719
+ <span class="method-click-advice">click to toggle source</span>
720
+
721
+ </div>
722
+
723
+
724
+ <div class="method-description">
725
+
726
+ <ul><li>
727
+ <p>发送带标签推送的通知</p>
728
+ </li><li>
729
+ <p>@param [Integer] send_no</p>
730
+ </li><li>
731
+ <p>@param [String] tag</p>
732
+ </li><li>
733
+ <p>@param [String] msg_title</p>
734
+ </li><li>
735
+ <p>@param [String] msg_content</p>
736
+ </li><li>
737
+ <p>@param [Hash] opts opts参数可包含 builder_id 、extras、override_msg_id</p>
738
+ </li><li>
739
+ <p>@return [Hash] sendno、msg_id、errcode、errmsg</p>
740
+ </li></ul>
741
+
742
+
743
+
744
+
745
+ <div class="method-source-code" id="send_notification_with_tag-source">
746
+ <pre><span class="ruby-comment"># File lib/jpush_api_ruby_client/client.rb, line 123</span>
747
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_notification_with_tag</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">tag</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">opts</span> = {})
748
+ <span class="ruby-identifier">receiver</span> = {<span class="ruby-value">:receiver_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ReceiverType</span><span class="ruby-operator">::</span><span class="ruby-constant">TAG</span>,
749
+ <span class="ruby-value">:receiver_value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">tag</span>}
750
+ <span class="ruby-identifier">send_notification</span>(<span class="ruby-identifier">send_no</span>, <span class="ruby-identifier">msg_title</span>, <span class="ruby-identifier">msg_content</span>, <span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">opts</span>)
751
+ <span class="ruby-keyword">end</span></pre>
752
+ </div><!-- send_notification_with_tag-source -->
753
+
754
+ </div>
755
+
756
+
757
+
758
+
759
+ </div><!-- send_notification_with_tag-method -->
760
+
761
+
762
+ </section><!-- public-instance-method-details -->
763
+
764
+ </section><!-- 5Buntitled-5D -->
765
+
766
+ </div><!-- documentation -->
767
+
768
+
769
+ <footer id="validator-badges">
770
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
771
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
772
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
773
+ </footer>
774
+