helium-ruby 0.5.0 → 0.6.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.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +4 -26
- data/CONTRIBUTORS.md +4 -0
- data/README.md +12 -19
- data/docs/Helium.html +2 -2
- data/docs/Helium/Client.html +2 -2
- data/docs/Helium/Client/Elements.html +69 -1
- data/docs/Helium/Client/Http.html +1 -1
- data/docs/Helium/Client/Labels.html +1 -1
- data/docs/Helium/Client/Organizations.html +1 -1
- data/docs/Helium/Client/Sensors.html +1 -1
- data/docs/Helium/Client/Users.html +1 -1
- data/docs/Helium/ClientError.html +1 -1
- data/docs/Helium/Cursor.html +1 -1
- data/docs/Helium/DataPoint.html +2 -2
- data/docs/Helium/Element.html +60 -8
- data/docs/Helium/Error.html +7 -9
- data/docs/Helium/InvalidApiKey.html +1 -1
- data/docs/Helium/Label.html +2 -2
- data/docs/Helium/Organization.html +2 -2
- data/docs/Helium/Resource.html +113 -39
- data/docs/Helium/Sensor.html +188 -21
- data/docs/Helium/User.html +2 -2
- data/docs/Helium/Utils.html +1 -1
- data/docs/_index.html +1 -1
- data/docs/file.README.html +9 -22
- data/docs/index.html +9 -22
- data/docs/method_list.html +87 -47
- data/docs/top-level-namespace.html +1 -1
- data/lib/helium/resource.rb +3 -1
- data/lib/helium/sensor.rb +16 -5
- data/lib/helium/version.rb +1 -1
- metadata +3 -3
- data/CODE_OF_CONDUCT.md +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efd13da21a667d1b3a55f05bc96bf0e69c04505a
|
4
|
+
data.tar.gz: 70ff7c541b45e2c8d2838ad160b3b705476cc76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe156f3f4d109f2461d03b47217d05052a0bfbe88399929018e39e56ad13d61dc6eb2845e149e8b46fc4fb55cf5b5ad84c915f90bee306d515ccb1ed8b8ab288
|
7
|
+
data.tar.gz: c6635935d39973fd1286dded418c09b0bbba1d2cff181a4abfe6f41bd1a5fb587f5796dbd6d209bef27a001b2200b1602df6ba35809963d1ccd68033d5b0c04e
|
data/CONTRIBUTING.md
CHANGED
@@ -2,32 +2,10 @@
|
|
2
2
|
|
3
3
|
We value contributions from the community and will do everything we can go get them reviewed in a timely fashion. If you have code to send our way or a bug to report:
|
4
4
|
|
5
|
-
* Contributing Code
|
5
|
+
* **Contributing Code**: If you have new code or a bug fix, fork this repo, create a logically-named branch, and [submit a PR against this repo](https://github.com/helium/helium-ruby/issues). Include a write up of the PR with details on what it does.
|
6
6
|
|
7
|
-
* Reporting Bugs
|
7
|
+
* **Reporting Bugs**: Open an issue [against this repo](https://github.com/helium/helium-ruby/issues) with as much detail as you can. At the very least you'll include steps to reproduce the problem.
|
8
8
|
|
9
|
-
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant](http://contributor-covenant.org)
|
9
|
+
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant Code of Conduct](http://contributor-covenant.org/).
|
10
10
|
|
11
|
-
Above all, thank you for taking the time to be a part of the Helium community.
|
12
|
-
|
13
|
-
## Submitting a Pull Request
|
14
|
-
|
15
|
-
1. Check out [the Development section][development] in the README for instructions on setting up the project for local development.
|
16
|
-
2. [Fork the repository.][fork]
|
17
|
-
3. [Create a topic branch.][branch]
|
18
|
-
4. Add specs for your unimplemented feature or bug fix.
|
19
|
-
5. Run `rake spec`. If your specs pass, return to step 4.
|
20
|
-
6. Implement your feature or bug fix.
|
21
|
-
7. Run `rake spec`. If your specs fail, return to step 6.
|
22
|
-
8. Run `open coverage/index.html`. If your changes are not completely covered
|
23
|
-
by your tests, return to step 4.
|
24
|
-
9. Add documentation for your feature or bug fix.
|
25
|
-
10. Run bundle exec rake doc:yard. If your changes are not 100% documented, go back to step 9.
|
26
|
-
11. Add, commit, and push your changes. For documentation-only fixes, please
|
27
|
-
add "[ci skip]" to your commit message to avoid needless CI builds.
|
28
|
-
12. [Submit a pull request.][pr]
|
29
|
-
|
30
|
-
[development]: https://github.com/helium/helium-ruby#development
|
31
|
-
[fork]: https://help.github.com/articles/fork-a-repo
|
32
|
-
[branch]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
|
33
|
-
[pr]: https://help.github.com/articles/using-pull-requests
|
11
|
+
Above all, thank you for taking the time to be a part of the Helium community.
|
data/CONTRIBUTORS.md
ADDED
data/README.md
CHANGED
@@ -7,6 +7,17 @@
|
|
7
7
|
|
8
8
|
A Ruby gem for building applications with the Helium API. [Helium](https://www.helium.com/) is an integrated platform of smart sensors, communication, edge and cloud compute that enables numerous sensing applications. For more information about the underlying REST API, check out [the Helium docs](https://docs.helium.com/).
|
9
9
|
|
10
|
+
|
11
|
+
## Helium Documentation and Community Support
|
12
|
+
|
13
|
+
|
14
|
+
* **helium-ruby docs** - Documentation for the gem's source can be found [here](https://helium.github.io/helium-ruby/):
|
15
|
+
|
16
|
+
* **Helium Docs** Complete documenation for all parts of Helium can be found at [docs.helium.com](https://docs/helium.com).
|
17
|
+
|
18
|
+
* **chat.helium.com** - If you have questions or ideas about how to use this code - or any part of Helium - head over the [chat.helium.com](https://chat.helium.com). We're standing by to help.
|
19
|
+
|
20
|
+
|
10
21
|
## Installation
|
11
22
|
|
12
23
|
Add this line to your application's Gemfile:
|
@@ -25,6 +36,7 @@ Or install it yourself as:
|
|
25
36
|
|
26
37
|
## Usage
|
27
38
|
|
39
|
+
|
28
40
|
### Setup
|
29
41
|
|
30
42
|
```ruby
|
@@ -258,9 +270,6 @@ client.sensors.first.to_json
|
|
258
270
|
# => "{\"id\":\"08bab58b-d095-4c7c-912c-1f8024d91d95\",\"created_at\":\"2015-08-06T17:28:11+00:00\",\"updated_at\":\"2016-05-30T22:36:50+00:00\",\"name\":\"Marc's Isotope\",\"mac\":\"6081f9fffe00019b\",\"ports\":[\"b\",\"t\"]}"
|
259
271
|
```
|
260
272
|
|
261
|
-
## Source Documentation
|
262
|
-
Documentation for the gem's source can be found here: https://helium.github.io/helium-ruby/
|
263
|
-
|
264
273
|
|
265
274
|
## Development
|
266
275
|
|
@@ -274,18 +283,6 @@ We're working toward a v1.0.0 release, which will represent a feature-complete i
|
|
274
283
|
|
275
284
|
Until the v1.0.0 release, the functionality of this gem is subject to change. To prevent breaking changes, you should use the pessimistic version constraint operator (`~>`) in your Gemfile to lock your helium-ruby version to the current minor release. This will allow updates to patch versions.
|
276
285
|
|
277
|
-
## Contributing
|
278
|
-
|
279
|
-
We value contributions from the community and will do everything we can go get them reviewed in a timely fashion. If you have code to send our way or a bug to report:
|
280
|
-
|
281
|
-
* Contributing Code: If you have new code or a bug fix, fork this repo, create a logically-named branch, and submit a PR against this repo. Include a write up of the PR with details on what it does.
|
282
|
-
|
283
|
-
* Reporting Bugs: Open an issue against this repo with as much detail as you can. At the very least you'll include steps to reproduce the problem.
|
284
|
-
|
285
|
-
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) Code of Conduct.
|
286
|
-
|
287
|
-
Above all, thank you for taking the time to be a part of the Helium community.
|
288
|
-
|
289
286
|
### Running specs with Guard
|
290
287
|
|
291
288
|
To receive system notifications of test status, install `terminal-notifier`:
|
@@ -299,7 +296,3 @@ $ bundle exec guard
|
|
299
296
|
```
|
300
297
|
|
301
298
|
When you modify any of the files in `lib/`, all specs will run. When you modify a spec file, just that file will be run. You can press `Enter` at the guard prompt to run all tests as well.
|
302
|
-
|
303
|
-
## License
|
304
|
-
|
305
|
-
The gem is available as open source under the terms of the [BSD License](https://github.com/helium/helium-ruby/blob/master/LICENSE.txt).
|
data/docs/Helium.html
CHANGED
@@ -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'>"</span><span class='tstring_content'>0.
|
109
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.5.0</span><span class='tstring_end'>"</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
|
124
|
+
Generated on Tue Aug 30 08:16:47 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>
|
data/docs/Helium/Client.html
CHANGED
@@ -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></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#element_sensors-instance_method" title="Helium::Client::Elements#element_sensors (method)">#element_sensors</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
|
|
@@ -505,7 +505,7 @@
|
|
505
505
|
</div>
|
506
506
|
|
507
507
|
<div id="footer">
|
508
|
-
Generated on
|
508
|
+
Generated on Tue Aug 30 08:16:47 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>
|
@@ -122,6 +122,28 @@
|
|
122
122
|
|
123
123
|
|
124
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="#element_sensors-instance_method" title="#element_sensors (instance method)">#<strong>element_sensors</strong>(element) ⇒ Object </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
125
147
|
<span class="summary_desc"><div class='inline'></div></span>
|
126
148
|
|
127
149
|
</li>
|
@@ -186,6 +208,52 @@
|
|
186
208
|
</td>
|
187
209
|
</tr>
|
188
210
|
</table>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
<div class="method_details ">
|
214
|
+
<h3 class="signature " id="element_sensors-instance_method">
|
215
|
+
|
216
|
+
#<strong>element_sensors</strong>(element) ⇒ <tt>Object</tt>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</h3><table class="source_code">
|
223
|
+
<tr>
|
224
|
+
<td>
|
225
|
+
<pre class="lines">
|
226
|
+
|
227
|
+
|
228
|
+
12
|
229
|
+
13
|
230
|
+
14
|
231
|
+
15
|
232
|
+
16
|
233
|
+
17
|
234
|
+
18
|
235
|
+
19
|
236
|
+
20
|
237
|
+
21
|
238
|
+
22</pre>
|
239
|
+
</td>
|
240
|
+
<td>
|
241
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/elements.rb', line 12</span>
|
242
|
+
|
243
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_element_sensors'>element_sensors</span><span class='lparen'>(</span><span class='id identifier rubyid_element'>element</span><span class='rparen'>)</span>
|
244
|
+
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</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_content'>?include=sensor</span><span class='tstring_end'>"</span></span>
|
245
|
+
<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>
|
246
|
+
<span class='id identifier rubyid_sensors_data'>sensors_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'>"</span><span class='tstring_content'>included</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
247
|
+
|
248
|
+
<span class='id identifier rubyid_sensors'>sensors</span> <span class='op'>=</span> <span class='id identifier rubyid_sensors_data'>sensors_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_sensor'>sensor</span><span class='op'>|</span>
|
249
|
+
<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_sensor'>sensor</span><span class='rparen'>)</span>
|
250
|
+
<span class='kw'>end</span>
|
251
|
+
|
252
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_sensors'>sensors</span>
|
253
|
+
<span class='kw'>end</span></pre>
|
254
|
+
</td>
|
255
|
+
</tr>
|
256
|
+
</table>
|
189
257
|
</div>
|
190
258
|
|
191
259
|
<div class="method_details ">
|
@@ -223,7 +291,7 @@
|
|
223
291
|
</div>
|
224
292
|
|
225
293
|
<div id="footer">
|
226
|
-
Generated on
|
294
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
227
295
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
228
296
|
0.9.3 (ruby-2.3.1).
|
229
297
|
</div>
|
@@ -416,7 +416,7 @@
|
|
416
416
|
</div>
|
417
417
|
|
418
418
|
<div id="footer">
|
419
|
-
Generated on
|
419
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
420
420
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
421
421
|
0.9.3 (ruby-2.3.1).
|
422
422
|
</div>
|
@@ -447,7 +447,7 @@
|
|
447
447
|
</div>
|
448
448
|
|
449
449
|
<div id="footer">
|
450
|
-
Generated on
|
450
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
451
451
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
452
452
|
0.9.3 (ruby-2.3.1).
|
453
453
|
</div>
|
@@ -241,7 +241,7 @@
|
|
241
241
|
</div>
|
242
242
|
|
243
243
|
<div id="footer">
|
244
|
-
Generated on
|
244
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
245
245
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
246
246
|
0.9.3 (ruby-2.3.1).
|
247
247
|
</div>
|
@@ -349,7 +349,7 @@
|
|
349
349
|
</div>
|
350
350
|
|
351
351
|
<div id="footer">
|
352
|
-
Generated on
|
352
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
353
353
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
354
354
|
0.9.3 (ruby-2.3.1).
|
355
355
|
</div>
|
@@ -175,7 +175,7 @@
|
|
175
175
|
</div>
|
176
176
|
|
177
177
|
<div id="footer">
|
178
|
-
Generated on
|
178
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
179
179
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
180
180
|
0.9.3 (ruby-2.3.1).
|
181
181
|
</div>
|
@@ -143,7 +143,7 @@
|
|
143
143
|
</div>
|
144
144
|
|
145
145
|
<div id="footer">
|
146
|
-
Generated on
|
146
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
147
147
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
148
148
|
0.9.3 (ruby-2.3.1).
|
149
149
|
</div>
|
data/docs/Helium/Cursor.html
CHANGED
@@ -347,7 +347,7 @@
|
|
347
347
|
</div>
|
348
348
|
|
349
349
|
<div id="footer">
|
350
|
-
Generated on
|
350
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
351
351
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
352
352
|
0.9.3 (ruby-2.3.1).
|
353
353
|
</div>
|
data/docs/Helium/DataPoint.html
CHANGED
@@ -201,7 +201,7 @@
|
|
201
201
|
|
202
202
|
|
203
203
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Resource.html" title="Helium::Resource (class)">Resource</a></span></h3>
|
204
|
-
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Helium::Resource#id (method)">#id</a></span></p>
|
204
|
+
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Helium::Resource#id (method)">#id</a></span>, <span class='object_link'><a href="Resource.html#type-instance_method" title="Helium::Resource#type (method)">#type</a></span></p>
|
205
205
|
|
206
206
|
|
207
207
|
|
@@ -759,7 +759,7 @@
|
|
759
759
|
</div>
|
760
760
|
|
761
761
|
<div id="footer">
|
762
|
-
Generated on
|
762
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
763
763
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
764
764
|
0.9.3 (ruby-2.3.1).
|
765
765
|
</div>
|
data/docs/Helium/Element.html
CHANGED
@@ -201,7 +201,7 @@
|
|
201
201
|
|
202
202
|
|
203
203
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Resource.html" title="Helium::Resource (class)">Resource</a></span></h3>
|
204
|
-
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Helium::Resource#id (method)">#id</a></span></p>
|
204
|
+
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Helium::Resource#id (method)">#id</a></span>, <span class='object_link'><a href="Resource.html#type-instance_method" title="Helium::Resource#type (method)">#type</a></span></p>
|
205
205
|
|
206
206
|
|
207
207
|
|
@@ -257,6 +257,28 @@
|
|
257
257
|
<span class="summary_desc"><div class='inline'><p>A new instance of Element.</p>
|
258
258
|
</div></span>
|
259
259
|
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li class="public ">
|
264
|
+
<span class="summary_signature">
|
265
|
+
|
266
|
+
<a href="#sensors-instance_method" title="#sensors (instance method)">#<strong>sensors</strong> ⇒ Object </a>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</span>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
281
|
+
|
260
282
|
</li>
|
261
283
|
|
262
284
|
|
@@ -488,16 +510,16 @@
|
|
488
510
|
<pre class="lines">
|
489
511
|
|
490
512
|
|
491
|
-
14
|
492
|
-
15
|
493
|
-
16
|
494
|
-
17
|
495
513
|
18
|
496
514
|
19
|
497
|
-
20
|
515
|
+
20
|
516
|
+
21
|
517
|
+
22
|
518
|
+
23
|
519
|
+
24</pre>
|
498
520
|
</td>
|
499
521
|
<td>
|
500
|
-
<pre class="code"><span class="info file"># File 'lib/helium/element.rb', line
|
522
|
+
<pre class="code"><span class="info file"># File 'lib/helium/element.rb', line 18</span>
|
501
523
|
|
502
524
|
<span class='kw'>def</span> <span class='id identifier rubyid_as_json'>as_json</span>
|
503
525
|
<span class='kw'>super</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
@@ -509,6 +531,36 @@
|
|
509
531
|
</td>
|
510
532
|
</tr>
|
511
533
|
</table>
|
534
|
+
</div>
|
535
|
+
|
536
|
+
<div class="method_details ">
|
537
|
+
<h3 class="signature " id="sensors-instance_method">
|
538
|
+
|
539
|
+
#<strong>sensors</strong> ⇒ <tt>Object</tt>
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
</h3><table class="source_code">
|
546
|
+
<tr>
|
547
|
+
<td>
|
548
|
+
<pre class="lines">
|
549
|
+
|
550
|
+
|
551
|
+
13
|
552
|
+
14
|
553
|
+
15</pre>
|
554
|
+
</td>
|
555
|
+
<td>
|
556
|
+
<pre class="code"><span class="info file"># File 'lib/helium/element.rb', line 13</span>
|
557
|
+
|
558
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_sensors'>sensors</span>
|
559
|
+
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_element_sensors'>element_sensors</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
560
|
+
<span class='kw'>end</span></pre>
|
561
|
+
</td>
|
562
|
+
</tr>
|
563
|
+
</table>
|
512
564
|
</div>
|
513
565
|
|
514
566
|
</div>
|
@@ -516,7 +568,7 @@
|
|
516
568
|
</div>
|
517
569
|
|
518
570
|
<div id="footer">
|
519
|
-
Generated on
|
571
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
520
572
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
521
573
|
0.9.3 (ruby-2.3.1).
|
522
574
|
</div>
|
data/docs/Helium/Error.html
CHANGED
@@ -229,8 +229,7 @@ response message</p>
|
|
229
229
|
17
|
230
230
|
18
|
231
231
|
19
|
232
|
-
20
|
233
|
-
21</pre>
|
232
|
+
20</pre>
|
234
233
|
</td>
|
235
234
|
<td>
|
236
235
|
<pre class="code"><span class="info file"># File 'lib/helium/error.rb', line 10</span>
|
@@ -239,13 +238,12 @@ response message</p>
|
|
239
238
|
<span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_code'>code</span>
|
240
239
|
<span class='id identifier rubyid_message'>message</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'>"</span><span class='tstring_content'>errors</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>detail</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
241
240
|
|
242
|
-
<span class='
|
243
|
-
|
244
|
-
|
245
|
-
|
241
|
+
<span class='id identifier rubyid_klass'>klass</span> <span class='op'>=</span> <span class='kw'>case</span> <span class='id identifier rubyid_status'>status</span>
|
242
|
+
<span class='kw'>when</span> <span class='int'>401</span> <span class='kw'>then</span> <span class='const'>Helium</span><span class='op'>::</span><span class='const'>InvalidApiKey</span>
|
243
|
+
<span class='kw'>else</span> <span class='kw'>self</span>
|
244
|
+
<span class='kw'>end</span>
|
246
245
|
|
247
|
-
|
248
|
-
<span class='kw'>end</span>
|
246
|
+
<span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
|
249
247
|
<span class='kw'>end</span></pre>
|
250
248
|
</td>
|
251
249
|
</tr>
|
@@ -257,7 +255,7 @@ response message</p>
|
|
257
255
|
</div>
|
258
256
|
|
259
257
|
<div id="footer">
|
260
|
-
Generated on
|
258
|
+
Generated on Tue Aug 30 08:16:47 2016 by
|
261
259
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
262
260
|
0.9.3 (ruby-2.3.1).
|
263
261
|
</div>
|