helium-ruby 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/README.md +3 -3
  4. data/docs/Helium.html +4 -4
  5. data/docs/Helium/Client.html +9 -9
  6. data/docs/Helium/Client/Elements.html +8 -110
  7. data/docs/Helium/Client/Http.html +31 -33
  8. data/docs/Helium/Client/Labels.html +38 -218
  9. data/docs/Helium/Client/Organizations.html +1 -1
  10. data/docs/Helium/Client/Sensors.html +30 -214
  11. data/docs/Helium/Client/Users.html +1 -1
  12. data/docs/Helium/ClientError.html +153 -0
  13. data/docs/Helium/Cursor.html +8 -8
  14. data/docs/Helium/DataPoint.html +9 -9
  15. data/docs/Helium/Element.html +16 -79
  16. data/docs/Helium/Error.html +267 -0
  17. data/docs/Helium/InvalidApiKey.html +157 -0
  18. data/docs/Helium/Label.html +29 -133
  19. data/docs/Helium/Organization.html +8 -8
  20. data/docs/Helium/Resource.html +717 -43
  21. data/docs/Helium/Sensor.html +31 -132
  22. data/docs/Helium/User.html +8 -8
  23. data/docs/Helium/Utils.html +1 -1
  24. data/docs/_index.html +33 -4
  25. data/docs/class_list.html +1 -1
  26. data/docs/file.README.html +4 -4
  27. data/docs/index.html +4 -4
  28. data/docs/method_list.html +112 -144
  29. data/docs/top-level-namespace.html +1 -1
  30. data/lib/helium.rb +1 -0
  31. data/lib/helium/client.rb +3 -3
  32. data/lib/helium/client/elements.rb +10 -27
  33. data/lib/helium/client/http.rb +38 -19
  34. data/lib/helium/client/labels.rb +7 -53
  35. data/lib/helium/client/sensors.rb +5 -54
  36. data/lib/helium/cursor.rb +6 -6
  37. data/lib/helium/data_point.rb +5 -5
  38. data/lib/helium/element.rb +7 -8
  39. data/lib/helium/error.rb +28 -0
  40. data/lib/helium/label.rb +3 -11
  41. data/lib/helium/organization.rb +4 -4
  42. data/lib/helium/resource.rb +103 -5
  43. data/lib/helium/sensor.rb +13 -15
  44. data/lib/helium/user.rb +4 -4
  45. data/lib/helium/version.rb +1 -1
  46. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fdbf674c33496abc4e68e2b22315c4cb3624d67
4
- data.tar.gz: b1bba384d866d1db0655c6e9bd563d19986c8bc8
3
+ metadata.gz: 12f81526d2121b547943b1271d19d364a84931f5
4
+ data.tar.gz: 3f840cf2cb8d044af2859f10d78b654f36289297
5
5
  SHA512:
6
- metadata.gz: ac81899c675e3e37c7218ba34d70245e258f85d77a28de1e1f589de5b1b6404dfbd7c167197aed18cb65064b5fc5d43d05e38c49627c4fce97dce9a8fcb5f693
7
- data.tar.gz: 6533650c473ed52c0e0f51cc9c7861e83152ac8518faf64405fd1d3a0d4b52a5218a5ce845898abbfbd443de2d511fd84d1d95791631e4d353b670881e087e4a
6
+ metadata.gz: b1c2f3286d86f1d1bb5372f64a8c03f3650c71ecfc6332c6760cfec1df1100c735cd90b5aba2ee2f85949eedb535a0e8ce91bcd85bb0341b32ec19b3bb59cd02
7
+ data.tar.gz: 14bdecc56bb990396bcf859aa24290e641b291d6d4d569f8c86cfc43709903b0c0a1c22aa6d969d3089fc5f9fbe9d77daa86dc9e699fb627d19fafc6c88fb299
@@ -1,5 +1,6 @@
1
1
  AllCops:
2
2
  DisabledByDefault: true
3
+ TargetRubyVersion: 2.1
3
4
 
4
5
  #################### Lint ################################
5
6
 
data/README.md CHANGED
@@ -12,7 +12,7 @@ A Ruby gem for building applications with the Helium API. [Helium](https://www.h
12
12
  Add this line to your application's Gemfile:
13
13
 
14
14
  ```ruby
15
- gem 'helium-ruby'
15
+ gem 'helium-ruby', require: 'helium'
16
16
  ```
17
17
 
18
18
  And then execute:
@@ -75,7 +75,7 @@ client.sensor("08bab58b-d095-4c7c-912c-1f8024d91d95")
75
75
 
76
76
  #### Create a Virtual Sensor
77
77
  ```ruby
78
- sensor = client.new_sensor(name: "A New Sensor")
78
+ sensor = client.create_sensor(name: "A New Sensor")
79
79
  # => #<Helium::Sensor:0x007f89acdb1b58 @id="08bab58b-d095-4c7c-912c-1f8024d91d95", @name="A New Sensor", @mac="6081f9fffe00019b", @ports=["t", "b"], @created_at="2015-08-06T17:28:11.614107Z", @updated_at="2016-05-30T22:36:50.810716Z">
80
80
  ```
81
81
 
@@ -200,7 +200,7 @@ Sensors can be grouped together under a named label.
200
200
 
201
201
  #### Create a Label
202
202
  ```ruby
203
- client.new_label(name: 'A New Label')
203
+ client.create_label(name: 'A New Label')
204
204
  # => #<Helium::Label:0x007ffd80f2be28 @id="409d9394-60d5-436a-b8cb-7160d466fc5a", @name="A New Label", @created_at="2016-08-22T18:58:34.415862Z", @updated_at="2016-08-22T18:58:34.415862Z">
205
205
  ```
206
206
 
@@ -81,7 +81,7 @@
81
81
  <dl>
82
82
  <dt>Defined in:</dt>
83
83
  <dd>lib/helium.rb<span class="defines">,<br />
84
- lib/helium/user.rb,<br /> lib/helium/utils.rb,<br /> lib/helium/label.rb,<br /> lib/helium/cursor.rb,<br /> lib/helium/sensor.rb,<br /> lib/helium/client.rb,<br /> lib/helium/element.rb,<br /> lib/helium/version.rb,<br /> lib/helium/resource.rb,<br /> lib/helium/data_point.rb,<br /> lib/helium/client/http.rb,<br /> lib/helium/client/users.rb,<br /> lib/helium/organization.rb,<br /> lib/helium/client/labels.rb,<br /> lib/helium/client/sensors.rb,<br /> lib/helium/client/elements.rb,<br /> lib/helium/client/organizations.rb</span>
84
+ lib/helium/user.rb,<br /> lib/helium/label.rb,<br /> lib/helium/utils.rb,<br /> lib/helium/error.rb,<br /> lib/helium/cursor.rb,<br /> lib/helium/sensor.rb,<br /> lib/helium/client.rb,<br /> lib/helium/element.rb,<br /> lib/helium/version.rb,<br /> lib/helium/resource.rb,<br /> lib/helium/data_point.rb,<br /> lib/helium/client/http.rb,<br /> lib/helium/client/users.rb,<br /> lib/helium/organization.rb,<br /> lib/helium/client/labels.rb,<br /> lib/helium/client/sensors.rb,<br /> lib/helium/client/elements.rb,<br /> lib/helium/client/organizations.rb</span>
85
85
  </dd>
86
86
  </dl>
87
87
 
@@ -95,7 +95,7 @@
95
95
 
96
96
 
97
97
 
98
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Helium/Client.html" title="Helium::Client (class)">Client</a></span>, <span class='object_link'><a href="Helium/Cursor.html" title="Helium::Cursor (class)">Cursor</a></span>, <span class='object_link'><a href="Helium/DataPoint.html" title="Helium::DataPoint (class)">DataPoint</a></span>, <span class='object_link'><a href="Helium/Element.html" title="Helium::Element (class)">Element</a></span>, <span class='object_link'><a href="Helium/Label.html" title="Helium::Label (class)">Label</a></span>, <span class='object_link'><a href="Helium/Organization.html" title="Helium::Organization (class)">Organization</a></span>, <span class='object_link'><a href="Helium/Resource.html" title="Helium::Resource (class)">Resource</a></span>, <span class='object_link'><a href="Helium/Sensor.html" title="Helium::Sensor (class)">Sensor</a></span>, <span class='object_link'><a href="Helium/User.html" title="Helium::User (class)">User</a></span>
98
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Helium/Client.html" title="Helium::Client (class)">Client</a></span>, <span class='object_link'><a href="Helium/ClientError.html" title="Helium::ClientError (class)">ClientError</a></span>, <span class='object_link'><a href="Helium/Cursor.html" title="Helium::Cursor (class)">Cursor</a></span>, <span class='object_link'><a href="Helium/DataPoint.html" title="Helium::DataPoint (class)">DataPoint</a></span>, <span class='object_link'><a href="Helium/Element.html" title="Helium::Element (class)">Element</a></span>, <span class='object_link'><a href="Helium/Error.html" title="Helium::Error (class)">Error</a></span>, <span class='object_link'><a href="Helium/InvalidApiKey.html" title="Helium::InvalidApiKey (class)">InvalidApiKey</a></span>, <span class='object_link'><a href="Helium/Label.html" title="Helium::Label (class)">Label</a></span>, <span class='object_link'><a href="Helium/Organization.html" title="Helium::Organization (class)">Organization</a></span>, <span class='object_link'><a href="Helium/Resource.html" title="Helium::Resource (class)">Resource</a></span>, <span class='object_link'><a href="Helium/Sensor.html" title="Helium::Sensor (class)">Sensor</a></span>, <span class='object_link'><a href="Helium/User.html" title="Helium::User (class)">User</a></span>
99
99
 
100
100
 
101
101
  </p>
@@ -106,7 +106,7 @@
106
106
  <dt id="VERSION-constant" class="">VERSION =
107
107
 
108
108
  </dt>
109
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.3.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
109
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.4.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
110
110
 
111
111
  </dl>
112
112
 
@@ -121,7 +121,7 @@
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Mon Aug 22 15:52:19 2016 by
124
+ Generated on Wed Aug 24 13:22:50 2016 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.9.3 (ruby-2.3.1).
127
127
  </div>
@@ -195,7 +195,7 @@
195
195
  <li class="public ">
196
196
  <span class="summary_signature">
197
197
 
198
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(api_key:, debug: false) &#x21d2; Client </a>
198
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) &#x21d2; Client </a>
199
199
 
200
200
 
201
201
 
@@ -252,7 +252,7 @@
252
252
 
253
253
 
254
254
  <h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Elements.html" title="Helium::Client::Elements (module)">Elements</a></span></h3>
255
- <p class="inherited"><span class='object_link'><a href="Client/Elements.html#element-instance_method" title="Helium::Client::Elements#element (method)">#element</a></span>, <span class='object_link'><a href="Client/Elements.html#elements-instance_method" title="Helium::Client::Elements#elements (method)">#elements</a></span>, <span class='object_link'><a href="Client/Elements.html#update_element-instance_method" title="Helium::Client::Elements#update_element (method)">#update_element</a></span></p>
255
+ <p class="inherited"><span class='object_link'><a href="Client/Elements.html#element-instance_method" title="Helium::Client::Elements#element (method)">#element</a></span>, <span class='object_link'><a href="Client/Elements.html#elements-instance_method" title="Helium::Client::Elements#elements (method)">#elements</a></span></p>
256
256
 
257
257
 
258
258
 
@@ -263,7 +263,7 @@
263
263
 
264
264
 
265
265
  <h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Labels.html" title="Helium::Client::Labels (module)">Labels</a></span></h3>
266
- <p class="inherited"><span class='object_link'><a href="Client/Labels.html#delete_label-instance_method" title="Helium::Client::Labels#delete_label (method)">#delete_label</a></span>, <span class='object_link'><a href="Client/Labels.html#label-instance_method" title="Helium::Client::Labels#label (method)">#label</a></span>, <span class='object_link'><a href="Client/Labels.html#label_sensors-instance_method" title="Helium::Client::Labels#label_sensors (method)">#label_sensors</a></span>, <span class='object_link'><a href="Client/Labels.html#labels-instance_method" title="Helium::Client::Labels#labels (method)">#labels</a></span>, <span class='object_link'><a href="Client/Labels.html#new_label-instance_method" title="Helium::Client::Labels#new_label (method)">#new_label</a></span>, <span class='object_link'><a href="Client/Labels.html#update_label-instance_method" title="Helium::Client::Labels#update_label (method)">#update_label</a></span>, <span class='object_link'><a href="Client/Labels.html#update_label_sensors-instance_method" title="Helium::Client::Labels#update_label_sensors (method)">#update_label_sensors</a></span></p>
266
+ <p class="inherited"><span class='object_link'><a href="Client/Labels.html#create_label-instance_method" title="Helium::Client::Labels#create_label (method)">#create_label</a></span>, <span class='object_link'><a href="Client/Labels.html#label-instance_method" title="Helium::Client::Labels#label (method)">#label</a></span>, <span class='object_link'><a href="Client/Labels.html#label_sensors-instance_method" title="Helium::Client::Labels#label_sensors (method)">#label_sensors</a></span>, <span class='object_link'><a href="Client/Labels.html#labels-instance_method" title="Helium::Client::Labels#labels (method)">#labels</a></span>, <span class='object_link'><a href="Client/Labels.html#update_label_sensors-instance_method" title="Helium::Client::Labels#update_label_sensors (method)">#update_label_sensors</a></span></p>
267
267
 
268
268
 
269
269
 
@@ -274,7 +274,7 @@
274
274
 
275
275
 
276
276
  <h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Sensors.html" title="Helium::Client::Sensors (module)">Sensors</a></span></h3>
277
- <p class="inherited"><span class='object_link'><a href="Client/Sensors.html#delete_sensor-instance_method" title="Helium::Client::Sensors#delete_sensor (method)">#delete_sensor</a></span>, <span class='object_link'><a href="Client/Sensors.html#new_sensor-instance_method" title="Helium::Client::Sensors#new_sensor (method)">#new_sensor</a></span>, <span class='object_link'><a href="Client/Sensors.html#sensor-instance_method" title="Helium::Client::Sensors#sensor (method)">#sensor</a></span>, <span class='object_link'><a href="Client/Sensors.html#sensor_timeseries-instance_method" title="Helium::Client::Sensors#sensor_timeseries (method)">#sensor_timeseries</a></span>, <span class='object_link'><a href="Client/Sensors.html#sensors-instance_method" title="Helium::Client::Sensors#sensors (method)">#sensors</a></span>, <span class='object_link'><a href="Client/Sensors.html#update_sensor-instance_method" title="Helium::Client::Sensors#update_sensor (method)">#update_sensor</a></span></p>
277
+ <p class="inherited"><span class='object_link'><a href="Client/Sensors.html#create_sensor-instance_method" title="Helium::Client::Sensors#create_sensor (method)">#create_sensor</a></span>, <span class='object_link'><a href="Client/Sensors.html#sensor-instance_method" title="Helium::Client::Sensors#sensor (method)">#sensor</a></span>, <span class='object_link'><a href="Client/Sensors.html#sensor_timeseries-instance_method" title="Helium::Client::Sensors#sensor_timeseries (method)">#sensor_timeseries</a></span>, <span class='object_link'><a href="Client/Sensors.html#sensors-instance_method" title="Helium::Client::Sensors#sensors (method)">#sensors</a></span></p>
278
278
 
279
279
 
280
280
 
@@ -325,7 +325,7 @@
325
325
  <div class="method_details first">
326
326
  <h3 class="signature first" id="initialize-instance_method">
327
327
 
328
- #<strong>initialize</strong>(api_key:, debug: false) &#x21d2; <tt><span class='object_link'><a href="" title="Helium::Client (class)">Client</a></span></tt>
328
+ #<strong>initialize</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Helium::Client (class)">Client</a></span></tt>
329
329
 
330
330
 
331
331
 
@@ -355,9 +355,9 @@
355
355
  <td>
356
356
  <pre class="code"><span class="info file"># File 'lib/helium/client.rb', line 20</span>
357
357
 
358
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>api_key:</span><span class='comma'>,</span> <span class='label'>debug:</span> <span class='kw'>false</span><span class='rparen'>)</span>
359
- <span class='ivar'>@api_key</span> <span class='op'>=</span> <span class='id identifier rubyid_api_key'>api_key</span>
360
- <span class='ivar'>@debug</span> <span class='op'>=</span> <span class='id identifier rubyid_debug'>debug</span>
358
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
359
+ <span class='ivar'>@api_key</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:api_key</span><span class='rparen'>)</span>
360
+ <span class='ivar'>@debug</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:debug</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
361
361
  <span class='kw'>end</span></pre>
362
362
  </td>
363
363
  </tr>
@@ -505,7 +505,7 @@
505
505
  </div>
506
506
 
507
507
  <div id="footer">
508
- Generated on Mon Aug 22 15:52:20 2016 by
508
+ Generated on Wed Aug 24 13:22:51 2016 by
509
509
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
510
510
  0.9.3 (ruby-2.3.1).
511
511
  </div>
@@ -144,28 +144,6 @@
144
144
 
145
145
 
146
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="#update_element-instance_method" title="#update_element (instance method)">#<strong>update_element</strong>(element, name:) &#x21d2; Object </a>
156
-
157
-
158
-
159
- </span>
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
147
  <span class="summary_desc"><div class='inline'></div></span>
170
148
 
171
149
  </li>
@@ -195,21 +173,15 @@
195
173
  <pre class="lines">
196
174
 
197
175
 
198
- 15
199
- 16
200
- 17
201
- 18
202
- 19
203
- 20</pre>
176
+ 8
177
+ 9
178
+ 10</pre>
204
179
  </td>
205
180
  <td>
206
- <pre class="code"><span class="info file"># File 'lib/helium/client/elements.rb', line 15</span>
181
+ <pre class="code"><span class="info file"># File 'lib/helium/client/elements.rb', line 8</span>
207
182
 
208
183
  <span class='kw'>def</span> <span class='id identifier rubyid_element'>element</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
209
- <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'>&quot;</span><span class='tstring_content'>/element/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
210
- <span class='id identifier rubyid_element_data'>element_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>
211
-
212
- <span class='kw'>return</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_element_data'>element_data</span><span class='rparen'>)</span>
184
+ <span class='const'>Element</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>
213
185
  <span class='kw'>end</span></pre>
214
186
  </td>
215
187
  </tr>
@@ -233,87 +205,13 @@
233
205
 
234
206
  4
235
207
  5
236
- 6
237
- 7
238
- 8
239
- 9
240
- 10
241
- 11
242
- 12
243
- 13</pre>
208
+ 6</pre>
244
209
  </td>
245
210
  <td>
246
211
  <pre class="code"><span class="info file"># File 'lib/helium/client/elements.rb', line 4</span>
247
212
 
248
213
  <span class='kw'>def</span> <span class='id identifier rubyid_elements'>elements</span>
249
- <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'>/element</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
250
- <span class='id identifier rubyid_elements_data'>elements_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>
251
-
252
- <span class='id identifier rubyid_elements'>elements</span> <span class='op'>=</span> <span class='id identifier rubyid_elements_data'>elements_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_element_data'>element_data</span><span class='op'>|</span>
253
- <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_element_data'>element_data</span><span class='rparen'>)</span>
254
- <span class='kw'>end</span>
255
-
256
- <span class='kw'>return</span> <span class='id identifier rubyid_elements'>elements</span>
257
- <span class='kw'>end</span></pre>
258
- </td>
259
- </tr>
260
- </table>
261
- </div>
262
-
263
- <div class="method_details ">
264
- <h3 class="signature " id="update_element-instance_method">
265
-
266
- #<strong>update_element</strong>(element, name:) &#x21d2; <tt>Object</tt>
267
-
268
-
269
-
270
-
271
-
272
- </h3><table class="source_code">
273
- <tr>
274
- <td>
275
- <pre class="lines">
276
-
277
-
278
- 22
279
- 23
280
- 24
281
- 25
282
- 26
283
- 27
284
- 28
285
- 29
286
- 30
287
- 31
288
- 32
289
- 33
290
- 34
291
- 35
292
- 36
293
- 37
294
- 38
295
- 39</pre>
296
- </td>
297
- <td>
298
- <pre class="code"><span class="info file"># File 'lib/helium/client/elements.rb', line 22</span>
299
-
300
- <span class='kw'>def</span> <span class='id identifier rubyid_update_element'>update_element</span><span class='lparen'>(</span><span class='id identifier rubyid_element'>element</span><span class='comma'>,</span> <span class='label'>name:</span><span class='rparen'>)</span>
301
- <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'>/element/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
302
-
303
- <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
304
- <span class='label'>data:</span> <span class='lbrace'>{</span>
305
- <span class='label'>attributes:</span> <span class='lbrace'>{</span>
306
- <span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span>
307
- <span class='rbrace'>}</span><span class='comma'>,</span>
308
- <span class='label'>id:</span> <span class='id identifier rubyid_element'>element</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span>
309
- <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>element</span><span class='tstring_end'>&quot;</span></span>
310
- <span class='rbrace'>}</span>
311
- <span class='rbrace'>}</span>
312
-
313
- <span class='id identifier rubyid_response'>response</span> <span class='op'>=</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='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
314
- <span class='id identifier rubyid_element_data'>element_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>
315
-
316
- <span class='kw'>return</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_element_data'>element_data</span><span class='rparen'>)</span>
214
+ <span class='const'>Element</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>
317
215
  <span class='kw'>end</span></pre>
318
216
  </td>
319
217
  </tr>
@@ -325,7 +223,7 @@
325
223
  </div>
326
224
 
327
225
  <div id="footer">
328
- Generated on Mon Aug 22 15:52:20 2016 by
226
+ Generated on Wed Aug 24 13:22:51 2016 by
329
227
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
330
228
  0.9.3 (ruby-2.3.1).
331
229
  </div>
@@ -159,7 +159,7 @@
159
159
  <li class="public ">
160
160
  <span class="summary_signature">
161
161
 
162
- <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(path = nil, url: nil, params: {}) &#x21d2; Object </a>
162
+ <a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(path, opts = {}) &#x21d2; Object </a>
163
163
 
164
164
 
165
165
 
@@ -181,7 +181,7 @@
181
181
  <li class="public ">
182
182
  <span class="summary_signature">
183
183
 
184
- <a href="#paginated_get-instance_method" title="#paginated_get (instance method)">#<strong>paginated_get</strong>(path, klass:, params: {}) &#x21d2; Object </a>
184
+ <a href="#paginated_get-instance_method" title="#paginated_get (instance method)">#<strong>paginated_get</strong>(path, opts = {}) &#x21d2; Object </a>
185
185
 
186
186
 
187
187
 
@@ -203,7 +203,7 @@
203
203
  <li class="public ">
204
204
  <span class="summary_signature">
205
205
 
206
- <a href="#patch-instance_method" title="#patch (instance method)">#<strong>patch</strong>(path, body: {}) &#x21d2; Object </a>
206
+ <a href="#patch-instance_method" title="#patch (instance method)">#<strong>patch</strong>(path, opts = {}) &#x21d2; Object </a>
207
207
 
208
208
 
209
209
 
@@ -225,7 +225,7 @@
225
225
  <li class="public ">
226
226
  <span class="summary_signature">
227
227
 
228
- <a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong>(path, body: {}) &#x21d2; Object </a>
228
+ <a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong>(path, opts = {}) &#x21d2; Object </a>
229
229
 
230
230
 
231
231
 
@@ -271,15 +271,13 @@
271
271
  33
272
272
  34
273
273
  35
274
- 36
275
- 37</pre>
274
+ 36</pre>
276
275
  </td>
277
276
  <td>
278
277
  <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 33</span>
279
278
 
280
279
  <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>
280
+ <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_path'>path</span><span class='comma'>,</span> <span class='symbol'>:delete</span><span class='rparen'>)</span>
283
281
  <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
282
  <span class='kw'>end</span></pre>
285
283
  </td>
@@ -290,7 +288,7 @@
290
288
  <div class="method_details ">
291
289
  <h3 class="signature " id="get-instance_method">
292
290
 
293
- #<strong>get</strong>(path = nil, url: nil, params: {}) &#x21d2; <tt>Object</tt>
291
+ #<strong>get</strong>(path, opts = {}) &#x21d2; <tt>Object</tt>
294
292
 
295
293
 
296
294
 
@@ -304,15 +302,13 @@
304
302
 
305
303
  14
306
304
  15
307
- 16
308
- 17</pre>
305
+ 16</pre>
309
306
  </td>
310
307
  <td>
311
308
  <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 14</span>
312
309
 
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>
310
+ <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='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
311
+ <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
316
312
  <span class='kw'>end</span></pre>
317
313
  </td>
318
314
  </tr>
@@ -322,7 +318,7 @@
322
318
  <div class="method_details ">
323
319
  <h3 class="signature " id="paginated_get-instance_method">
324
320
 
325
- #<strong>paginated_get</strong>(path, klass:, params: {}) &#x21d2; <tt>Object</tt>
321
+ #<strong>paginated_get</strong>(path, opts = {}) &#x21d2; <tt>Object</tt>
326
322
 
327
323
 
328
324
 
@@ -334,14 +330,20 @@
334
330
  <pre class="lines">
335
331
 
336
332
 
333
+ 18
337
334
  19
338
335
  20
339
- 21</pre>
336
+ 21
337
+ 22
338
+ 23</pre>
340
339
  </td>
341
340
  <td>
342
- <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 19</span>
341
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 18</span>
342
+
343
+ <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='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
344
+ <span class='id identifier rubyid_klass'>klass</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:klass</span><span class='rparen'>)</span>
345
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:params</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
343
346
 
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
347
  <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
348
  <span class='kw'>end</span></pre>
347
349
  </td>
@@ -352,7 +354,7 @@
352
354
  <div class="method_details ">
353
355
  <h3 class="signature " id="patch-instance_method">
354
356
 
355
- #<strong>patch</strong>(path, body: {}) &#x21d2; <tt>Object</tt>
357
+ #<strong>patch</strong>(path, opts = {}) &#x21d2; <tt>Object</tt>
356
358
 
357
359
 
358
360
 
@@ -364,17 +366,15 @@
364
366
  <pre class="lines">
365
367
 
366
368
 
367
- 28
368
369
  29
369
370
  30
370
371
  31</pre>
371
372
  </td>
372
373
  <td>
373
- <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 28</span>
374
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 29</span>
374
375
 
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>
376
+ <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='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
377
+ <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
378
378
  <span class='kw'>end</span></pre>
379
379
  </td>
380
380
  </tr>
@@ -384,7 +384,7 @@
384
384
  <div class="method_details ">
385
385
  <h3 class="signature " id="post-instance_method">
386
386
 
387
- #<strong>post</strong>(path, body: {}) &#x21d2; <tt>Object</tt>
387
+ #<strong>post</strong>(path, opts = {}) &#x21d2; <tt>Object</tt>
388
388
 
389
389
 
390
390
 
@@ -396,17 +396,15 @@
396
396
  <pre class="lines">
397
397
 
398
398
 
399
- 23
400
- 24
401
399
  25
402
- 26</pre>
400
+ 26
401
+ 27</pre>
403
402
  </td>
404
403
  <td>
405
- <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 23</span>
404
+ <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 25</span>
406
405
 
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>
406
+ <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='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
407
+ <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
410
408
  <span class='kw'>end</span></pre>
411
409
  </td>
412
410
  </tr>
@@ -418,7 +416,7 @@
418
416
  </div>
419
417
 
420
418
  <div id="footer">
421
- Generated on Mon Aug 22 15:52:19 2016 by
419
+ Generated on Wed Aug 24 13:22:50 2016 by
422
420
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
423
421
  0.9.3 (ruby-2.3.1).
424
422
  </div>