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,428 @@
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::Http
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::Http";
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 (H)</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">Http</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::Http
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/http.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+
94
+ <h2>Constant Summary</h2>
95
+ <dl class="constants">
96
+
97
+ <dt id="API_VERSION-constant" class="">API_VERSION =
98
+
99
+ </dt>
100
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
101
+
102
+ <dt id="HOST-constant" class="">HOST =
103
+
104
+ </dt>
105
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api.helium.com</span><span class='tstring_end'>&#39;</span></span></pre></dd>
106
+
107
+ <dt id="PROTOCOL-constant" class="">PROTOCOL =
108
+
109
+ </dt>
110
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>https</span><span class='tstring_end'>&#39;</span></span></pre></dd>
111
+
112
+ <dt id="BASE_HTTP_HEADERS-constant" class="">BASE_HTTP_HEADERS =
113
+
114
+ </dt>
115
+ <dd><pre class="code"><span class='lbrace'>{</span>
116
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Accept</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
117
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
118
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>User-Agent</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>helium-ruby</span><span class='tstring_end'>&#39;</span></span>
119
+ <span class='rbrace'>}</span></pre></dd>
120
+
121
+ </dl>
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <h2>
131
+ Instance Method Summary
132
+ <small><a href="#" class="summary_toggle">collapse</a></small>
133
+ </h2>
134
+
135
+ <ul class="summary">
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(path) &#x21d2; Object </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ <span class="summary_desc"><div class='inline'></div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(path = nil, url: nil, params: {}) &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'></div></span>
177
+
178
+ </li>
179
+
180
+
181
+ <li class="public ">
182
+ <span class="summary_signature">
183
+
184
+ <a href="#paginated_get-instance_method" title="#paginated_get (instance method)">#<strong>paginated_get</strong>(path, klass:, params: {}) &#x21d2; Object </a>
185
+
186
+
187
+
188
+ </span>
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ <span class="summary_desc"><div class='inline'></div></span>
199
+
200
+ </li>
201
+
202
+
203
+ <li class="public ">
204
+ <span class="summary_signature">
205
+
206
+ <a href="#patch-instance_method" title="#patch (instance method)">#<strong>patch</strong>(path, body: {}) &#x21d2; Object </a>
207
+
208
+
209
+
210
+ </span>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'></div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong>(path, body: {}) &#x21d2; Object </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <span class="summary_desc"><div class='inline'></div></span>
243
+
244
+ </li>
245
+
246
+
247
+ </ul>
248
+
249
+
250
+
251
+
252
+ <div id="instance_method_details" class="method_details_list">
253
+ <h2>Instance Method Details</h2>
254
+
255
+
256
+ <div class="method_details first">
257
+ <h3 class="signature first" id="delete-instance_method">
258
+
259
+ #<strong>delete</strong>(path) &#x21d2; <tt>Object</tt>
260
+
261
+
262
+
263
+
264
+
265
+ </h3><table class="source_code">
266
+ <tr>
267
+ <td>
268
+ <pre class="lines">
269
+
270
+
271
+ 33
272
+ 34
273
+ 35
274
+ 36
275
+ 37</pre>
276
+ </td>
277
+ <td>
278
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 33</span>
279
+
280
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
281
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_request'>generate_request</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>method:</span> <span class='symbol'>:delete</span><span class='rparen'>)</span>
282
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
283
+ <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span> <span class='op'>==</span> <span class='int'>204</span>
284
+ <span class='kw'>end</span></pre>
285
+ </td>
286
+ </tr>
287
+ </table>
288
+ </div>
289
+
290
+ <div class="method_details ">
291
+ <h3 class="signature " id="get-instance_method">
292
+
293
+ #<strong>get</strong>(path = nil, url: nil, params: {}) &#x21d2; <tt>Object</tt>
294
+
295
+
296
+
297
+
298
+
299
+ </h3><table class="source_code">
300
+ <tr>
301
+ <td>
302
+ <pre class="lines">
303
+
304
+
305
+ 14
306
+ 15
307
+ 16
308
+ 17</pre>
309
+ </td>
310
+ <td>
311
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 14</span>
312
+
313
+ <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>url:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
314
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_request'>generate_request</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>url:</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='label'>method:</span> <span class='symbol'>:get</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
315
+ <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
316
+ <span class='kw'>end</span></pre>
317
+ </td>
318
+ </tr>
319
+ </table>
320
+ </div>
321
+
322
+ <div class="method_details ">
323
+ <h3 class="signature " id="paginated_get-instance_method">
324
+
325
+ #<strong>paginated_get</strong>(path, klass:, params: {}) &#x21d2; <tt>Object</tt>
326
+
327
+
328
+
329
+
330
+
331
+ </h3><table class="source_code">
332
+ <tr>
333
+ <td>
334
+ <pre class="lines">
335
+
336
+
337
+ 19
338
+ 20
339
+ 21</pre>
340
+ </td>
341
+ <td>
342
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 19</span>
343
+
344
+ <span class='kw'>def</span> <span class='id identifier rubyid_paginated_get'>paginated_get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>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>
345
+ <span class='const'>Cursor</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'>path:</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>klass:</span> <span class='id identifier rubyid_klass'>klass</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
346
+ <span class='kw'>end</span></pre>
347
+ </td>
348
+ </tr>
349
+ </table>
350
+ </div>
351
+
352
+ <div class="method_details ">
353
+ <h3 class="signature " id="patch-instance_method">
354
+
355
+ #<strong>patch</strong>(path, body: {}) &#x21d2; <tt>Object</tt>
356
+
357
+
358
+
359
+
360
+
361
+ </h3><table class="source_code">
362
+ <tr>
363
+ <td>
364
+ <pre class="lines">
365
+
366
+
367
+ 28
368
+ 29
369
+ 30
370
+ 31</pre>
371
+ </td>
372
+ <td>
373
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 28</span>
374
+
375
+ <span class='kw'>def</span> <span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
376
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_request'>generate_request</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>method:</span> <span class='symbol'>:patch</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
377
+ <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
378
+ <span class='kw'>end</span></pre>
379
+ </td>
380
+ </tr>
381
+ </table>
382
+ </div>
383
+
384
+ <div class="method_details ">
385
+ <h3 class="signature " id="post-instance_method">
386
+
387
+ #<strong>post</strong>(path, body: {}) &#x21d2; <tt>Object</tt>
388
+
389
+
390
+
391
+
392
+
393
+ </h3><table class="source_code">
394
+ <tr>
395
+ <td>
396
+ <pre class="lines">
397
+
398
+
399
+ 23
400
+ 24
401
+ 25
402
+ 26</pre>
403
+ </td>
404
+ <td>
405
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 23</span>
406
+
407
+ <span class='kw'>def</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='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
408
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_generate_request'>generate_request</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>method:</span> <span class='symbol'>:post</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
409
+ <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
410
+ <span class='kw'>end</span></pre>
411
+ </td>
412
+ </tr>
413
+ </table>
414
+ </div>
415
+
416
+ </div>
417
+
418
+ </div>
419
+
420
+ <div id="footer">
421
+ Generated on Thu Aug 18 10:50:33 2016 by
422
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
423
+ 0.9.3 (ruby-2.3.1).
424
+ </div>
425
+
426
+ </div>
427
+ </body>
428
+ </html>
@@ -0,0 +1,251 @@
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::Organizations
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::Organizations";
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 (O)</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">Organizations</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::Organizations
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/organizations.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="#organization-instance_method" title="#organization (instance method)">#<strong>organization</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
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#organization_users-instance_method" title="#organization_users (instance method)">#<strong>organization_users</strong> &#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
+ </ul>
153
+
154
+
155
+
156
+
157
+ <div id="instance_method_details" class="method_details_list">
158
+ <h2>Instance Method Details</h2>
159
+
160
+
161
+ <div class="method_details first">
162
+ <h3 class="signature first" id="organization-instance_method">
163
+
164
+ #<strong>organization</strong> &#x21d2; <tt>Object</tt>
165
+
166
+
167
+
168
+
169
+
170
+ </h3><table class="source_code">
171
+ <tr>
172
+ <td>
173
+ <pre class="lines">
174
+
175
+
176
+ 4
177
+ 5
178
+ 6
179
+ 7
180
+ 8</pre>
181
+ </td>
182
+ <td>
183
+ <pre class="code"><span class="info file"># File 'lib/helium/client/organizations.rb', line 4</span>
184
+
185
+ <span class='kw'>def</span> <span class='id identifier rubyid_organization'>organization</span>
186
+ <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'>/organization</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
187
+ <span class='id identifier rubyid_org_data'>org_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>
188
+ <span class='kw'>return</span> <span class='const'>Organization</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_org_data'>org_data</span><span class='rparen'>)</span>
189
+ <span class='kw'>end</span></pre>
190
+ </td>
191
+ </tr>
192
+ </table>
193
+ </div>
194
+
195
+ <div class="method_details ">
196
+ <h3 class="signature " id="organization_users-instance_method">
197
+
198
+ #<strong>organization_users</strong> &#x21d2; <tt>Object</tt>
199
+
200
+
201
+
202
+
203
+
204
+ </h3><table class="source_code">
205
+ <tr>
206
+ <td>
207
+ <pre class="lines">
208
+
209
+
210
+ 10
211
+ 11
212
+ 12
213
+ 13
214
+ 14
215
+ 15
216
+ 16
217
+ 17
218
+ 18
219
+ 19</pre>
220
+ </td>
221
+ <td>
222
+ <pre class="code"><span class="info file"># File 'lib/helium/client/organizations.rb', line 10</span>
223
+
224
+ <span class='kw'>def</span> <span class='id identifier rubyid_organization_users'>organization_users</span>
225
+ <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'>/organization/user</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
226
+ <span class='id identifier rubyid_users_data'>users_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>
227
+
228
+ <span class='id identifier rubyid_users'>users</span> <span class='op'>=</span> <span class='id identifier rubyid_users_data'>users_data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_user_data'>user_data</span><span class='op'>|</span>
229
+ <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>
230
+ <span class='kw'>end</span>
231
+
232
+ <span class='kw'>return</span> <span class='id identifier rubyid_users'>users</span>
233
+ <span class='kw'>end</span></pre>
234
+ </td>
235
+ </tr>
236
+ </table>
237
+ </div>
238
+
239
+ </div>
240
+
241
+ </div>
242
+
243
+ <div id="footer">
244
+ Generated on Thu Aug 18 10:50:33 2016 by
245
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
246
+ 0.9.3 (ruby-2.3.1).
247
+ </div>
248
+
249
+ </div>
250
+ </body>
251
+ </html>