helium-ruby 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +31 -0
  3. data/.csslintrc +2 -0
  4. data/.eslintignore +1 -0
  5. data/.eslintrc +213 -0
  6. data/.gitignore +0 -1
  7. data/.rubocop.yml +1156 -0
  8. data/CONTRIBUTING.md +33 -0
  9. data/LICENSE.txt +23 -17
  10. data/README.md +58 -47
  11. data/Rakefile +14 -0
  12. data/bin/console +8 -0
  13. data/docs/Helium.html +131 -0
  14. data/docs/Helium/Client.html +493 -0
  15. data/docs/Helium/Client/Http.html +428 -0
  16. data/docs/Helium/Client/Organizations.html +251 -0
  17. data/docs/Helium/Client/Sensors.html +543 -0
  18. data/docs/Helium/Client/Users.html +185 -0
  19. data/docs/Helium/Cursor.html +305 -0
  20. data/docs/Helium/DataPoint.html +707 -0
  21. data/docs/Helium/Organization.html +632 -0
  22. data/docs/Helium/Sensor.html +820 -0
  23. data/docs/Helium/User.html +563 -0
  24. data/docs/Helium/Utils.html +183 -0
  25. data/docs/_index.html +226 -0
  26. data/docs/class_list.html +51 -0
  27. data/docs/css/common.css +1 -0
  28. data/docs/css/full_list.css +58 -0
  29. data/docs/css/style.css +474 -0
  30. data/docs/file.README.html +266 -0
  31. data/docs/file_list.html +56 -0
  32. data/docs/frames.html +17 -0
  33. data/docs/index.html +266 -0
  34. data/docs/js/app.js +243 -0
  35. data/docs/js/full_list.js +216 -0
  36. data/docs/js/jquery.js +4 -0
  37. data/docs/method_list.html +475 -0
  38. data/docs/top-level-namespace.html +112 -0
  39. data/helium-ruby.gemspec +2 -0
  40. data/lib/helium.rb +1 -1
  41. data/lib/helium/client.rb +0 -16
  42. data/lib/helium/client/http.rb +50 -9
  43. data/lib/helium/client/sensors.rb +51 -28
  44. data/lib/helium/cursor.rb +54 -0
  45. data/lib/helium/data_point.rb +3 -3
  46. data/lib/helium/sensor.rb +9 -0
  47. data/lib/helium/version.rb +1 -1
  48. metadata +63 -3
  49. data/lib/helium/timeseries.rb +0 -35
@@ -0,0 +1,185 @@
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::Users
8
+
9
+ &mdash; Documentation by YARD 0.9.3
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::Users";
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 (U)</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">Users</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::Users
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/users.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="#user-instance_method" title="#user (instance method)">#<strong>user</strong> &#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
+ </ul>
131
+
132
+
133
+
134
+
135
+ <div id="instance_method_details" class="method_details_list">
136
+ <h2>Instance Method Details</h2>
137
+
138
+
139
+ <div class="method_details first">
140
+ <h3 class="signature first" id="user-instance_method">
141
+
142
+ #<strong>user</strong> &#x21d2; <tt>Object</tt>
143
+
144
+
145
+
146
+
147
+
148
+ </h3><table class="source_code">
149
+ <tr>
150
+ <td>
151
+ <pre class="lines">
152
+
153
+
154
+ 4
155
+ 5
156
+ 6
157
+ 7
158
+ 8</pre>
159
+ </td>
160
+ <td>
161
+ <pre class="code"><span class="info file"># File 'lib/helium/client/users.rb', line 4</span>
162
+
163
+ <span class='kw'>def</span> <span class='id identifier rubyid_user'>user</span>
164
+ <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='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/user</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
165
+ <span class='id identifier rubyid_user_data'>user_data</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>
166
+ <span class='kw'>return</span> <span class='const'>User</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_user_data'>user_data</span><span class='rparen'>)</span>
167
+ <span class='kw'>end</span></pre>
168
+ </td>
169
+ </tr>
170
+ </table>
171
+ </div>
172
+
173
+ </div>
174
+
175
+ </div>
176
+
177
+ <div id="footer">
178
+ Generated on Thu Aug 18 10:50:33 2016 by
179
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
180
+ 0.9.3 (ruby-2.3.1).
181
+ </div>
182
+
183
+ </div>
184
+ </body>
185
+ </html>
@@ -0,0 +1,305 @@
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
+ Class: Helium::Cursor
8
+
9
+ &mdash; Documentation by YARD 0.9.3
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::Cursor";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Helium.html" title="Helium (module)">Helium</a></span></span>
41
+ &raquo;
42
+ <span class="title">Cursor</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>Class: Helium::Cursor
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName">Object</span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next">Helium::Cursor</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <dl>
93
+ <dt>Includes:</dt>
94
+ <dd>Enumerable</dd>
95
+ </dl>
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <dl>
103
+ <dt>Defined in:</dt>
104
+ <dd>lib/helium/cursor.rb</dd>
105
+ </dl>
106
+
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong>(start = 0) &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'></div></span>
142
+
143
+ </li>
144
+
145
+
146
+ <li class="public ">
147
+ <span class="summary_signature">
148
+
149
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client:, path:, klass:, params: {}) &#x21d2; Cursor </a>
150
+
151
+
152
+
153
+ </span>
154
+
155
+
156
+ <span class="note title constructor">constructor</span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ <span class="summary_desc"><div class='inline'><p>A new instance of Cursor.</p>
166
+ </div></span>
167
+
168
+ </li>
169
+
170
+
171
+ </ul>
172
+
173
+
174
+
175
+ <div id="constructor_details" class="method_details_list">
176
+ <h2>Constructor Details</h2>
177
+
178
+ <div class="method_details first">
179
+ <h3 class="signature first" id="initialize-instance_method">
180
+
181
+ #<strong>initialize</strong>(client:, path:, klass:, params: {}) &#x21d2; <tt><span class='object_link'><a href="" title="Helium::Cursor (class)">Cursor</a></span></tt>
182
+
183
+
184
+
185
+
186
+
187
+ </h3><div class="docstring">
188
+ <div class="discussion">
189
+ <p>Returns a new instance of Cursor</p>
190
+
191
+
192
+ </div>
193
+ </div>
194
+ <div class="tags">
195
+
196
+
197
+ </div><table class="source_code">
198
+ <tr>
199
+ <td>
200
+ <pre class="lines">
201
+
202
+
203
+ 5
204
+ 6
205
+ 7
206
+ 8
207
+ 9
208
+ 10
209
+ 11
210
+ 12
211
+ 13
212
+ 14</pre>
213
+ </td>
214
+ <td>
215
+ <pre class="code"><span class="info file"># File 'lib/helium/cursor.rb', line 5</span>
216
+
217
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>client:</span><span class='comma'>,</span> <span class='label'>path:</span><span class='comma'>,</span> <span class='label'>klass:</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
218
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
219
+ <span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span>
220
+ <span class='ivar'>@klass</span> <span class='op'>=</span> <span class='id identifier rubyid_klass'>klass</span>
221
+ <span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span>
222
+
223
+ <span class='ivar'>@collection</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
224
+ <span class='ivar'>@next_link</span> <span class='op'>=</span> <span class='kw'>nil</span>
225
+ <span class='ivar'>@is_last</span> <span class='op'>=</span> <span class='kw'>false</span>
226
+ <span class='kw'>end</span></pre>
227
+ </td>
228
+ </tr>
229
+ </table>
230
+ </div>
231
+
232
+ </div>
233
+
234
+
235
+ <div id="instance_method_details" class="method_details_list">
236
+ <h2>Instance Method Details</h2>
237
+
238
+
239
+ <div class="method_details first">
240
+ <h3 class="signature first" id="each-instance_method">
241
+
242
+ #<strong>each</strong>(start = 0) &#x21d2; <tt>Object</tt>
243
+
244
+
245
+
246
+
247
+
248
+ </h3><table class="source_code">
249
+ <tr>
250
+ <td>
251
+ <pre class="lines">
252
+
253
+
254
+ 16
255
+ 17
256
+ 18
257
+ 19
258
+ 20
259
+ 21
260
+ 22
261
+ 23
262
+ 24
263
+ 25
264
+ 26
265
+ 27
266
+ 28
267
+ 29
268
+ 30</pre>
269
+ </td>
270
+ <td>
271
+ <pre class="code"><span class="info file"># File 'lib/helium/cursor.rb', line 16</span>
272
+
273
+ <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span> <span class='op'>=</span> <span class='int'>0</span><span class='rparen'>)</span>
274
+ <span class='kw'>return</span> <span class='id identifier rubyid_to_enum'>to_enum</span><span class='lparen'>(</span><span class='symbol'>:each</span><span class='comma'>,</span> <span class='id identifier rubyid_start'>start</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
275
+
276
+ <span class='const'>Array</span><span class='lparen'>(</span><span class='ivar'>@collection</span><span class='lbracket'>[</span><span class='id identifier rubyid_start'>start</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span>
277
+ <span class='kw'>yield</span><span class='lparen'>(</span><span class='id identifier rubyid_element'>element</span><span class='rparen'>)</span>
278
+ <span class='kw'>end</span>
279
+
280
+ <span class='kw'>unless</span> <span class='id identifier rubyid_last?'>last?</span>
281
+ <span class='id identifier rubyid_start'>start</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='ivar'>@collection</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='comma'>,</span> <span class='id identifier rubyid_start'>start</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
282
+
283
+ <span class='id identifier rubyid_fetch_next_page'>fetch_next_page</span>
284
+
285
+ <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
286
+ <span class='kw'>end</span>
287
+ <span class='kw'>end</span></pre>
288
+ </td>
289
+ </tr>
290
+ </table>
291
+ </div>
292
+
293
+ </div>
294
+
295
+ </div>
296
+
297
+ <div id="footer">
298
+ Generated on Thu Aug 18 10:50:33 2016 by
299
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
300
+ 0.9.3 (ruby-2.3.1).
301
+ </div>
302
+
303
+ </div>
304
+ </body>
305
+ </html>