strawberry_api 0.5.4 → 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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4022 -4
  3. data/doc/HTTParty/Response.html +1 -1
  4. data/doc/StrawberryAPI.html +2 -2
  5. data/doc/StrawberryAPI/AccessRight.html +1 -1
  6. data/doc/StrawberryAPI/ApiKey.html +1 -1
  7. data/doc/StrawberryAPI/ArchiveStrategy.html +1 -1
  8. data/doc/StrawberryAPI/ArchiveStrategyState.html +1 -1
  9. data/doc/StrawberryAPI/Asset.html +1 -1
  10. data/doc/StrawberryAPI/AssetCopyToStrategy.html +1 -1
  11. data/doc/StrawberryAPI/AssetFeedback.html +1 -1
  12. data/doc/StrawberryAPI/Client.html +2 -2
  13. data/doc/StrawberryAPI/Client/ApiKeys.html +1 -1
  14. data/doc/StrawberryAPI/Client/ArchiveStrategies.html +1 -1
  15. data/doc/StrawberryAPI/Client/AssetCopyToStrategies.html +1 -1
  16. data/doc/StrawberryAPI/Client/AssetFeedbacks.html +1 -1
  17. data/doc/StrawberryAPI/Client/Assets.html +1 -1
  18. data/doc/StrawberryAPI/Client/Collections.html +1 -1
  19. data/doc/StrawberryAPI/Client/CopyToFeedbacks.html +1 -1
  20. data/doc/StrawberryAPI/Client/CustomMetadata.html +1 -1
  21. data/doc/StrawberryAPI/Client/CustomMetadataFields.html +1 -1
  22. data/doc/StrawberryAPI/Client/CustomMetadataOptions.html +1 -1
  23. data/doc/StrawberryAPI/Client/CustomMetadataSets.html +1 -1
  24. data/doc/StrawberryAPI/Client/Edits.html +1 -1
  25. data/doc/StrawberryAPI/Client/Features.html +1 -1
  26. data/doc/StrawberryAPI/Client/Libraries.html +1 -1
  27. data/doc/StrawberryAPI/Client/Markers.html +1 -1
  28. data/doc/StrawberryAPI/Client/ProjectCopyToStrategies.html +1 -1
  29. data/doc/StrawberryAPI/Client/ProjectFeedbacks.html +1 -1
  30. data/doc/StrawberryAPI/Client/Projects.html +92 -9
  31. data/doc/StrawberryAPI/Client/Roles.html +1 -1
  32. data/doc/StrawberryAPI/Client/Schedules.html +1 -1
  33. data/doc/StrawberryAPI/Client/Searches.html +1 -1
  34. data/doc/StrawberryAPI/Client/Sessions.html +1 -1
  35. data/doc/StrawberryAPI/Client/Settings.html +1 -1
  36. data/doc/StrawberryAPI/Client/StatusFlags.html +1 -1
  37. data/doc/StrawberryAPI/Client/Teams.html +1 -1
  38. data/doc/StrawberryAPI/Client/Templates.html +1 -1
  39. data/doc/StrawberryAPI/Client/Users.html +1 -1
  40. data/doc/StrawberryAPI/Collection.html +1 -1
  41. data/doc/StrawberryAPI/Configuration.html +1 -1
  42. data/doc/StrawberryAPI/CopyToFeedback.html +1 -1
  43. data/doc/StrawberryAPI/CustomMetadataField.html +1 -1
  44. data/doc/StrawberryAPI/CustomMetadataOption.html +1 -1
  45. data/doc/StrawberryAPI/CustomMetadataSet.html +1 -1
  46. data/doc/StrawberryAPI/CustomMetadatum.html +1 -1
  47. data/doc/StrawberryAPI/Edit.html +1 -1
  48. data/doc/StrawberryAPI/Feature.html +1 -1
  49. data/doc/StrawberryAPI/Feedback.html +1 -1
  50. data/doc/StrawberryAPI/HttpClient.html +1 -1
  51. data/doc/StrawberryAPI/Library.html +1 -1
  52. data/doc/StrawberryAPI/Marker.html +1 -1
  53. data/doc/StrawberryAPI/Metadatum.html +1 -1
  54. data/doc/StrawberryAPI/Project.html +1 -1
  55. data/doc/StrawberryAPI/ProjectCopyToStrategy.html +1 -1
  56. data/doc/StrawberryAPI/ProjectFeedback.html +1 -1
  57. data/doc/StrawberryAPI/Proxy.html +1 -1
  58. data/doc/StrawberryAPI/Role.html +1 -1
  59. data/doc/StrawberryAPI/Schedule.html +1 -1
  60. data/doc/StrawberryAPI/Session.html +1 -1
  61. data/doc/StrawberryAPI/Setting.html +1 -1
  62. data/doc/StrawberryAPI/StatusFlag.html +1 -1
  63. data/doc/StrawberryAPI/Strategy.html +1 -1
  64. data/doc/StrawberryAPI/Team.html +1 -1
  65. data/doc/StrawberryAPI/Template.html +1 -1
  66. data/doc/StrawberryAPI/User.html +1 -1
  67. data/doc/_index.html +1 -1
  68. data/doc/file.README.html +87 -103
  69. data/doc/index.html +87 -103
  70. data/doc/method_list.html +343 -335
  71. data/doc/top-level-namespace.html +1 -1
  72. data/lib/strawberry_api.rb +4 -4
  73. data/lib/strawberry_api/client.rb +61 -61
  74. data/lib/strawberry_api/client/projects.rb +36 -36
  75. data/lib/strawberry_api/http_client.rb +11 -11
  76. data/lib/strawberry_api/version.rb +1 -1
  77. data/samples/test.rb +1 -1
  78. data/strawberry_api.gemspec +21 -22
  79. metadata +3 -3
@@ -204,7 +204,7 @@
204
204
  </div>
205
205
 
206
206
  <div id="footer">
207
- Generated on Fri Mar 1 18:29:42 2019 by
207
+ Generated on Thu Mar 26 12:41:05 2020 by
208
208
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
209
209
  0.9.16 (ruby-2.5.0).
210
210
  </div>
@@ -309,7 +309,7 @@
309
309
  </div>
310
310
 
311
311
  <div id="footer">
312
- Generated on Fri Mar 1 18:29:44 2019 by
312
+ Generated on Wed Mar 13 18:57:19 2019 by
313
313
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
314
314
  0.9.16 (ruby-2.5.0).
315
315
  </div>
@@ -283,7 +283,7 @@
283
283
  </div>
284
284
 
285
285
  <div id="footer">
286
- Generated on Fri Mar 1 18:29:43 2019 by
286
+ Generated on Wed Mar 13 18:57:19 2019 by
287
287
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
288
288
  0.9.16 (ruby-2.5.0).
289
289
  </div>
@@ -366,7 +366,7 @@
366
366
  </div>
367
367
 
368
368
  <div id="footer">
369
- Generated on Fri Mar 1 18:29:44 2019 by
369
+ Generated on Wed Mar 13 18:57:19 2019 by
370
370
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
371
371
  0.9.16 (ruby-2.5.0).
372
372
  </div>
@@ -200,7 +200,7 @@
200
200
  </div>
201
201
 
202
202
  <div id="footer">
203
- Generated on Fri Mar 1 18:29:44 2019 by
203
+ Generated on Wed Mar 13 18:57:19 2019 by
204
204
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
205
205
  0.9.16 (ruby-2.5.0).
206
206
  </div>
@@ -305,7 +305,7 @@
305
305
  </div>
306
306
 
307
307
  <div id="footer">
308
- Generated on Fri Mar 1 18:29:44 2019 by
308
+ Generated on Wed Mar 13 18:57:19 2019 by
309
309
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
310
310
  0.9.16 (ruby-2.5.0).
311
311
  </div>
@@ -1057,7 +1057,7 @@
1057
1057
  </div>
1058
1058
 
1059
1059
  <div id="footer">
1060
- Generated on Fri Mar 1 18:29:42 2019 by
1060
+ Generated on Thu Mar 26 12:41:05 2020 by
1061
1061
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1062
1062
  0.9.16 (ruby-2.5.0).
1063
1063
  </div>
@@ -309,7 +309,7 @@
309
309
  </div>
310
310
 
311
311
  <div id="footer">
312
- Generated on Fri Mar 1 18:29:44 2019 by
312
+ Generated on Wed Mar 13 18:57:19 2019 by
313
313
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
314
314
  0.9.16 (ruby-2.5.0).
315
315
  </div>
@@ -1245,7 +1245,7 @@
1245
1245
  </div>
1246
1246
 
1247
1247
  <div id="footer">
1248
- Generated on Fri Mar 1 18:29:43 2019 by
1248
+ Generated on Thu Mar 26 12:41:05 2020 by
1249
1249
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1250
1250
  0.9.16 (ruby-2.5.0).
1251
1251
  </div>
@@ -417,7 +417,7 @@
417
417
  </div>
418
418
 
419
419
  <div id="footer">
420
- Generated on Fri Mar 1 18:29:46 2019 by
420
+ Generated on Wed Mar 13 18:57:21 2019 by
421
421
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
422
422
  0.9.16 (ruby-2.5.0).
423
423
  </div>
@@ -471,7 +471,7 @@
471
471
  </div>
472
472
 
473
473
  <div id="footer">
474
- Generated on Fri Mar 1 18:29:46 2019 by
474
+ Generated on Wed Mar 13 18:57:21 2019 by
475
475
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
476
476
  0.9.16 (ruby-2.5.0).
477
477
  </div>
@@ -210,7 +210,7 @@
210
210
  </div>
211
211
 
212
212
  <div id="footer">
213
- Generated on Fri Mar 1 18:29:46 2019 by
213
+ Generated on Wed Mar 13 18:57:21 2019 by
214
214
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
215
215
  0.9.16 (ruby-2.5.0).
216
216
  </div>
@@ -989,7 +989,7 @@
989
989
  </div>
990
990
 
991
991
  <div id="footer">
992
- Generated on Fri Mar 1 18:29:46 2019 by
992
+ Generated on Wed Mar 13 18:57:21 2019 by
993
993
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
994
994
  0.9.16 (ruby-2.5.0).
995
995
  </div>
@@ -557,7 +557,7 @@
557
557
  </div>
558
558
 
559
559
  <div id="footer">
560
- Generated on Fri Mar 1 18:29:46 2019 by
560
+ Generated on Wed Mar 13 18:57:21 2019 by
561
561
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
562
562
  0.9.16 (ruby-2.5.0).
563
563
  </div>
@@ -639,7 +639,7 @@
639
639
  </div>
640
640
 
641
641
  <div id="footer">
642
- Generated on Fri Mar 1 18:29:46 2019 by
642
+ Generated on Wed Mar 13 18:57:21 2019 by
643
643
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
644
644
  0.9.16 (ruby-2.5.0).
645
645
  </div>
@@ -718,7 +718,7 @@
718
718
  </div>
719
719
 
720
720
  <div id="footer">
721
- Generated on Fri Mar 1 18:29:46 2019 by
721
+ Generated on Wed Mar 13 18:57:21 2019 by
722
722
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
723
723
  0.9.16 (ruby-2.5.0).
724
724
  </div>
@@ -627,7 +627,7 @@
627
627
  </div>
628
628
 
629
629
  <div id="footer">
630
- Generated on Fri Mar 1 18:29:45 2019 by
630
+ Generated on Wed Mar 13 18:57:20 2019 by
631
631
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
632
632
  0.9.16 (ruby-2.5.0).
633
633
  </div>
@@ -557,7 +557,7 @@
557
557
  </div>
558
558
 
559
559
  <div id="footer">
560
- Generated on Fri Mar 1 18:29:45 2019 by
560
+ Generated on Wed Mar 13 18:57:20 2019 by
561
561
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
562
562
  0.9.16 (ruby-2.5.0).
563
563
  </div>
@@ -631,7 +631,7 @@
631
631
  </div>
632
632
 
633
633
  <div id="footer">
634
- Generated on Fri Mar 1 18:29:45 2019 by
634
+ Generated on Wed Mar 13 18:57:20 2019 by
635
635
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
636
636
  0.9.16 (ruby-2.5.0).
637
637
  </div>
@@ -961,7 +961,7 @@ shamelessly uses the HTTParty gem for all the dirty job</p>
961
961
  </div>
962
962
 
963
963
  <div id="footer">
964
- Generated on Fri Mar 1 18:29:46 2019 by
964
+ Generated on Wed Mar 13 18:57:21 2019 by
965
965
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
966
966
  0.9.16 (ruby-2.5.0).
967
967
  </div>
@@ -627,7 +627,7 @@
627
627
  </div>
628
628
 
629
629
  <div id="footer">
630
- Generated on Fri Mar 1 18:29:45 2019 by
630
+ Generated on Wed Mar 13 18:57:20 2019 by
631
631
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
632
632
  0.9.16 (ruby-2.5.0).
633
633
  </div>
@@ -837,7 +837,7 @@
837
837
  </div>
838
838
 
839
839
  <div id="footer">
840
- Generated on Fri Mar 1 18:29:45 2019 by
840
+ Generated on Wed Mar 13 18:57:20 2019 by
841
841
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
842
842
  0.9.16 (ruby-2.5.0).
843
843
  </div>
@@ -557,7 +557,7 @@
557
557
  </div>
558
558
 
559
559
  <div id="footer">
560
- Generated on Fri Mar 1 18:29:46 2019 by
560
+ Generated on Wed Mar 13 18:57:21 2019 by
561
561
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
562
562
  0.9.16 (ruby-2.5.0).
563
563
  </div>
@@ -2793,7 +2793,7 @@
2793
2793
  </div>
2794
2794
 
2795
2795
  <div id="footer">
2796
- Generated on Fri Mar 1 18:29:45 2019 by
2796
+ Generated on Wed Mar 13 18:57:20 2019 by
2797
2797
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2798
2798
  0.9.16 (ruby-2.5.0).
2799
2799
  </div>
@@ -355,7 +355,7 @@
355
355
  </div>
356
356
 
357
357
  <div id="footer">
358
- Generated on Fri Mar 1 18:29:46 2019 by
358
+ Generated on Wed Mar 13 18:57:21 2019 by
359
359
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
360
360
  0.9.16 (ruby-2.5.0).
361
361
  </div>
@@ -360,7 +360,7 @@
360
360
  </div>
361
361
 
362
362
  <div id="footer">
363
- Generated on Fri Mar 1 18:29:46 2019 by
363
+ Generated on Wed Mar 13 18:57:21 2019 by
364
364
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
365
365
  0.9.16 (ruby-2.5.0).
366
366
  </div>
@@ -1257,7 +1257,7 @@
1257
1257
  </div>
1258
1258
 
1259
1259
  <div id="footer">
1260
- Generated on Fri Mar 1 18:29:45 2019 by
1260
+ Generated on Wed Mar 13 18:57:20 2019 by
1261
1261
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1262
1262
  0.9.16 (ruby-2.5.0).
1263
1263
  </div>
@@ -557,7 +557,7 @@
557
557
  </div>
558
558
 
559
559
  <div id="footer">
560
- Generated on Fri Mar 1 18:29:45 2019 by
560
+ Generated on Wed Mar 13 18:57:20 2019 by
561
561
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
562
562
  0.9.16 (ruby-2.5.0).
563
563
  </div>
@@ -2377,7 +2377,7 @@
2377
2377
  </div>
2378
2378
 
2379
2379
  <div id="footer">
2380
- Generated on Fri Mar 1 18:29:45 2019 by
2380
+ Generated on Wed Mar 13 18:57:21 2019 by
2381
2381
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2382
2382
  0.9.16 (ruby-2.5.0).
2383
2383
  </div>
@@ -111,7 +111,7 @@
111
111
  </div>
112
112
 
113
113
  <div id="footer">
114
- Generated on Fri Mar 1 18:29:45 2019 by
114
+ Generated on Wed Mar 13 18:57:20 2019 by
115
115
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
116
116
  0.9.16 (ruby-2.5.0).
117
117
  </div>
@@ -197,7 +197,7 @@
197
197
  </div>
198
198
 
199
199
  <div id="footer">
200
- Generated on Fri Mar 1 18:29:45 2019 by
200
+ Generated on Wed Mar 13 18:57:20 2019 by
201
201
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
202
202
  0.9.16 (ruby-2.5.0).
203
203
  </div>
@@ -197,7 +197,7 @@
197
197
  </div>
198
198
 
199
199
  <div id="footer">
200
- Generated on Fri Mar 1 18:29:46 2019 by
200
+ Generated on Wed Mar 13 18:57:21 2019 by
201
201
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
202
202
  0.9.16 (ruby-2.5.0).
203
203
  </div>
@@ -631,7 +631,7 @@
631
631
  </div>
632
632
 
633
633
  <div id="footer">
634
- Generated on Fri Mar 1 18:29:46 2019 by
634
+ Generated on Wed Mar 13 18:57:21 2019 by
635
635
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
636
636
  0.9.16 (ruby-2.5.0).
637
637
  </div>
@@ -779,7 +779,7 @@
779
779
  </div>
780
780
 
781
781
  <div id="footer">
782
- Generated on Fri Mar 1 18:29:45 2019 by
782
+ Generated on Wed Mar 13 18:57:20 2019 by
783
783
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
784
784
  0.9.16 (ruby-2.5.0).
785
785
  </div>
@@ -697,7 +697,7 @@
697
697
  </div>
698
698
 
699
699
  <div id="footer">
700
- Generated on Fri Mar 1 18:29:46 2019 by
700
+ Generated on Wed Mar 13 18:57:21 2019 by
701
701
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
702
702
  0.9.16 (ruby-2.5.0).
703
703
  </div>
@@ -989,7 +989,7 @@
989
989
  </div>
990
990
 
991
991
  <div id="footer">
992
- Generated on Fri Mar 1 18:29:45 2019 by
992
+ Generated on Wed Mar 13 18:57:20 2019 by
993
993
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
994
994
  0.9.16 (ruby-2.5.0).
995
995
  </div>
data/doc/_index.html CHANGED
@@ -629,7 +629,7 @@
629
629
  </div>
630
630
 
631
631
  <div id="footer">
632
- Generated on Fri Mar 1 18:29:41 2019 by
632
+ Generated on Thu Mar 26 12:41:04 2020 by
633
633
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
634
634
  0.9.16 (ruby-2.5.0).
635
635
  </div>
data/doc/file.README.html CHANGED
@@ -57,21 +57,19 @@
57
57
  <div class="clear"></div>
58
58
  </div>
59
59
 
60
- <div id="content"><div id='filecontents'>
61
- <h1 id="label-Strawberry">Strawberry</h1>
60
+ <div id="content"><div id='filecontents'><h1 id="strawberry">Strawberry</h1>
62
61
 
63
- <p>A simple Ruby gem acting as a client for <a
64
- href="http://www.flavoursys.com">Flavoursys Strawberry</a> REST API.</p>
62
+ <p>A simple Ruby gem acting as a client for <a href="http://www.flavoursys.com">Flavoursys Strawberry</a> REST API.</p>
65
63
 
66
- <p>This unofficial implementation covers most of the features offered by
67
- Strawberry API.</p>
64
+ <p>This unofficial implementation covers most of the features offered by Strawberry API.</p>
68
65
 
69
- <h2 id="label-Installation">Installation</h2>
66
+ <h2 id="installation">Installation</h2>
70
67
 
71
- <p>Add this line to your application&#39;s Gemfile:</p>
68
+ <p>Add this line to your applications Gemfile:</p>
72
69
 
73
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>strawberry_api</span><span class='tstring_end'>&#39;</span></span>
74
- </code></pre>
70
+ <p><code>ruby
71
+ gem 'strawberry_api'
72
+ </code></p>
75
73
 
76
74
  <p>And then execute:</p>
77
75
 
@@ -83,136 +81,122 @@ Strawberry API.</p>
83
81
  <pre class="code ruby"><code class="ruby">$ gem install strawberry_api
84
82
  </code></pre>
85
83
 
86
- <h2 id="label-Usage">Usage</h2>
87
-
88
- <h3 id="label-Authentication">Authentication</h3>
89
-
90
- <p>Authenticate to the server via regular credentials or by using an API key.
91
- A standard error will be raised if authentication fails.</p>
84
+ <h2 id="usage">Usage</h2>
92
85
 
93
- <h4 id="label-API+key+based+authentication">API key based authentication</h4>
86
+ <h3 id="authentication">Authentication</h3>
94
87
 
95
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>strawberry_api</span><span class='tstring_end'>&#39;</span></span>
88
+ <p>Authenticate to the server via regular credentials or by using an API key. A standard error will be raised if authentication fails.</p>
96
89
 
97
- <span class='const'><span class='object_link'><a href="StrawberryAPI.html" title="StrawberryAPI (module)">StrawberryAPI</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configure'><span class='object_link'><a href="StrawberryAPI.html#configure-class_method" title="StrawberryAPI.configure (method)">configure</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span>
98
- <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>server_IP_or_hostname</span><span class='tstring_end'>&#39;</span></span>
99
- <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_api_key'>api_key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>api_key</span><span class='tstring_end'>&#39;</span></span>
100
- <span class='kw'>end</span>
90
+ <h4 id="api-key-based-authentication">API key based authentication</h4>
101
91
 
102
- <span class='id identifier rubyid_strawberry'>strawberry</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="StrawberryAPI.html" title="StrawberryAPI (module)">StrawberryAPI</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="StrawberryAPI/Client.html" title="StrawberryAPI::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="StrawberryAPI/HttpClient.html#initialize-instance_method" title="StrawberryAPI::HttpClient#initialize (method)">new</a></span></span>
92
+ <p>```ruby
93
+ require ‘strawberry_api’</p>
103
94
 
104
- <span class='comment'># Returns currently logged in user info
105
- </span><span class='id identifier rubyid_strawberry'>strawberry</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span>
106
- <span class='comment'># =&gt; &quot;#&lt;Strawberry::API::User: id=2, username=&quot;api&quot;, ...
107
- </span></code></pre>
95
+ <p>StrawberryAPI.configure do |c|
96
+ c.host = ‘server_IP_or_hostname’
97
+ c.api_key = ‘api_key’
98
+ end</p>
108
99
 
109
- <h4 id="label-User+credentials+based+authentication">User credentials based authentication</h4>
100
+ <p>strawberry = StrawberryAPI::Client.new</p>
110
101
 
111
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>strawberry_api</span><span class='tstring_end'>&#39;</span></span>
102
+ <h1 id="returns-currently-logged-in-user-info">Returns currently logged in user info</h1>
103
+ <p>strawberry.user
104
+ # =&gt; “#&lt;Strawberry::API::User: id=2, username=”api”, …
105
+ <code>
106
+ #### User credentials based authentication
107
+ </code>ruby
108
+ require ‘strawberry_api’</p>
112
109
 
113
- <span class='const'><span class='object_link'><a href="StrawberryAPI.html" title="StrawberryAPI (module)">StrawberryAPI</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configure'><span class='object_link'><a href="StrawberryAPI.html#configure-class_method" title="StrawberryAPI.configure (method)">configure</a></span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span>
114
- <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>server_IP_or_hostname</span><span class='tstring_end'>&#39;</span></span>
115
- <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>username</span><span class='tstring_end'>&#39;</span></span>
116
- <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_password'>password</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>password</span><span class='tstring_end'>&#39;</span></span>
117
- <span class='kw'>end</span>
110
+ <p>StrawberryAPI.configure do |c|
111
+ c.host = server_IP_or_hostname
112
+ c.username = username
113
+ c.password = password
114
+ end</p>
118
115
 
119
- <span class='id identifier rubyid_strawberry'>strawberry</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="StrawberryAPI.html" title="StrawberryAPI (module)">StrawberryAPI</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="StrawberryAPI/Client.html" title="StrawberryAPI::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="StrawberryAPI/HttpClient.html#initialize-instance_method" title="StrawberryAPI::HttpClient#initialize (method)">new</a></span></span>
116
+ <p>strawberry = StrawberryAPI::Client.new</p>
120
117
 
121
- <span class='comment'># Returns currently logged in user info
122
- </span><span class='id identifier rubyid_strawberry'>strawberry</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span>
123
- <span class='comment'># =&gt; &quot;#&lt;Strawberry::API::User: id=2, username=&quot;api&quot;, ...
124
- </span></code></pre>
118
+ <h1 id="returns-currently-logged-in-user-info-1">Returns currently logged in user info</h1>
119
+ <p>strawberry.user
120
+ # =&gt; “#&lt;Strawberry::API::User: id=2, username=”api”,
121
+ ```</p>
125
122
 
126
- <h3 id="label-Making+requests">Making requests</h3>
123
+ <h3 id="making-requests">Making requests</h3>
127
124
 
128
- <h4 id="label-Strawberry+API+client">Strawberry API client</h4>
125
+ <h4 id="strawberry-api-client">Strawberry API client</h4>
129
126
 
130
- <p><a href="doc/Strawberry/Client.html">API methods</a> are available as
131
- client instance methods.</p>
127
+ <p><a href="doc/Strawberry/Client.html">API methods</a> are available as client instance methods.</p>
132
128
 
133
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_strawberry'>strawberry</span> <span class='op'>=</span> <span class='const'>Strawberry</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
129
+ <p>```ruby
130
+ strawberry = Strawberry::Client.new</p>
134
131
 
135
- <span class='comment'># Returns all Strawberry projects
136
- </span><span class='id identifier rubyid_strawberry'>strawberry</span><span class='period'>.</span><span class='id identifier rubyid_projects'>projects</span>
137
- <span class='comment'># =&gt; [#&lt;Strawberry::API::Project: id=6, name=&quot;test_project&quot;, ...
138
- </span></code></pre>
132
+ <h1 id="returns-all-strawberry-projects">Returns all Strawberry projects</h1>
133
+ <p>strawberry.projects
134
+ # =&gt; [#&lt;Strawberry::API::Project: id=6, name=”test_project”,
135
+ ```</p>
139
136
 
140
- <h3 id="label-Samples">Samples</h3>
137
+ <h3 id="samples">Samples</h3>
141
138
 
142
- <p>Most API methods return an object which provide dot notation access for
143
- fields returned in the API response.</p>
139
+ <p>Most API methods return an object which provide dot notation access for fields returned in the API response.</p>
144
140
 
145
141
  <p>See the <a href="samples">samples</a> directory for more examples.</p>
146
142
 
147
- <h4 id="label-Methods+returning+an+object">Methods returning an object</h4>
143
+ <h4 id="methods-returning-an-object">Methods returning an object</h4>
148
144
 
149
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_strawberry'>strawberry</span><span class='period'>.</span><span class='id identifier rubyid_project'>project</span><span class='lparen'>(</span><span class='label'>id:</span> <span class='int'>6</span><span class='rparen'>)</span>
150
- <span class='comment'># =&gt; #&lt;Strawberry::API::Project: id=6, name=&quot;test_project&quot;, ...
151
- </span></code></pre>
145
+ <p><code>ruby
146
+ strawberry.project(id: 6)
147
+ # =&gt; #&lt;Strawberry::API::Project: id=6, name="test_project", ...
148
+ </code></p>
152
149
 
153
- <h4 id="label-Methods+returning+an+array+of+project+objects">Methods returning an array of project objects</h4>
150
+ <h4 id="methods-returning-an-array-of-project-objects">Methods returning an array of project objects</h4>
154
151
 
155
152
  <p>Some methods return an array of objects .</p>
156
153
 
157
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_strawberry'>strawberry</span><span class='period'>.</span><span class='id identifier rubyid_projects'>projects</span>
158
- <span class='comment'># =&gt; [#&lt;Strawberry::API::Project: id=6, name=&quot;test_project&quot;, ...
159
- </span></code></pre>
160
-
161
- <h4 id="label-Methods+returning+a+Boolean">Methods returning a Boolean</h4>
162
-
163
- <p>A few other methods return a Boolean. The following example uses the
164
- <code>video?</code> method which indicates whether the asset is a video or
165
- not.</p>
166
-
167
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_assets'>assets</span> <span class='op'>=</span> <span class='id identifier rubyid_strawberry'>strawberry</span><span class='period'>.</span><span class='id identifier rubyid_assets'>assets</span>
168
- <span class='comment'># =&gt; [#&lt;Strawberry::API::Asset: id=6, name=&quot;test_asset&quot;, ...
169
- </span>
170
- <span class='id identifier rubyid_assets'>assets</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_asset'>asset</span><span class='op'>|</span>
171
- <span class='comment'># Returns true of false
172
- </span> <span class='kw'>if</span> <span class='id identifier rubyid_asset'>asset</span><span class='period'>.</span><span class='id identifier rubyid_video?'>video?</span>
173
- <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Asset </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asset'>asset</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> is a video</span><span class='tstring_end'>&quot;</span></span>
174
- <span class='kw'>else</span>
175
- <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Asset </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_asset'>asset</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> is not a video</span><span class='tstring_end'>&quot;</span></span>
176
- <span class='kw'>end</span>
177
- <span class='kw'>end</span>
178
- </code></pre>
154
+ <p>```ruby
155
+ strawberry.projects
156
+ # =&gt; [#&lt;Strawberry::API::Project: id=6, name=”test_project”, …</p>
157
+
158
+ <p>```</p>
159
+
160
+ <h4 id="methods-returning-a-boolean">Methods returning a Boolean</h4>
161
+
162
+ <p>A few other methods return a Boolean.
163
+ The following example uses the <code>video?</code> method which indicates whether the asset is a video or not.</p>
164
+
165
+ <p>```ruby
166
+ assets = strawberry.assets
167
+ # =&gt; [#&lt;Strawberry::API::Asset: id=6, name=”test_asset”, …</p>
168
+
169
+ <p>assets.each do |asset|
170
+ # Returns true of false
171
+ if asset.video?
172
+ puts Asset #assetasset.name is a video
173
+ else
174
+ puts “Asset #assetasset.name is not a video”
175
+ end
176
+ end
177
+ ```</p>
179
178
 
180
- <h2 id="label-Development">Development</h2>
179
+ <h2 id="development">Development</h2>
181
180
 
182
- <p>After checking out the repo, run <code>bin/setup</code> to install
183
- dependencies. You can also run <code>bin/console</code> for an interactive
184
- prompt that will allow you to experiment.</p>
181
+ <p>After checking out the repo, run <code>bin/setup</code> to install dependencies. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
185
182
 
186
- <p>To install this gem onto your local machine, run <code>bundle exec rake
187
- install</code>. To release a new version, update the version number in
188
- <code>version.rb</code>, and then run <code>bundle exec rake
189
- release</code>, which will create a git tag for the version, push git
190
- commits and tags, and push the <code>.gem</code> file to <a
191
- href="https://rubygems.org">rubygems.org</a>.</p>
183
+ <p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
192
184
 
193
- <h2 id="label-Contributing">Contributing</h2>
185
+ <h2 id="contributing">Contributing</h2>
194
186
 
195
- <p>Bug reports and pull requests are welcome on GitHub at <a
196
- href="https://github.com/[USERNAME]/strawberry">github.com/[USERNAME]/strawberry</a>.
197
- This project is intended to be a safe, welcoming space for collaboration,
198
- and contributors are expected to adhere to the <a
199
- href="http://contributor-covenant.org">Contributor Covenant</a> code of
200
- conduct.</p>
187
+ <p>Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/strawberry. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
201
188
 
202
- <h2 id="label-License">License</h2>
189
+ <h2 id="license">License</h2>
203
190
 
204
- <p>The gem is available as open source under the terms of the <a
205
- href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
191
+ <p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
206
192
 
207
- <h2 id="label-Code+of+Conduct">Code of Conduct</h2>
193
+ <h2 id="code-of-conduct">Code of Conduct</h2>
208
194
 
209
- <p>Everyone interacting in the Strawberry project’s codebases, issue trackers,
210
- chat rooms and mailing lists is expected to follow the of
211
- conduct[https://github.com/[USERNAME]/strawberry/blob/master/CODE_OF_CONDUCT.md].</p>
195
+ <p>Everyone interacting in the Strawberry project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the <a href="https://github.com/[USERNAME]/strawberry/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
212
196
  </div></div>
213
197
 
214
198
  <div id="footer">
215
- Generated on Fri Mar 1 18:29:42 2019 by
199
+ Generated on Thu Mar 26 12:41:04 2020 by
216
200
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
217
201
  0.9.16 (ruby-2.5.0).
218
202
  </div>