helium-ruby 0.25.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/docs/Helium.html +2 -2
  3. data/docs/Helium/Client.html +2 -2
  4. data/docs/Helium/Client/Configurations.html +1 -1
  5. data/docs/Helium/Client/DeviceConfigurations.html +1 -1
  6. data/docs/Helium/Client/Elements.html +1 -1
  7. data/docs/Helium/Client/Http.html +5 -5
  8. data/docs/Helium/Client/Labels.html +1 -116
  9. data/docs/Helium/Client/Organizations.html +1 -1
  10. data/docs/Helium/Client/Sensors.html +1 -1
  11. data/docs/Helium/Client/Users.html +1 -1
  12. data/docs/Helium/ClientError.html +1 -1
  13. data/docs/Helium/Collection.html +199 -1
  14. data/docs/Helium/Configuration.html +1 -1
  15. data/docs/Helium/Cursor.html +1 -1
  16. data/docs/Helium/DataPoint.html +1 -1
  17. data/docs/Helium/DeviceConfiguration.html +1 -1
  18. data/docs/Helium/Element.html +419 -28
  19. data/docs/Helium/Error.html +1 -1
  20. data/docs/Helium/InvalidApiKey.html +1 -1
  21. data/docs/Helium/Label.html +285 -21
  22. data/docs/Helium/Metadata.html +1 -1
  23. data/docs/Helium/Organization.html +1 -1
  24. data/docs/Helium/Resource.html +2 -2
  25. data/docs/Helium/Sensor.html +308 -36
  26. data/docs/Helium/Timeseries.html +1 -1
  27. data/docs/Helium/User.html +1 -1
  28. data/docs/Helium/Utils.html +1 -1
  29. data/docs/_index.html +1 -1
  30. data/docs/file.README.html +1 -1
  31. data/docs/index.html +1 -1
  32. data/docs/method_list.html +287 -151
  33. data/docs/top-level-namespace.html +1 -1
  34. data/lib/helium.rb +1 -0
  35. data/lib/helium/client.rb +12 -10
  36. data/lib/helium/client/helium_scripts.rb +105 -0
  37. data/lib/helium/helium_script.rb +73 -0
  38. data/lib/helium/sensor.rb +6 -0
  39. data/lib/helium/version.rb +1 -1
  40. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6bfb3de65d88e40c9e014285e0c09d9f0641a09
4
- data.tar.gz: faf40c337a4d56866cf6fcfc9d6526c8e0c610a0
3
+ metadata.gz: 46048f25f996a99ba5142288df0ff1ce1916d203
4
+ data.tar.gz: 752e4c7ed6fc010cde69578985fdf8c942b2da74
5
5
  SHA512:
6
- metadata.gz: 3eeeff34e0a3d97bec69dea00c9d4b53dd5bd01b9313d7f9d889d9c549f088d9c71f5b77267695c7d7fd3e88d1d261d34e27c7e13b9226e2bd922b8b546c4743
7
- data.tar.gz: bcd20dec4ce7e6a4160e8a1006cca5b6b9dffd67affc2aa208483baf940804f414784cbac6ca8940e6abe06eccb9a42bfb4f716801304f898f78f111d9a33075
6
+ metadata.gz: b4b54f0ca49220b95e53f0a5a9e4d0bd7deeb32751b5af32d24d270497fabcdb96ac086e8ae40e2a0998d843892850d990911c133923afd9f874c9bf6436f04c
7
+ data.tar.gz: a1c800a0f79c53c256c612c34020ae87b480395dfe5c035145e88bf2b9af6d860a41ce255bf445ab0906a4b1042a41d8cd833c6d3bc5b673d3f452135104b066
@@ -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.21.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.25.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 Feb 13 09:17:41 2017 by
124
+ Generated on Wed Apr 5 13:55:53 2017 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.9.5 (ruby-2.3.1).
127
127
  </div>
@@ -305,7 +305,7 @@
305
305
 
306
306
 
307
307
  <h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Labels.html" title="Helium::Client::Labels (module)">Labels</a></span></h3>
308
- <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#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>
308
+ <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#labels-instance_method" title="Helium::Client::Labels#labels (method)">#labels</a></span></p>
309
309
 
310
310
 
311
311
 
@@ -555,7 +555,7 @@
555
555
  </div>
556
556
 
557
557
  <div id="footer">
558
- Generated on Mon Feb 13 09:17:41 2017 by
558
+ Generated on Wed Apr 5 13:55:53 2017 by
559
559
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
560
560
  0.9.5 (ruby-2.3.1).
561
561
  </div>
@@ -286,7 +286,7 @@
286
286
  </div>
287
287
 
288
288
  <div id="footer">
289
- Generated on Mon Feb 13 09:17:41 2017 by
289
+ Generated on Wed Apr 5 13:55:53 2017 by
290
290
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
291
291
  0.9.5 (ruby-2.3.1).
292
292
  </div>
@@ -455,7 +455,7 @@
455
455
  </div>
456
456
 
457
457
  <div id="footer">
458
- Generated on Mon Feb 13 09:17:41 2017 by
458
+ Generated on Wed Apr 5 13:55:53 2017 by
459
459
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
460
460
  0.9.5 (ruby-2.3.1).
461
461
  </div>
@@ -365,7 +365,7 @@
365
365
  </div>
366
366
 
367
367
  <div id="footer">
368
- Generated on Mon Feb 13 09:17:41 2017 by
368
+ Generated on Wed Apr 5 13:55:53 2017 by
369
369
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
370
370
  0.9.5 (ruby-2.3.1).
371
371
  </div>
@@ -142,7 +142,7 @@
142
142
  <li class="public ">
143
143
  <span class="summary_signature">
144
144
 
145
- <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(path) &#x21d2; Object </a>
145
+ <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(path, opts = {}) &#x21d2; Object </a>
146
146
 
147
147
 
148
148
 
@@ -363,7 +363,7 @@
363
363
  <div class="method_details ">
364
364
  <h3 class="signature " id="delete-instance_method">
365
365
 
366
- #<strong>delete</strong>(path) &#x21d2; <tt>Object</tt>
366
+ #<strong>delete</strong>(path, opts = {}) &#x21d2; <tt>Object</tt>
367
367
 
368
368
 
369
369
 
@@ -383,8 +383,8 @@
383
383
  <td>
384
384
  <pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 32</span>
385
385
 
386
- <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>
387
- <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>
386
+ <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='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>
387
+ <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='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
388
388
  <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>
389
389
  <span class='kw'>end</span></pre>
390
390
  </td>
@@ -764,7 +764,7 @@ it will simply pass through</p>
764
764
  </div>
765
765
 
766
766
  <div id="footer">
767
- Generated on Mon Feb 13 09:17:41 2017 by
767
+ Generated on Wed Apr 5 13:55:53 2017 by
768
768
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
769
769
  0.9.5 (ruby-2.3.1).
770
770
  </div>
@@ -168,29 +168,6 @@
168
168
 
169
169
  <span class="summary_desc"><div class='inline'></div></span>
170
170
 
171
- </li>
172
-
173
-
174
- <li class="public ">
175
- <span class="summary_signature">
176
-
177
- <a href="#update_label_sensors-instance_method" title="#update_label_sensors (instance method)">#<strong>update_label_sensors</strong>(label, opts = {}) &#x21d2; Object </a>
178
-
179
-
180
-
181
- </span>
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
- <span class="summary_desc"><div class='inline'><p>TODO incorporate this logic into Helium::Collection.</p>
192
- </div></span>
193
-
194
171
  </li>
195
172
 
196
173
 
@@ -291,98 +268,6 @@
291
268
  </td>
292
269
  </tr>
293
270
  </table>
294
- </div>
295
-
296
- <div class="method_details ">
297
- <h3 class="signature " id="update_label_sensors-instance_method">
298
-
299
- #<strong>update_label_sensors</strong>(label, opts = {}) &#x21d2; <tt>Object</tt>
300
-
301
-
302
-
303
-
304
-
305
- </h3><div class="docstring">
306
- <div class="discussion">
307
- <p>TODO incorporate this logic into Helium::Collection</p>
308
-
309
-
310
- </div>
311
- </div>
312
- <div class="tags">
313
-
314
-
315
- </div><table class="source_code">
316
- <tr>
317
- <td>
318
- <pre class="lines">
319
-
320
-
321
- 17
322
- 18
323
- 19
324
- 20
325
- 21
326
- 22
327
- 23
328
- 24
329
- 25
330
- 26
331
- 27
332
- 28
333
- 29
334
- 30
335
- 31
336
- 32
337
- 33
338
- 34
339
- 35
340
- 36
341
- 37
342
- 38
343
- 39
344
- 40
345
- 41
346
- 42
347
- 43
348
- 44
349
- 45</pre>
350
- </td>
351
- <td>
352
- <pre class="code"><span class="info file"># File 'lib/helium/client/labels.rb', line 17</span>
353
-
354
- <span class='kw'>def</span> <span class='id identifier rubyid_update_label_sensors'>update_label_sensors</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</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>
355
- <span class='id identifier rubyid_sensors'>sensors</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'>:sensors</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
356
-
357
- <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'>/label/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/relationships/sensor</span><span class='tstring_end'>&quot;</span></span>
358
-
359
- <span class='id identifier rubyid_sensors'>sensors</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_sensors'>sensors</span><span class='rparen'>)</span>
360
-
361
- <span class='id identifier rubyid_new_sensor_data'>new_sensor_data</span> <span class='op'>=</span> <span class='id identifier rubyid_sensors'>sensors</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>
362
- <span class='lbrace'>{</span>
363
- <span class='label'>id:</span> <span class='id identifier rubyid_sensor'>sensor</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span>
364
- <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sensor</span><span class='tstring_end'>&#39;</span></span>
365
- <span class='rbrace'>}</span>
366
- <span class='kw'>end</span>
367
-
368
- <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
369
- <span class='label'>data:</span> <span class='id identifier rubyid_new_sensor_data'>new_sensor_data</span>
370
- <span class='rbrace'>}</span>
371
-
372
- <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>
373
- <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'>&quot;</span><span class='tstring_content'>data</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
374
-
375
- <span class='comment'># TODO: these come back deflated. need to either inflate at this point or
376
- </span> <span class='comment'># when needed
377
- </span> <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_data'>sensor_data</span><span class='op'>|</span>
378
- <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_data'>sensor_data</span><span class='rparen'>)</span>
379
- <span class='kw'>end</span>
380
-
381
- <span class='kw'>return</span> <span class='id identifier rubyid_sensors'>sensors</span>
382
- <span class='kw'>end</span></pre>
383
- </td>
384
- </tr>
385
- </table>
386
271
  </div>
387
272
 
388
273
  </div>
@@ -390,7 +275,7 @@
390
275
  </div>
391
276
 
392
277
  <div id="footer">
393
- Generated on Mon Feb 13 09:17:41 2017 by
278
+ Generated on Wed Apr 5 13:55:53 2017 by
394
279
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
395
280
  0.9.5 (ruby-2.3.1).
396
281
  </div>
@@ -171,7 +171,7 @@
171
171
  </div>
172
172
 
173
173
  <div id="footer">
174
- Generated on Mon Feb 13 09:17:41 2017 by
174
+ Generated on Wed Apr 5 13:55:53 2017 by
175
175
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
176
176
  0.9.5 (ruby-2.3.1).
177
177
  </div>
@@ -551,7 +551,7 @@
551
551
  </div>
552
552
 
553
553
  <div id="footer">
554
- Generated on Mon Feb 13 09:17:41 2017 by
554
+ Generated on Wed Apr 5 13:55:53 2017 by
555
555
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
556
556
  0.9.5 (ruby-2.3.1).
557
557
  </div>
@@ -171,7 +171,7 @@
171
171
  </div>
172
172
 
173
173
  <div id="footer">
174
- Generated on Mon Feb 13 09:17:41 2017 by
174
+ Generated on Wed Apr 5 13:55:53 2017 by
175
175
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
176
176
  0.9.5 (ruby-2.3.1).
177
177
  </div>
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Feb 13 09:17:41 2017 by
146
+ Generated on Wed Apr 5 13:55:53 2017 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.5 (ruby-2.3.1).
149
149
  </div>
@@ -241,6 +241,29 @@
241
241
 
242
242
  <span class="summary_desc"><div class='inline'></div></span>
243
243
 
244
+ </li>
245
+
246
+
247
+ <li class="public ">
248
+ <span class="summary_signature">
249
+
250
+ <a href="#add_relationships-instance_method" title="#add_relationships (instance method)">#<strong>add_relationships</strong>(items) &#x21d2; Object </a>
251
+
252
+
253
+
254
+ </span>
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+ <span class="summary_desc"><div class='inline'><p>Adds resources of the same type to the collection related to the &#39;@belongs_to&#39; resource.</p>
265
+ </div></span>
266
+
244
267
  </li>
245
268
 
246
269
 
@@ -379,6 +402,52 @@
379
402
  <span class="summary_desc"><div class='inline'><p>NOTE: if we implement pagination, we&#39;ll need to rethink this.</p>
380
403
  </div></span>
381
404
 
405
+ </li>
406
+
407
+
408
+ <li class="public ">
409
+ <span class="summary_signature">
410
+
411
+ <a href="#remove_relationships-instance_method" title="#remove_relationships (instance method)">#<strong>remove_relationships</strong>(items) &#x21d2; Object </a>
412
+
413
+
414
+
415
+ </span>
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+ <span class="summary_desc"><div class='inline'><p>Removes resources of the same type to the collection related to the &#39;@belongs_to&#39; resource.</p>
426
+ </div></span>
427
+
428
+ </li>
429
+
430
+
431
+ <li class="public ">
432
+ <span class="summary_signature">
433
+
434
+ <a href="#replace_relationships-instance_method" title="#replace_relationships (instance method)">#<strong>replace_relationships</strong>(items) &#x21d2; Object </a>
435
+
436
+
437
+
438
+ </span>
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+ <span class="summary_desc"><div class='inline'><p>Replaces resources of the same type to the collection related to the &#39;@belongs_to&#39; resource.</p>
449
+ </div></span>
450
+
382
451
  </li>
383
452
 
384
453
 
@@ -676,6 +745,49 @@ as determined by the resources&#39; ids</p>
676
745
  </td>
677
746
  </tr>
678
747
  </table>
748
+ </div>
749
+
750
+ <div class="method_details ">
751
+ <h3 class="signature " id="add_relationships-instance_method">
752
+
753
+ #<strong>add_relationships</strong>(items) &#x21d2; <tt>Object</tt>
754
+
755
+
756
+
757
+
758
+
759
+ </h3><div class="docstring">
760
+ <div class="discussion">
761
+ <p>Adds resources of the same type to the collection related to the
762
+ &#39;@belongs_to&#39; resource</p>
763
+
764
+
765
+ </div>
766
+ </div>
767
+ <div class="tags">
768
+
769
+
770
+ </div><table class="source_code">
771
+ <tr>
772
+ <td>
773
+ <pre class="lines">
774
+
775
+
776
+ 85
777
+ 86
778
+ 87
779
+ 88</pre>
780
+ </td>
781
+ <td>
782
+ <pre class="code"><span class="info file"># File 'lib/helium/collection.rb', line 85</span>
783
+
784
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_relationships'>add_relationships</span><span class='lparen'>(</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
785
+ <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_relationship_request_body'>relationship_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
786
+ <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_relationship_path'>relationship_path</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
787
+ <span class='kw'>end</span></pre>
788
+ </td>
789
+ </tr>
790
+ </table>
679
791
  </div>
680
792
 
681
793
  <div class="method_details ">
@@ -909,6 +1021,92 @@ as determined by the resources&#39; ids</p>
909
1021
  </td>
910
1022
  </tr>
911
1023
  </table>
1024
+ </div>
1025
+
1026
+ <div class="method_details ">
1027
+ <h3 class="signature " id="remove_relationships-instance_method">
1028
+
1029
+ #<strong>remove_relationships</strong>(items) &#x21d2; <tt>Object</tt>
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+ </h3><div class="docstring">
1036
+ <div class="discussion">
1037
+ <p>Removes resources of the same type to the collection related to the
1038
+ &#39;@belongs_to&#39; resource. An empty array removes all resources.</p>
1039
+
1040
+
1041
+ </div>
1042
+ </div>
1043
+ <div class="tags">
1044
+
1045
+
1046
+ </div><table class="source_code">
1047
+ <tr>
1048
+ <td>
1049
+ <pre class="lines">
1050
+
1051
+
1052
+ 99
1053
+ 100
1054
+ 101
1055
+ 102</pre>
1056
+ </td>
1057
+ <td>
1058
+ <pre class="code"><span class="info file"># File 'lib/helium/collection.rb', line 99</span>
1059
+
1060
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_relationships'>remove_relationships</span><span class='lparen'>(</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
1061
+ <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_relationship_request_body'>relationship_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
1062
+ <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_relationship_path'>relationship_path</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1063
+ <span class='kw'>end</span></pre>
1064
+ </td>
1065
+ </tr>
1066
+ </table>
1067
+ </div>
1068
+
1069
+ <div class="method_details ">
1070
+ <h3 class="signature " id="replace_relationships-instance_method">
1071
+
1072
+ #<strong>replace_relationships</strong>(items) &#x21d2; <tt>Object</tt>
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+ </h3><div class="docstring">
1079
+ <div class="discussion">
1080
+ <p>Replaces resources of the same type to the collection related to the
1081
+ &#39;@belongs_to&#39; resource. An empty array removes all resources.</p>
1082
+
1083
+
1084
+ </div>
1085
+ </div>
1086
+ <div class="tags">
1087
+
1088
+
1089
+ </div><table class="source_code">
1090
+ <tr>
1091
+ <td>
1092
+ <pre class="lines">
1093
+
1094
+
1095
+ 92
1096
+ 93
1097
+ 94
1098
+ 95</pre>
1099
+ </td>
1100
+ <td>
1101
+ <pre class="code"><span class="info file"># File 'lib/helium/collection.rb', line 92</span>
1102
+
1103
+ <span class='kw'>def</span> <span class='id identifier rubyid_replace_relationships'>replace_relationships</span><span class='lparen'>(</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
1104
+ <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_relationship_request_body'>relationship_request_body</span><span class='lparen'>(</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
1105
+ <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='id identifier rubyid_relationship_path'>relationship_path</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
1106
+ <span class='kw'>end</span></pre>
1107
+ </td>
1108
+ </tr>
1109
+ </table>
912
1110
  </div>
913
1111
 
914
1112
  <div class="method_details ">
@@ -1043,7 +1241,7 @@ to search for a collection of resources matching the search parameters</p>
1043
1241
  </div>
1044
1242
 
1045
1243
  <div id="footer">
1046
- Generated on Mon Feb 13 09:17:42 2017 by
1244
+ Generated on Wed Apr 5 13:55:54 2017 by
1047
1245
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1048
1246
  0.9.5 (ruby-2.3.1).
1049
1247
  </div>