helium-ruby 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +47 -0
  3. data/docs/Helium.html +6 -6
  4. data/docs/Helium/Client.html +62 -34
  5. data/docs/Helium/Client/Configurations.html +296 -0
  6. data/docs/Helium/Client/DeviceConfigurations.html +465 -0
  7. data/docs/Helium/Client/Elements.html +92 -18
  8. data/docs/Helium/Client/Http.html +86 -28
  9. data/docs/Helium/Client/Labels.html +29 -86
  10. data/docs/Helium/Client/Organizations.html +5 -75
  11. data/docs/Helium/Client/Sensors.html +147 -17
  12. data/docs/Helium/Client/Users.html +5 -9
  13. data/docs/Helium/ClientError.html +3 -3
  14. data/docs/Helium/Collection.html +1053 -0
  15. data/docs/Helium/Configuration.html +380 -0
  16. data/docs/Helium/Cursor.html +7 -3
  17. data/docs/Helium/DataPoint.html +16 -5
  18. data/docs/Helium/DeviceConfiguration.html +476 -0
  19. data/docs/Helium/Element.html +203 -43
  20. data/docs/Helium/Error.html +15 -5
  21. data/docs/Helium/InvalidApiKey.html +3 -3
  22. data/docs/Helium/Label.html +35 -36
  23. data/docs/Helium/Metadata.html +589 -0
  24. data/docs/Helium/Organization.html +236 -17
  25. data/docs/Helium/Resource.html +655 -161
  26. data/docs/Helium/Sensor.html +345 -111
  27. data/docs/Helium/Timeseries.html +354 -0
  28. data/docs/Helium/User.html +161 -18
  29. data/docs/Helium/Utils.html +56 -4
  30. data/docs/_index.html +72 -7
  31. data/docs/class_list.html +1 -1
  32. data/docs/css/style.css +8 -1
  33. data/docs/file.README.html +66 -6
  34. data/docs/frames.html +1 -1
  35. data/docs/index.html +66 -6
  36. data/docs/method_list.html +619 -139
  37. data/docs/top-level-namespace.html +3 -3
  38. data/lib/helium.rb +2 -0
  39. data/lib/helium/client/configurations.rb +0 -12
  40. data/lib/helium/client/elements.rb +0 -12
  41. data/lib/helium/client/labels.rb +1 -12
  42. data/lib/helium/client/organizations.rb +1 -47
  43. data/lib/helium/client/sensors.rb +0 -12
  44. data/lib/helium/client/users.rb +1 -3
  45. data/lib/helium/collection.rb +129 -0
  46. data/lib/helium/configuration.rb +5 -1
  47. data/lib/helium/element.rb +1 -1
  48. data/lib/helium/label.rb +1 -3
  49. data/lib/helium/metadata.rb +58 -0
  50. data/lib/helium/organization.rb +4 -4
  51. data/lib/helium/resource.rb +28 -29
  52. data/lib/helium/sensor.rb +1 -1
  53. data/lib/helium/version.rb +1 -1
  54. metadata +11 -2
@@ -0,0 +1,465 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Helium::Client::DeviceConfigurations
8
+
9
+ &mdash; Documentation by YARD 0.9.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Helium::Client::DeviceConfigurations";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (D)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Helium.html" title="Helium (module)">Helium</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Client.html" title="Helium::Client (class)">Client</a></span></span>
41
+ &raquo;
42
+ <span class="title">DeviceConfigurations</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame" src="../../class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Module: Helium::Client::DeviceConfigurations
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Included in:</dt>
81
+ <dd><span class='object_link'><a href="../Client.html" title="Helium::Client (class)">Helium::Client</a></span></dd>
82
+ </dl>
83
+
84
+
85
+
86
+ <dl>
87
+ <dt>Defined in:</dt>
88
+ <dd>lib/helium/client/device_configurations.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <h2>
102
+ Instance Method Summary
103
+ <small><a href="#" class="summary_toggle">collapse</a></small>
104
+ </h2>
105
+
106
+ <ul class="summary">
107
+
108
+ <li class="public ">
109
+ <span class="summary_signature">
110
+
111
+ <a href="#create_device_configuration-instance_method" title="#create_device_configuration (instance method)">#<strong>create_device_configuration</strong>(device, configuration) &#x21d2; Object </a>
112
+
113
+
114
+
115
+ </span>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <span class="summary_desc"><div class='inline'></div></span>
126
+
127
+ </li>
128
+
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#device_configuration-instance_method" title="#device_configuration (instance method)">#<strong>device_configuration</strong>(id) &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'></div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#device_configuration_configuration-instance_method" title="#device_configuration_configuration (instance method)">#<strong>device_configuration_configuration</strong>(device_config) &#x21d2; Object </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'></div></span>
170
+
171
+ </li>
172
+
173
+
174
+ <li class="public ">
175
+ <span class="summary_signature">
176
+
177
+ <a href="#device_configuration_device-instance_method" title="#device_configuration_device (instance method)">#<strong>device_configuration_device</strong>(device_config) &#x21d2; Object </a>
178
+
179
+
180
+
181
+ </span>
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+ <span class="summary_desc"><div class='inline'></div></span>
192
+
193
+ </li>
194
+
195
+
196
+ <li class="public ">
197
+ <span class="summary_signature">
198
+
199
+ <a href="#device_configurations-instance_method" title="#device_configurations (instance method)">#<strong>device_configurations</strong> &#x21d2; Object </a>
200
+
201
+
202
+
203
+ </span>
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="summary_desc"><div class='inline'></div></span>
214
+
215
+ </li>
216
+
217
+
218
+ </ul>
219
+
220
+
221
+
222
+
223
+ <div id="instance_method_details" class="method_details_list">
224
+ <h2>Instance Method Details</h2>
225
+
226
+
227
+ <div class="method_details first">
228
+ <h3 class="signature first" id="create_device_configuration-instance_method">
229
+
230
+ #<strong>create_device_configuration</strong>(device, configuration) &#x21d2; <tt>Object</tt>
231
+
232
+
233
+
234
+
235
+
236
+ </h3><table class="source_code">
237
+ <tr>
238
+ <td>
239
+ <pre class="lines">
240
+
241
+
242
+ 35
243
+ 36
244
+ 37
245
+ 38
246
+ 39
247
+ 40
248
+ 41
249
+ 42
250
+ 43
251
+ 44
252
+ 45
253
+ 46
254
+ 47
255
+ 48
256
+ 49
257
+ 50
258
+ 51
259
+ 52
260
+ 53
261
+ 54
262
+ 55
263
+ 56
264
+ 57
265
+ 58
266
+ 59
267
+ 60
268
+ 61</pre>
269
+ </td>
270
+ <td>
271
+ <pre class="code"><span class="info file"># File 'lib/helium/client/device_configurations.rb', line 35</span>
272
+
273
+ <span class='kw'>def</span> <span class='id identifier rubyid_create_device_configuration'>create_device_configuration</span><span class='lparen'>(</span><span class='id identifier rubyid_device'>device</span><span class='comma'>,</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='rparen'>)</span>
274
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/device-configuration</span><span class='tstring_end'>&quot;</span></span>
275
+
276
+ <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
277
+ <span class='label'>data:</span> <span class='lbrace'>{</span>
278
+ <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>device-configuration</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
279
+ <span class='label'>relationships:</span> <span class='lbrace'>{</span>
280
+ <span class='label'>configuration:</span> <span class='lbrace'>{</span>
281
+ <span class='label'>data:</span> <span class='lbrace'>{</span>
282
+ <span class='label'>id:</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span>
283
+ <span class='label'>type:</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
284
+ <span class='rbrace'>}</span>
285
+ <span class='rbrace'>}</span><span class='comma'>,</span>
286
+ <span class='label'>device:</span> <span class='lbrace'>{</span>
287
+ <span class='label'>data:</span> <span class='lbrace'>{</span>
288
+ <span class='label'>id:</span> <span class='id identifier rubyid_device'>device</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span>
289
+ <span class='label'>type:</span> <span class='id identifier rubyid_device'>device</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
290
+ <span class='rbrace'>}</span>
291
+ <span class='rbrace'>}</span>
292
+ <span class='rbrace'>}</span>
293
+ <span class='rbrace'>}</span>
294
+ <span class='rbrace'>}</span>
295
+
296
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
297
+ <span class='id identifier rubyid_dc'>dc</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>data</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
298
+ <span class='kw'>return</span> <span class='const'>DeviceConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>client:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_dc'>dc</span><span class='rparen'>)</span>
299
+ <span class='kw'>end</span></pre>
300
+ </td>
301
+ </tr>
302
+ </table>
303
+ </div>
304
+
305
+ <div class="method_details ">
306
+ <h3 class="signature " id="device_configuration-instance_method">
307
+
308
+ #<strong>device_configuration</strong>(id) &#x21d2; <tt>Object</tt>
309
+
310
+
311
+
312
+
313
+
314
+ </h3><table class="source_code">
315
+ <tr>
316
+ <td>
317
+ <pre class="lines">
318
+
319
+
320
+ 9
321
+ 10
322
+ 11</pre>
323
+ </td>
324
+ <td>
325
+ <pre class="code"><span class="info file"># File 'lib/helium/client/device_configurations.rb', line 9</span>
326
+
327
+ <span class='kw'>def</span> <span class='id identifier rubyid_device_configuration'>device_configuration</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
328
+ <span class='const'>DeviceConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='label'>client:</span> <span class='kw'>self</span><span class='rparen'>)</span>
329
+ <span class='kw'>end</span></pre>
330
+ </td>
331
+ </tr>
332
+ </table>
333
+ </div>
334
+
335
+ <div class="method_details ">
336
+ <h3 class="signature " id="device_configuration_configuration-instance_method">
337
+
338
+ #<strong>device_configuration_configuration</strong>(device_config) &#x21d2; <tt>Object</tt>
339
+
340
+
341
+
342
+
343
+
344
+ </h3><table class="source_code">
345
+ <tr>
346
+ <td>
347
+ <pre class="lines">
348
+
349
+
350
+ 13
351
+ 14
352
+ 15
353
+ 16
354
+ 17
355
+ 18
356
+ 19</pre>
357
+ </td>
358
+ <td>
359
+ <pre class="code"><span class="info file"># File 'lib/helium/client/device_configurations.rb', line 13</span>
360
+
361
+ <span class='kw'>def</span> <span class='id identifier rubyid_device_configuration_configuration'>device_configuration_configuration</span><span class='lparen'>(</span><span class='id identifier rubyid_device_config'>device_config</span><span class='rparen'>)</span>
362
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/device-configuration/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_config'>device_config</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/configuration</span><span class='tstring_end'>&quot;</span></span>
363
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
364
+ <span class='id identifier rubyid_configj'>configj</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>data</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
365
+ <span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>client:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_configj'>configj</span><span class='rparen'>)</span>
366
+ <span class='kw'>return</span> <span class='id identifier rubyid_config'>config</span>
367
+ <span class='kw'>end</span></pre>
368
+ </td>
369
+ </tr>
370
+ </table>
371
+ </div>
372
+
373
+ <div class="method_details ">
374
+ <h3 class="signature " id="device_configuration_device-instance_method">
375
+
376
+ #<strong>device_configuration_device</strong>(device_config) &#x21d2; <tt>Object</tt>
377
+
378
+
379
+
380
+
381
+
382
+ </h3><table class="source_code">
383
+ <tr>
384
+ <td>
385
+ <pre class="lines">
386
+
387
+
388
+ 21
389
+ 22
390
+ 23
391
+ 24
392
+ 25
393
+ 26
394
+ 27
395
+ 28
396
+ 29
397
+ 30
398
+ 31
399
+ 32
400
+ 33</pre>
401
+ </td>
402
+ <td>
403
+ <pre class="code"><span class="info file"># File 'lib/helium/client/device_configurations.rb', line 21</span>
404
+
405
+ <span class='kw'>def</span> <span class='id identifier rubyid_device_configuration_device'>device_configuration_device</span><span class='lparen'>(</span><span class='id identifier rubyid_device_config'>device_config</span><span class='rparen'>)</span>
406
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/device-configuration/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_config'>device_config</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/device</span><span class='tstring_end'>&quot;</span></span>
407
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
408
+ <span class='id identifier rubyid_configj'>configj</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>data</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
409
+
410
+ <span class='kw'>if</span> <span class='id identifier rubyid_configj'>configj</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>type</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sensor</span><span class='tstring_end'>&quot;</span></span>
411
+ <span class='id identifier rubyid_device'>device</span> <span class='op'>=</span> <span class='const'>Sensor</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>client:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_configj'>configj</span><span class='rparen'>)</span>
412
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_configj'>configj</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>type</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>element</span><span class='tstring_end'>&quot;</span></span>
413
+ <span class='id identifier rubyid_device'>device</span> <span class='op'>=</span> <span class='const'>Element</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>client:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_configj'>configj</span><span class='rparen'>)</span>
414
+ <span class='kw'>end</span>
415
+
416
+ <span class='kw'>return</span> <span class='id identifier rubyid_device'>device</span>
417
+ <span class='kw'>end</span></pre>
418
+ </td>
419
+ </tr>
420
+ </table>
421
+ </div>
422
+
423
+ <div class="method_details ">
424
+ <h3 class="signature " id="device_configurations-instance_method">
425
+
426
+ #<strong>device_configurations</strong> &#x21d2; <tt>Object</tt>
427
+
428
+
429
+
430
+
431
+
432
+ </h3><table class="source_code">
433
+ <tr>
434
+ <td>
435
+ <pre class="lines">
436
+
437
+
438
+ 5
439
+ 6
440
+ 7</pre>
441
+ </td>
442
+ <td>
443
+ <pre class="code"><span class="info file"># File 'lib/helium/client/device_configurations.rb', line 5</span>
444
+
445
+ <span class='kw'>def</span> <span class='id identifier rubyid_device_configurations'>device_configurations</span>
446
+ <span class='const'>DeviceConfiguration</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='label'>client:</span> <span class='kw'>self</span><span class='rparen'>)</span>
447
+ <span class='kw'>end</span></pre>
448
+ </td>
449
+ </tr>
450
+ </table>
451
+ </div>
452
+
453
+ </div>
454
+
455
+ </div>
456
+
457
+ <div id="footer">
458
+ Generated on Thu Jan 12 15:58:34 2017 by
459
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
460
+ 0.9.5 (ruby-2.3.1).
461
+ </div>
462
+
463
+ </div>
464
+ </body>
465
+ </html>