resourcespace-ruby 0.1.1 → 0.1.2
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/.yardoc/checksums +10 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/.yardopts +7 -0
- data/README.md +1 -2
- data/doc/ResourceSpace/AuthenticationError.html +159 -0
- data/doc/ResourceSpace/AuthorizationError.html +159 -0
- data/doc/ResourceSpace/Client.html +2412 -0
- data/doc/ResourceSpace/ClientError.html +159 -0
- data/doc/ResourceSpace/Collection.html +2301 -0
- data/doc/ResourceSpace/Configuration.html +1655 -0
- data/doc/ResourceSpace/ConfigurationError.html +159 -0
- data/doc/ResourceSpace/ConflictError.html +159 -0
- data/doc/ResourceSpace/Error.html +682 -0
- data/doc/ResourceSpace/Metadata.html +2222 -0
- data/doc/ResourceSpace/NetworkError.html +159 -0
- data/doc/ResourceSpace/NotFoundError.html +159 -0
- data/doc/ResourceSpace/ParseError.html +159 -0
- data/doc/ResourceSpace/QuotaExceededError.html +159 -0
- data/doc/ResourceSpace/RateLimitError.html +159 -0
- data/doc/ResourceSpace/Resource.html +2995 -0
- data/doc/ResourceSpace/Search.html +2487 -0
- data/doc/ResourceSpace/ServerError.html +159 -0
- data/doc/ResourceSpace/TimeoutError.html +159 -0
- data/doc/ResourceSpace/UploadError.html +159 -0
- data/doc/ResourceSpace/User.html +2080 -0
- data/doc/ResourceSpace/ValidationError.html +159 -0
- data/doc/ResourceSpace.html +763 -0
- data/doc/_index.html +358 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +503 -0
- data/doc/file.CHANGELOG.html +105 -0
- data/doc/file.LICENSE.html +70 -0
- data/doc/file.README.html +419 -0
- data/doc/file_list.html +69 -0
- data/doc/frames.html +22 -0
- data/doc/index.html +419 -0
- data/doc/js/app.js +344 -0
- data/doc/js/full_list.js +242 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1142 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/resourcespace/version.rb +1 -1
- data/resourcespace-ruby-0.1.0.gem +0 -0
- data/resourcespace-ruby-0.1.1.gem +0 -0
- data/resourcespace-ruby.gemspec +5 -5
- metadata +54 -7
@@ -0,0 +1,1655 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: ResourceSpace::Configuration
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "ResourceSpace::Configuration";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (C)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../ResourceSpace.html" title="ResourceSpace (module)">ResourceSpace</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Configuration</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: ResourceSpace::Configuration
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">ResourceSpace::Configuration</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/resourcespace/configuration.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Configuration class for ResourceSpace client</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
<div class="examples">
|
113
|
+
<h4 class="tag_title">Examples:</h4>
|
114
|
+
|
115
|
+
|
116
|
+
<pre class="example code"><code><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../ResourceSpace.html" title="ResourceSpace (module)">ResourceSpace</a></span></span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="ResourceSpace::Configuration#initialize (method)">new</a></span></span>
|
117
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https://your-resourcespace.com/api/</span><span class='tstring_end'>"</span></span>
|
118
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>your_username</span><span class='tstring_end'>"</span></span>
|
119
|
+
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_private_key'>private_key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>your_private_key</span><span class='tstring_end'>"</span></span></code></pre>
|
120
|
+
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
129
|
+
<ul class="summary">
|
130
|
+
|
131
|
+
<li class="public ">
|
132
|
+
<span class="summary_signature">
|
133
|
+
|
134
|
+
<a href="#auth_mode-instance_method" title="#auth_mode (instance method)">#<strong>auth_mode</strong> ⇒ String </a>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<span class="summary_desc"><div class='inline'>
|
152
|
+
<p>Authentication mode (‘userkey’, ‘sessionkey’, or ‘native’).</p>
|
153
|
+
</div></span>
|
154
|
+
|
155
|
+
</li>
|
156
|
+
|
157
|
+
|
158
|
+
<li class="public ">
|
159
|
+
<span class="summary_signature">
|
160
|
+
|
161
|
+
<a href="#debug-instance_method" title="#debug (instance method)">#<strong>debug</strong> ⇒ Boolean </a>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</span>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
179
|
+
<p>Whether to log API requests and responses (default: false).</p>
|
180
|
+
</div></span>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
<li class="public ">
|
186
|
+
<span class="summary_signature">
|
187
|
+
|
188
|
+
<a href="#default_headers-instance_method" title="#default_headers (instance method)">#<strong>default_headers</strong> ⇒ Hash </a>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
</span>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<span class="summary_desc"><div class='inline'>
|
206
|
+
<p>Default headers to include with all requests.</p>
|
207
|
+
</div></span>
|
208
|
+
|
209
|
+
</li>
|
210
|
+
|
211
|
+
|
212
|
+
<li class="public ">
|
213
|
+
<span class="summary_signature">
|
214
|
+
|
215
|
+
<a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> ⇒ Logger </a>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
</span>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<span class="summary_desc"><div class='inline'>
|
233
|
+
<p>Logger instance for debugging.</p>
|
234
|
+
</div></span>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="public ">
|
240
|
+
<span class="summary_signature">
|
241
|
+
|
242
|
+
<a href="#private_key-instance_method" title="#private_key (instance method)">#<strong>private_key</strong> ⇒ String </a>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
</span>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<span class="summary_desc"><div class='inline'>
|
260
|
+
<p>The private API key for the user.</p>
|
261
|
+
</div></span>
|
262
|
+
|
263
|
+
</li>
|
264
|
+
|
265
|
+
|
266
|
+
<li class="public ">
|
267
|
+
<span class="summary_signature">
|
268
|
+
|
269
|
+
<a href="#retries-instance_method" title="#retries (instance method)">#<strong>retries</strong> ⇒ Integer </a>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</span>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
<span class="summary_desc"><div class='inline'>
|
287
|
+
<p>Number of retry attempts for failed requests (default: 3).</p>
|
288
|
+
</div></span>
|
289
|
+
|
290
|
+
</li>
|
291
|
+
|
292
|
+
|
293
|
+
<li class="public ">
|
294
|
+
<span class="summary_signature">
|
295
|
+
|
296
|
+
<a href="#timeout-instance_method" title="#timeout (instance method)">#<strong>timeout</strong> ⇒ Integer </a>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
</span>
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
<span class="summary_desc"><div class='inline'>
|
314
|
+
<p>Request timeout in seconds (default: 30).</p>
|
315
|
+
</div></span>
|
316
|
+
|
317
|
+
</li>
|
318
|
+
|
319
|
+
|
320
|
+
<li class="public ">
|
321
|
+
<span class="summary_signature">
|
322
|
+
|
323
|
+
<a href="#url-instance_method" title="#url (instance method)">#<strong>url</strong> ⇒ String </a>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</span>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
<span class="summary_desc"><div class='inline'>
|
341
|
+
<p>The ResourceSpace API URL (must end with /api/).</p>
|
342
|
+
</div></span>
|
343
|
+
|
344
|
+
</li>
|
345
|
+
|
346
|
+
|
347
|
+
<li class="public ">
|
348
|
+
<span class="summary_signature">
|
349
|
+
|
350
|
+
<a href="#user-instance_method" title="#user (instance method)">#<strong>user</strong> ⇒ String </a>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
</span>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
<span class="summary_desc"><div class='inline'>
|
368
|
+
<p>The ResourceSpace username.</p>
|
369
|
+
</div></span>
|
370
|
+
|
371
|
+
</li>
|
372
|
+
|
373
|
+
|
374
|
+
<li class="public ">
|
375
|
+
<span class="summary_signature">
|
376
|
+
|
377
|
+
<a href="#user_agent-instance_method" title="#user_agent (instance method)">#<strong>user_agent</strong> ⇒ String </a>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
</span>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
<span class="summary_desc"><div class='inline'>
|
395
|
+
<p>User agent string for requests.</p>
|
396
|
+
</div></span>
|
397
|
+
|
398
|
+
</li>
|
399
|
+
|
400
|
+
|
401
|
+
<li class="public ">
|
402
|
+
<span class="summary_signature">
|
403
|
+
|
404
|
+
<a href="#verify_ssl-instance_method" title="#verify_ssl (instance method)">#<strong>verify_ssl</strong> ⇒ Boolean </a>
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
</span>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
<span class="summary_desc"><div class='inline'>
|
422
|
+
<p>Whether to verify SSL certificates (default: true).</p>
|
423
|
+
</div></span>
|
424
|
+
|
425
|
+
</li>
|
426
|
+
|
427
|
+
|
428
|
+
</ul>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
<h2>
|
435
|
+
Instance Method Summary
|
436
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
437
|
+
</h2>
|
438
|
+
|
439
|
+
<ul class="summary">
|
440
|
+
|
441
|
+
<li class="public ">
|
442
|
+
<span class="summary_signature">
|
443
|
+
|
444
|
+
<a href="#dup-instance_method" title="#dup (instance method)">#<strong>dup</strong> ⇒ Configuration </a>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
</span>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
<span class="summary_desc"><div class='inline'>
|
459
|
+
<p>Create a duplicate of this configuration.</p>
|
460
|
+
</div></span>
|
461
|
+
|
462
|
+
</li>
|
463
|
+
|
464
|
+
|
465
|
+
<li class="public ">
|
466
|
+
<span class="summary_signature">
|
467
|
+
|
468
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Configuration </a>
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
</span>
|
473
|
+
|
474
|
+
|
475
|
+
<span class="note title constructor">constructor</span>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
<span class="summary_desc"><div class='inline'>
|
485
|
+
<p>Initialize a new configuration with default values.</p>
|
486
|
+
</div></span>
|
487
|
+
|
488
|
+
</li>
|
489
|
+
|
490
|
+
|
491
|
+
<li class="public ">
|
492
|
+
<span class="summary_signature">
|
493
|
+
|
494
|
+
<a href="#to_h-instance_method" title="#to_h (instance method)">#<strong>to_h</strong> ⇒ Hash </a>
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
</span>
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
<span class="summary_desc"><div class='inline'>
|
509
|
+
<p>Convert configuration to a hash.</p>
|
510
|
+
</div></span>
|
511
|
+
|
512
|
+
</li>
|
513
|
+
|
514
|
+
|
515
|
+
<li class="public ">
|
516
|
+
<span class="summary_signature">
|
517
|
+
|
518
|
+
<a href="#valid%3F-instance_method" title="#valid? (instance method)">#<strong>valid?</strong> ⇒ Boolean </a>
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
</span>
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
<span class="summary_desc"><div class='inline'>
|
533
|
+
<p>Check if configuration is valid without raising an error.</p>
|
534
|
+
</div></span>
|
535
|
+
|
536
|
+
</li>
|
537
|
+
|
538
|
+
|
539
|
+
<li class="public ">
|
540
|
+
<span class="summary_signature">
|
541
|
+
|
542
|
+
<a href="#validate!-instance_method" title="#validate! (instance method)">#<strong>validate!</strong> ⇒ Boolean </a>
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
</span>
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
<span class="summary_desc"><div class='inline'>
|
557
|
+
<p>Validate the configuration.</p>
|
558
|
+
</div></span>
|
559
|
+
|
560
|
+
</li>
|
561
|
+
|
562
|
+
|
563
|
+
</ul>
|
564
|
+
|
565
|
+
|
566
|
+
<div id="constructor_details" class="method_details_list">
|
567
|
+
<h2>Constructor Details</h2>
|
568
|
+
|
569
|
+
<div class="method_details first">
|
570
|
+
<h3 class="signature first" id="initialize-instance_method">
|
571
|
+
|
572
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="ResourceSpace::Configuration (class)">Configuration</a></span></tt>
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
</h3><div class="docstring">
|
579
|
+
<div class="discussion">
|
580
|
+
|
581
|
+
<p>Initialize a new configuration with default values</p>
|
582
|
+
|
583
|
+
|
584
|
+
</div>
|
585
|
+
</div>
|
586
|
+
<div class="tags">
|
587
|
+
|
588
|
+
|
589
|
+
</div><table class="source_code">
|
590
|
+
<tr>
|
591
|
+
<td>
|
592
|
+
<pre class="lines">
|
593
|
+
|
594
|
+
|
595
|
+
46
|
596
|
+
47
|
597
|
+
48
|
598
|
+
49
|
599
|
+
50
|
600
|
+
51
|
601
|
+
52
|
602
|
+
53
|
603
|
+
54
|
604
|
+
55
|
605
|
+
56
|
606
|
+
57
|
607
|
+
58</pre>
|
608
|
+
</td>
|
609
|
+
<td>
|
610
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 46</span>
|
611
|
+
|
612
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
613
|
+
<span class='ivar'>@url</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
614
|
+
<span class='ivar'>@user</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
615
|
+
<span class='ivar'>@private_key</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
616
|
+
<span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='int'>30</span>
|
617
|
+
<span class='ivar'>@retries</span> <span class='op'>=</span> <span class='int'>3</span>
|
618
|
+
<span class='ivar'>@user_agent</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ResourceSpace Ruby Client </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../ResourceSpace.html" title="ResourceSpace (module)">ResourceSpace</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ResourceSpace.html#VERSION-constant" title="ResourceSpace::VERSION (constant)">VERSION</a></span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
619
|
+
<span class='ivar'>@verify_ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
|
620
|
+
<span class='ivar'>@auth_mode</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>userkey</span><span class='tstring_end'>"</span></span>
|
621
|
+
<span class='ivar'>@default_headers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
622
|
+
<span class='ivar'>@debug</span> <span class='op'>=</span> <span class='kw'>false</span>
|
623
|
+
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
624
|
+
<span class='kw'>end</span></pre>
|
625
|
+
</td>
|
626
|
+
</tr>
|
627
|
+
</table>
|
628
|
+
</div>
|
629
|
+
|
630
|
+
</div>
|
631
|
+
|
632
|
+
<div id="instance_attr_details" class="attr_details">
|
633
|
+
<h2>Instance Attribute Details</h2>
|
634
|
+
|
635
|
+
|
636
|
+
<span id="auth_mode=-instance_method"></span>
|
637
|
+
<div class="method_details first">
|
638
|
+
<h3 class="signature first" id="auth_mode-instance_method">
|
639
|
+
|
640
|
+
#<strong>auth_mode</strong> ⇒ <tt>String</tt>
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
</h3><div class="docstring">
|
647
|
+
<div class="discussion">
|
648
|
+
|
649
|
+
<p>Returns authentication mode (‘userkey’, ‘sessionkey’, or ‘native’).</p>
|
650
|
+
|
651
|
+
|
652
|
+
</div>
|
653
|
+
</div>
|
654
|
+
<div class="tags">
|
655
|
+
|
656
|
+
<p class="tag_title">Returns:</p>
|
657
|
+
<ul class="return">
|
658
|
+
|
659
|
+
<li>
|
660
|
+
|
661
|
+
|
662
|
+
<span class='type'>(<tt>String</tt>)</span>
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
—
|
667
|
+
<div class='inline'>
|
668
|
+
<p>authentication mode (‘userkey’, ‘sessionkey’, or ‘native’)</p>
|
669
|
+
</div>
|
670
|
+
|
671
|
+
</li>
|
672
|
+
|
673
|
+
</ul>
|
674
|
+
|
675
|
+
</div><table class="source_code">
|
676
|
+
<tr>
|
677
|
+
<td>
|
678
|
+
<pre class="lines">
|
679
|
+
|
680
|
+
|
681
|
+
34
|
682
|
+
35
|
683
|
+
36</pre>
|
684
|
+
</td>
|
685
|
+
<td>
|
686
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 34</span>
|
687
|
+
|
688
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_auth_mode'>auth_mode</span>
|
689
|
+
<span class='ivar'>@auth_mode</span>
|
690
|
+
<span class='kw'>end</span></pre>
|
691
|
+
</td>
|
692
|
+
</tr>
|
693
|
+
</table>
|
694
|
+
</div>
|
695
|
+
|
696
|
+
|
697
|
+
<span id="debug=-instance_method"></span>
|
698
|
+
<div class="method_details ">
|
699
|
+
<h3 class="signature " id="debug-instance_method">
|
700
|
+
|
701
|
+
#<strong>debug</strong> ⇒ <tt>Boolean</tt>
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
</h3><div class="docstring">
|
708
|
+
<div class="discussion">
|
709
|
+
|
710
|
+
<p>Returns whether to log API requests and responses (default: false).</p>
|
711
|
+
|
712
|
+
|
713
|
+
</div>
|
714
|
+
</div>
|
715
|
+
<div class="tags">
|
716
|
+
|
717
|
+
<p class="tag_title">Returns:</p>
|
718
|
+
<ul class="return">
|
719
|
+
|
720
|
+
<li>
|
721
|
+
|
722
|
+
|
723
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
—
|
728
|
+
<div class='inline'>
|
729
|
+
<p>whether to log API requests and responses (default: false)</p>
|
730
|
+
</div>
|
731
|
+
|
732
|
+
</li>
|
733
|
+
|
734
|
+
</ul>
|
735
|
+
|
736
|
+
</div><table class="source_code">
|
737
|
+
<tr>
|
738
|
+
<td>
|
739
|
+
<pre class="lines">
|
740
|
+
|
741
|
+
|
742
|
+
40
|
743
|
+
41
|
744
|
+
42</pre>
|
745
|
+
</td>
|
746
|
+
<td>
|
747
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 40</span>
|
748
|
+
|
749
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span>
|
750
|
+
<span class='ivar'>@debug</span>
|
751
|
+
<span class='kw'>end</span></pre>
|
752
|
+
</td>
|
753
|
+
</tr>
|
754
|
+
</table>
|
755
|
+
</div>
|
756
|
+
|
757
|
+
|
758
|
+
<span id="default_headers=-instance_method"></span>
|
759
|
+
<div class="method_details ">
|
760
|
+
<h3 class="signature " id="default_headers-instance_method">
|
761
|
+
|
762
|
+
#<strong>default_headers</strong> ⇒ <tt>Hash</tt>
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
</h3><div class="docstring">
|
769
|
+
<div class="discussion">
|
770
|
+
|
771
|
+
<p>Returns default headers to include with all requests.</p>
|
772
|
+
|
773
|
+
|
774
|
+
</div>
|
775
|
+
</div>
|
776
|
+
<div class="tags">
|
777
|
+
|
778
|
+
<p class="tag_title">Returns:</p>
|
779
|
+
<ul class="return">
|
780
|
+
|
781
|
+
<li>
|
782
|
+
|
783
|
+
|
784
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
—
|
789
|
+
<div class='inline'>
|
790
|
+
<p>default headers to include with all requests</p>
|
791
|
+
</div>
|
792
|
+
|
793
|
+
</li>
|
794
|
+
|
795
|
+
</ul>
|
796
|
+
|
797
|
+
</div><table class="source_code">
|
798
|
+
<tr>
|
799
|
+
<td>
|
800
|
+
<pre class="lines">
|
801
|
+
|
802
|
+
|
803
|
+
37
|
804
|
+
38
|
805
|
+
39</pre>
|
806
|
+
</td>
|
807
|
+
<td>
|
808
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 37</span>
|
809
|
+
|
810
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_headers'>default_headers</span>
|
811
|
+
<span class='ivar'>@default_headers</span>
|
812
|
+
<span class='kw'>end</span></pre>
|
813
|
+
</td>
|
814
|
+
</tr>
|
815
|
+
</table>
|
816
|
+
</div>
|
817
|
+
|
818
|
+
|
819
|
+
<span id="logger=-instance_method"></span>
|
820
|
+
<div class="method_details ">
|
821
|
+
<h3 class="signature " id="logger-instance_method">
|
822
|
+
|
823
|
+
#<strong>logger</strong> ⇒ <tt>Logger</tt>
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
</h3><div class="docstring">
|
830
|
+
<div class="discussion">
|
831
|
+
|
832
|
+
<p>Returns logger instance for debugging.</p>
|
833
|
+
|
834
|
+
|
835
|
+
</div>
|
836
|
+
</div>
|
837
|
+
<div class="tags">
|
838
|
+
|
839
|
+
<p class="tag_title">Returns:</p>
|
840
|
+
<ul class="return">
|
841
|
+
|
842
|
+
<li>
|
843
|
+
|
844
|
+
|
845
|
+
<span class='type'>(<tt>Logger</tt>)</span>
|
846
|
+
|
847
|
+
|
848
|
+
|
849
|
+
—
|
850
|
+
<div class='inline'>
|
851
|
+
<p>logger instance for debugging</p>
|
852
|
+
</div>
|
853
|
+
|
854
|
+
</li>
|
855
|
+
|
856
|
+
</ul>
|
857
|
+
|
858
|
+
</div><table class="source_code">
|
859
|
+
<tr>
|
860
|
+
<td>
|
861
|
+
<pre class="lines">
|
862
|
+
|
863
|
+
|
864
|
+
43
|
865
|
+
44
|
866
|
+
45</pre>
|
867
|
+
</td>
|
868
|
+
<td>
|
869
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 43</span>
|
870
|
+
|
871
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
|
872
|
+
<span class='ivar'>@logger</span>
|
873
|
+
<span class='kw'>end</span></pre>
|
874
|
+
</td>
|
875
|
+
</tr>
|
876
|
+
</table>
|
877
|
+
</div>
|
878
|
+
|
879
|
+
|
880
|
+
<span id="private_key=-instance_method"></span>
|
881
|
+
<div class="method_details ">
|
882
|
+
<h3 class="signature " id="private_key-instance_method">
|
883
|
+
|
884
|
+
#<strong>private_key</strong> ⇒ <tt>String</tt>
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
</h3><div class="docstring">
|
891
|
+
<div class="discussion">
|
892
|
+
|
893
|
+
<p>Returns the private API key for the user.</p>
|
894
|
+
|
895
|
+
|
896
|
+
</div>
|
897
|
+
</div>
|
898
|
+
<div class="tags">
|
899
|
+
|
900
|
+
<p class="tag_title">Returns:</p>
|
901
|
+
<ul class="return">
|
902
|
+
|
903
|
+
<li>
|
904
|
+
|
905
|
+
|
906
|
+
<span class='type'>(<tt>String</tt>)</span>
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
—
|
911
|
+
<div class='inline'>
|
912
|
+
<p>the private API key for the user</p>
|
913
|
+
</div>
|
914
|
+
|
915
|
+
</li>
|
916
|
+
|
917
|
+
</ul>
|
918
|
+
|
919
|
+
</div><table class="source_code">
|
920
|
+
<tr>
|
921
|
+
<td>
|
922
|
+
<pre class="lines">
|
923
|
+
|
924
|
+
|
925
|
+
19
|
926
|
+
20
|
927
|
+
21</pre>
|
928
|
+
</td>
|
929
|
+
<td>
|
930
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 19</span>
|
931
|
+
|
932
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_private_key'>private_key</span>
|
933
|
+
<span class='ivar'>@private_key</span>
|
934
|
+
<span class='kw'>end</span></pre>
|
935
|
+
</td>
|
936
|
+
</tr>
|
937
|
+
</table>
|
938
|
+
</div>
|
939
|
+
|
940
|
+
|
941
|
+
<span id="retries=-instance_method"></span>
|
942
|
+
<div class="method_details ">
|
943
|
+
<h3 class="signature " id="retries-instance_method">
|
944
|
+
|
945
|
+
#<strong>retries</strong> ⇒ <tt>Integer</tt>
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
</h3><div class="docstring">
|
952
|
+
<div class="discussion">
|
953
|
+
|
954
|
+
<p>Returns number of retry attempts for failed requests (default: 3).</p>
|
955
|
+
|
956
|
+
|
957
|
+
</div>
|
958
|
+
</div>
|
959
|
+
<div class="tags">
|
960
|
+
|
961
|
+
<p class="tag_title">Returns:</p>
|
962
|
+
<ul class="return">
|
963
|
+
|
964
|
+
<li>
|
965
|
+
|
966
|
+
|
967
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
968
|
+
|
969
|
+
|
970
|
+
|
971
|
+
—
|
972
|
+
<div class='inline'>
|
973
|
+
<p>number of retry attempts for failed requests (default: 3)</p>
|
974
|
+
</div>
|
975
|
+
|
976
|
+
</li>
|
977
|
+
|
978
|
+
</ul>
|
979
|
+
|
980
|
+
</div><table class="source_code">
|
981
|
+
<tr>
|
982
|
+
<td>
|
983
|
+
<pre class="lines">
|
984
|
+
|
985
|
+
|
986
|
+
25
|
987
|
+
26
|
988
|
+
27</pre>
|
989
|
+
</td>
|
990
|
+
<td>
|
991
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 25</span>
|
992
|
+
|
993
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_retries'>retries</span>
|
994
|
+
<span class='ivar'>@retries</span>
|
995
|
+
<span class='kw'>end</span></pre>
|
996
|
+
</td>
|
997
|
+
</tr>
|
998
|
+
</table>
|
999
|
+
</div>
|
1000
|
+
|
1001
|
+
|
1002
|
+
<span id="timeout=-instance_method"></span>
|
1003
|
+
<div class="method_details ">
|
1004
|
+
<h3 class="signature " id="timeout-instance_method">
|
1005
|
+
|
1006
|
+
#<strong>timeout</strong> ⇒ <tt>Integer</tt>
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
|
1012
|
+
</h3><div class="docstring">
|
1013
|
+
<div class="discussion">
|
1014
|
+
|
1015
|
+
<p>Returns request timeout in seconds (default: 30).</p>
|
1016
|
+
|
1017
|
+
|
1018
|
+
</div>
|
1019
|
+
</div>
|
1020
|
+
<div class="tags">
|
1021
|
+
|
1022
|
+
<p class="tag_title">Returns:</p>
|
1023
|
+
<ul class="return">
|
1024
|
+
|
1025
|
+
<li>
|
1026
|
+
|
1027
|
+
|
1028
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1029
|
+
|
1030
|
+
|
1031
|
+
|
1032
|
+
—
|
1033
|
+
<div class='inline'>
|
1034
|
+
<p>request timeout in seconds (default: 30)</p>
|
1035
|
+
</div>
|
1036
|
+
|
1037
|
+
</li>
|
1038
|
+
|
1039
|
+
</ul>
|
1040
|
+
|
1041
|
+
</div><table class="source_code">
|
1042
|
+
<tr>
|
1043
|
+
<td>
|
1044
|
+
<pre class="lines">
|
1045
|
+
|
1046
|
+
|
1047
|
+
22
|
1048
|
+
23
|
1049
|
+
24</pre>
|
1050
|
+
</td>
|
1051
|
+
<td>
|
1052
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 22</span>
|
1053
|
+
|
1054
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_timeout'>timeout</span>
|
1055
|
+
<span class='ivar'>@timeout</span>
|
1056
|
+
<span class='kw'>end</span></pre>
|
1057
|
+
</td>
|
1058
|
+
</tr>
|
1059
|
+
</table>
|
1060
|
+
</div>
|
1061
|
+
|
1062
|
+
|
1063
|
+
<span id="url=-instance_method"></span>
|
1064
|
+
<div class="method_details ">
|
1065
|
+
<h3 class="signature " id="url-instance_method">
|
1066
|
+
|
1067
|
+
#<strong>url</strong> ⇒ <tt>String</tt>
|
1068
|
+
|
1069
|
+
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
</h3><div class="docstring">
|
1074
|
+
<div class="discussion">
|
1075
|
+
|
1076
|
+
<p>Returns the ResourceSpace API URL (must end with /api/).</p>
|
1077
|
+
|
1078
|
+
|
1079
|
+
</div>
|
1080
|
+
</div>
|
1081
|
+
<div class="tags">
|
1082
|
+
|
1083
|
+
<p class="tag_title">Returns:</p>
|
1084
|
+
<ul class="return">
|
1085
|
+
|
1086
|
+
<li>
|
1087
|
+
|
1088
|
+
|
1089
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
—
|
1094
|
+
<div class='inline'>
|
1095
|
+
<p>the ResourceSpace API URL (must end with /api/)</p>
|
1096
|
+
</div>
|
1097
|
+
|
1098
|
+
</li>
|
1099
|
+
|
1100
|
+
</ul>
|
1101
|
+
|
1102
|
+
</div><table class="source_code">
|
1103
|
+
<tr>
|
1104
|
+
<td>
|
1105
|
+
<pre class="lines">
|
1106
|
+
|
1107
|
+
|
1108
|
+
13
|
1109
|
+
14
|
1110
|
+
15</pre>
|
1111
|
+
</td>
|
1112
|
+
<td>
|
1113
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 13</span>
|
1114
|
+
|
1115
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
1116
|
+
<span class='ivar'>@url</span>
|
1117
|
+
<span class='kw'>end</span></pre>
|
1118
|
+
</td>
|
1119
|
+
</tr>
|
1120
|
+
</table>
|
1121
|
+
</div>
|
1122
|
+
|
1123
|
+
|
1124
|
+
<span id="user=-instance_method"></span>
|
1125
|
+
<div class="method_details ">
|
1126
|
+
<h3 class="signature " id="user-instance_method">
|
1127
|
+
|
1128
|
+
#<strong>user</strong> ⇒ <tt>String</tt>
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
</h3><div class="docstring">
|
1135
|
+
<div class="discussion">
|
1136
|
+
|
1137
|
+
<p>Returns the ResourceSpace username.</p>
|
1138
|
+
|
1139
|
+
|
1140
|
+
</div>
|
1141
|
+
</div>
|
1142
|
+
<div class="tags">
|
1143
|
+
|
1144
|
+
<p class="tag_title">Returns:</p>
|
1145
|
+
<ul class="return">
|
1146
|
+
|
1147
|
+
<li>
|
1148
|
+
|
1149
|
+
|
1150
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1151
|
+
|
1152
|
+
|
1153
|
+
|
1154
|
+
—
|
1155
|
+
<div class='inline'>
|
1156
|
+
<p>the ResourceSpace username</p>
|
1157
|
+
</div>
|
1158
|
+
|
1159
|
+
</li>
|
1160
|
+
|
1161
|
+
</ul>
|
1162
|
+
|
1163
|
+
</div><table class="source_code">
|
1164
|
+
<tr>
|
1165
|
+
<td>
|
1166
|
+
<pre class="lines">
|
1167
|
+
|
1168
|
+
|
1169
|
+
16
|
1170
|
+
17
|
1171
|
+
18</pre>
|
1172
|
+
</td>
|
1173
|
+
<td>
|
1174
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 16</span>
|
1175
|
+
|
1176
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_user'>user</span>
|
1177
|
+
<span class='ivar'>@user</span>
|
1178
|
+
<span class='kw'>end</span></pre>
|
1179
|
+
</td>
|
1180
|
+
</tr>
|
1181
|
+
</table>
|
1182
|
+
</div>
|
1183
|
+
|
1184
|
+
|
1185
|
+
<span id="user_agent=-instance_method"></span>
|
1186
|
+
<div class="method_details ">
|
1187
|
+
<h3 class="signature " id="user_agent-instance_method">
|
1188
|
+
|
1189
|
+
#<strong>user_agent</strong> ⇒ <tt>String</tt>
|
1190
|
+
|
1191
|
+
|
1192
|
+
|
1193
|
+
|
1194
|
+
|
1195
|
+
</h3><div class="docstring">
|
1196
|
+
<div class="discussion">
|
1197
|
+
|
1198
|
+
<p>Returns user agent string for requests.</p>
|
1199
|
+
|
1200
|
+
|
1201
|
+
</div>
|
1202
|
+
</div>
|
1203
|
+
<div class="tags">
|
1204
|
+
|
1205
|
+
<p class="tag_title">Returns:</p>
|
1206
|
+
<ul class="return">
|
1207
|
+
|
1208
|
+
<li>
|
1209
|
+
|
1210
|
+
|
1211
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1212
|
+
|
1213
|
+
|
1214
|
+
|
1215
|
+
—
|
1216
|
+
<div class='inline'>
|
1217
|
+
<p>user agent string for requests</p>
|
1218
|
+
</div>
|
1219
|
+
|
1220
|
+
</li>
|
1221
|
+
|
1222
|
+
</ul>
|
1223
|
+
|
1224
|
+
</div><table class="source_code">
|
1225
|
+
<tr>
|
1226
|
+
<td>
|
1227
|
+
<pre class="lines">
|
1228
|
+
|
1229
|
+
|
1230
|
+
28
|
1231
|
+
29
|
1232
|
+
30</pre>
|
1233
|
+
</td>
|
1234
|
+
<td>
|
1235
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 28</span>
|
1236
|
+
|
1237
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
|
1238
|
+
<span class='ivar'>@user_agent</span>
|
1239
|
+
<span class='kw'>end</span></pre>
|
1240
|
+
</td>
|
1241
|
+
</tr>
|
1242
|
+
</table>
|
1243
|
+
</div>
|
1244
|
+
|
1245
|
+
|
1246
|
+
<span id="verify_ssl=-instance_method"></span>
|
1247
|
+
<div class="method_details ">
|
1248
|
+
<h3 class="signature " id="verify_ssl-instance_method">
|
1249
|
+
|
1250
|
+
#<strong>verify_ssl</strong> ⇒ <tt>Boolean</tt>
|
1251
|
+
|
1252
|
+
|
1253
|
+
|
1254
|
+
|
1255
|
+
|
1256
|
+
</h3><div class="docstring">
|
1257
|
+
<div class="discussion">
|
1258
|
+
|
1259
|
+
<p>Returns whether to verify SSL certificates (default: true).</p>
|
1260
|
+
|
1261
|
+
|
1262
|
+
</div>
|
1263
|
+
</div>
|
1264
|
+
<div class="tags">
|
1265
|
+
|
1266
|
+
<p class="tag_title">Returns:</p>
|
1267
|
+
<ul class="return">
|
1268
|
+
|
1269
|
+
<li>
|
1270
|
+
|
1271
|
+
|
1272
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1273
|
+
|
1274
|
+
|
1275
|
+
|
1276
|
+
—
|
1277
|
+
<div class='inline'>
|
1278
|
+
<p>whether to verify SSL certificates (default: true)</p>
|
1279
|
+
</div>
|
1280
|
+
|
1281
|
+
</li>
|
1282
|
+
|
1283
|
+
</ul>
|
1284
|
+
|
1285
|
+
</div><table class="source_code">
|
1286
|
+
<tr>
|
1287
|
+
<td>
|
1288
|
+
<pre class="lines">
|
1289
|
+
|
1290
|
+
|
1291
|
+
31
|
1292
|
+
32
|
1293
|
+
33</pre>
|
1294
|
+
</td>
|
1295
|
+
<td>
|
1296
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 31</span>
|
1297
|
+
|
1298
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_verify_ssl'>verify_ssl</span>
|
1299
|
+
<span class='ivar'>@verify_ssl</span>
|
1300
|
+
<span class='kw'>end</span></pre>
|
1301
|
+
</td>
|
1302
|
+
</tr>
|
1303
|
+
</table>
|
1304
|
+
</div>
|
1305
|
+
|
1306
|
+
</div>
|
1307
|
+
|
1308
|
+
|
1309
|
+
<div id="instance_method_details" class="method_details_list">
|
1310
|
+
<h2>Instance Method Details</h2>
|
1311
|
+
|
1312
|
+
|
1313
|
+
<div class="method_details first">
|
1314
|
+
<h3 class="signature first" id="dup-instance_method">
|
1315
|
+
|
1316
|
+
#<strong>dup</strong> ⇒ <tt><span class='object_link'><a href="" title="ResourceSpace::Configuration (class)">Configuration</a></span></tt>
|
1317
|
+
|
1318
|
+
|
1319
|
+
|
1320
|
+
|
1321
|
+
|
1322
|
+
</h3><div class="docstring">
|
1323
|
+
<div class="discussion">
|
1324
|
+
|
1325
|
+
<p>Create a duplicate of this configuration</p>
|
1326
|
+
|
1327
|
+
|
1328
|
+
</div>
|
1329
|
+
</div>
|
1330
|
+
<div class="tags">
|
1331
|
+
|
1332
|
+
<p class="tag_title">Returns:</p>
|
1333
|
+
<ul class="return">
|
1334
|
+
|
1335
|
+
<li>
|
1336
|
+
|
1337
|
+
|
1338
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="ResourceSpace::Configuration (class)">Configuration</a></span></tt>)</span>
|
1339
|
+
|
1340
|
+
|
1341
|
+
|
1342
|
+
—
|
1343
|
+
<div class='inline'>
|
1344
|
+
<p>a new configuration with the same values</p>
|
1345
|
+
</div>
|
1346
|
+
|
1347
|
+
</li>
|
1348
|
+
|
1349
|
+
</ul>
|
1350
|
+
|
1351
|
+
</div><table class="source_code">
|
1352
|
+
<tr>
|
1353
|
+
<td>
|
1354
|
+
<pre class="lines">
|
1355
|
+
|
1356
|
+
|
1357
|
+
111
|
1358
|
+
112
|
1359
|
+
113
|
1360
|
+
114
|
1361
|
+
115
|
1362
|
+
116
|
1363
|
+
117
|
1364
|
+
118
|
1365
|
+
119
|
1366
|
+
120
|
1367
|
+
121
|
1368
|
+
122
|
1369
|
+
123
|
1370
|
+
124
|
1371
|
+
125</pre>
|
1372
|
+
</td>
|
1373
|
+
<td>
|
1374
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 111</span>
|
1375
|
+
|
1376
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dup'>dup</span>
|
1377
|
+
<span class='id identifier rubyid_new_config'>new_config</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="ResourceSpace::Configuration (class)">Configuration</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="ResourceSpace::Configuration#initialize (method)">new</a></span></span>
|
1378
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span>
|
1379
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span> <span class='op'>=</span> <span class='id identifier rubyid_user'>user</span>
|
1380
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_private_key'>private_key</span> <span class='op'>=</span> <span class='id identifier rubyid_private_key'>private_key</span>
|
1381
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_timeout'>timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_timeout'>timeout</span>
|
1382
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_retries'>retries</span> <span class='op'>=</span> <span class='id identifier rubyid_retries'>retries</span>
|
1383
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_user_agent'>user_agent</span> <span class='op'>=</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
|
1384
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_verify_ssl'>verify_ssl</span> <span class='op'>=</span> <span class='id identifier rubyid_verify_ssl'>verify_ssl</span>
|
1385
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_auth_mode'>auth_mode</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_mode'>auth_mode</span>
|
1386
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_default_headers'>default_headers</span> <span class='op'>=</span> <span class='id identifier rubyid_default_headers'>default_headers</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
1387
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='op'>=</span> <span class='id identifier rubyid_debug'>debug</span>
|
1388
|
+
<span class='id identifier rubyid_new_config'>new_config</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='id identifier rubyid_logger'>logger</span>
|
1389
|
+
<span class='id identifier rubyid_new_config'>new_config</span>
|
1390
|
+
<span class='kw'>end</span></pre>
|
1391
|
+
</td>
|
1392
|
+
</tr>
|
1393
|
+
</table>
|
1394
|
+
</div>
|
1395
|
+
|
1396
|
+
<div class="method_details ">
|
1397
|
+
<h3 class="signature " id="to_h-instance_method">
|
1398
|
+
|
1399
|
+
#<strong>to_h</strong> ⇒ <tt>Hash</tt>
|
1400
|
+
|
1401
|
+
|
1402
|
+
|
1403
|
+
|
1404
|
+
|
1405
|
+
</h3><div class="docstring">
|
1406
|
+
<div class="discussion">
|
1407
|
+
|
1408
|
+
<p>Convert configuration to a hash</p>
|
1409
|
+
|
1410
|
+
|
1411
|
+
</div>
|
1412
|
+
</div>
|
1413
|
+
<div class="tags">
|
1414
|
+
|
1415
|
+
<p class="tag_title">Returns:</p>
|
1416
|
+
<ul class="return">
|
1417
|
+
|
1418
|
+
<li>
|
1419
|
+
|
1420
|
+
|
1421
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1422
|
+
|
1423
|
+
|
1424
|
+
|
1425
|
+
—
|
1426
|
+
<div class='inline'>
|
1427
|
+
<p>configuration as a hash</p>
|
1428
|
+
</div>
|
1429
|
+
|
1430
|
+
</li>
|
1431
|
+
|
1432
|
+
</ul>
|
1433
|
+
|
1434
|
+
</div><table class="source_code">
|
1435
|
+
<tr>
|
1436
|
+
<td>
|
1437
|
+
<pre class="lines">
|
1438
|
+
|
1439
|
+
|
1440
|
+
93
|
1441
|
+
94
|
1442
|
+
95
|
1443
|
+
96
|
1444
|
+
97
|
1445
|
+
98
|
1446
|
+
99
|
1447
|
+
100
|
1448
|
+
101
|
1449
|
+
102
|
1450
|
+
103
|
1451
|
+
104
|
1452
|
+
105
|
1453
|
+
106</pre>
|
1454
|
+
</td>
|
1455
|
+
<td>
|
1456
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 93</span>
|
1457
|
+
|
1458
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
|
1459
|
+
<span class='lbrace'>{</span>
|
1460
|
+
<span class='label'>url:</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span>
|
1461
|
+
<span class='label'>user:</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span>
|
1462
|
+
<span class='label'>private_key:</span> <span class='id identifier rubyid_private_key'>private_key</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[REDACTED]</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
1463
|
+
<span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span>
|
1464
|
+
<span class='label'>retries:</span> <span class='id identifier rubyid_retries'>retries</span><span class='comma'>,</span>
|
1465
|
+
<span class='label'>user_agent:</span> <span class='id identifier rubyid_user_agent'>user_agent</span><span class='comma'>,</span>
|
1466
|
+
<span class='label'>verify_ssl:</span> <span class='id identifier rubyid_verify_ssl'>verify_ssl</span><span class='comma'>,</span>
|
1467
|
+
<span class='label'>auth_mode:</span> <span class='id identifier rubyid_auth_mode'>auth_mode</span><span class='comma'>,</span>
|
1468
|
+
<span class='label'>default_headers:</span> <span class='id identifier rubyid_default_headers'>default_headers</span><span class='comma'>,</span>
|
1469
|
+
<span class='label'>debug:</span> <span class='id identifier rubyid_debug'>debug</span>
|
1470
|
+
<span class='rbrace'>}</span>
|
1471
|
+
<span class='kw'>end</span></pre>
|
1472
|
+
</td>
|
1473
|
+
</tr>
|
1474
|
+
</table>
|
1475
|
+
</div>
|
1476
|
+
|
1477
|
+
<div class="method_details ">
|
1478
|
+
<h3 class="signature " id="valid?-instance_method">
|
1479
|
+
|
1480
|
+
#<strong>valid?</strong> ⇒ <tt>Boolean</tt>
|
1481
|
+
|
1482
|
+
|
1483
|
+
|
1484
|
+
|
1485
|
+
|
1486
|
+
</h3><div class="docstring">
|
1487
|
+
<div class="discussion">
|
1488
|
+
|
1489
|
+
<p>Check if configuration is valid without raising an error</p>
|
1490
|
+
|
1491
|
+
|
1492
|
+
</div>
|
1493
|
+
</div>
|
1494
|
+
<div class="tags">
|
1495
|
+
|
1496
|
+
<p class="tag_title">Returns:</p>
|
1497
|
+
<ul class="return">
|
1498
|
+
|
1499
|
+
<li>
|
1500
|
+
|
1501
|
+
|
1502
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
—
|
1507
|
+
<div class='inline'>
|
1508
|
+
<p>true if configuration is valid</p>
|
1509
|
+
</div>
|
1510
|
+
|
1511
|
+
</li>
|
1512
|
+
|
1513
|
+
</ul>
|
1514
|
+
|
1515
|
+
</div><table class="source_code">
|
1516
|
+
<tr>
|
1517
|
+
<td>
|
1518
|
+
<pre class="lines">
|
1519
|
+
|
1520
|
+
|
1521
|
+
83
|
1522
|
+
84
|
1523
|
+
85
|
1524
|
+
86
|
1525
|
+
87
|
1526
|
+
88</pre>
|
1527
|
+
</td>
|
1528
|
+
<td>
|
1529
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 83</span>
|
1530
|
+
|
1531
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_valid?'>valid?</span>
|
1532
|
+
<span class='id identifier rubyid_validate!'>validate!</span>
|
1533
|
+
<span class='kw'>true</span>
|
1534
|
+
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="ConfigurationError.html" title="ResourceSpace::ConfigurationError (class)">ConfigurationError</a></span></span>
|
1535
|
+
<span class='kw'>false</span>
|
1536
|
+
<span class='kw'>end</span></pre>
|
1537
|
+
</td>
|
1538
|
+
</tr>
|
1539
|
+
</table>
|
1540
|
+
</div>
|
1541
|
+
|
1542
|
+
<div class="method_details ">
|
1543
|
+
<h3 class="signature " id="validate!-instance_method">
|
1544
|
+
|
1545
|
+
#<strong>validate!</strong> ⇒ <tt>Boolean</tt>
|
1546
|
+
|
1547
|
+
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
</h3><div class="docstring">
|
1552
|
+
<div class="discussion">
|
1553
|
+
|
1554
|
+
<p>Validate the configuration</p>
|
1555
|
+
|
1556
|
+
|
1557
|
+
</div>
|
1558
|
+
</div>
|
1559
|
+
<div class="tags">
|
1560
|
+
|
1561
|
+
<p class="tag_title">Returns:</p>
|
1562
|
+
<ul class="return">
|
1563
|
+
|
1564
|
+
<li>
|
1565
|
+
|
1566
|
+
|
1567
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1568
|
+
|
1569
|
+
|
1570
|
+
|
1571
|
+
—
|
1572
|
+
<div class='inline'>
|
1573
|
+
<p>true if configuration is valid</p>
|
1574
|
+
</div>
|
1575
|
+
|
1576
|
+
</li>
|
1577
|
+
|
1578
|
+
</ul>
|
1579
|
+
<p class="tag_title">Raises:</p>
|
1580
|
+
<ul class="raise">
|
1581
|
+
|
1582
|
+
<li>
|
1583
|
+
|
1584
|
+
|
1585
|
+
<span class='type'>(<tt><span class='object_link'><a href="ConfigurationError.html" title="ResourceSpace::ConfigurationError (class)">ConfigurationError</a></span></tt>)</span>
|
1586
|
+
|
1587
|
+
|
1588
|
+
|
1589
|
+
—
|
1590
|
+
<div class='inline'>
|
1591
|
+
<p>if configuration is invalid</p>
|
1592
|
+
</div>
|
1593
|
+
|
1594
|
+
</li>
|
1595
|
+
|
1596
|
+
</ul>
|
1597
|
+
|
1598
|
+
</div><table class="source_code">
|
1599
|
+
<tr>
|
1600
|
+
<td>
|
1601
|
+
<pre class="lines">
|
1602
|
+
|
1603
|
+
|
1604
|
+
64
|
1605
|
+
65
|
1606
|
+
66
|
1607
|
+
67
|
1608
|
+
68
|
1609
|
+
69
|
1610
|
+
70
|
1611
|
+
71
|
1612
|
+
72
|
1613
|
+
73
|
1614
|
+
74
|
1615
|
+
75
|
1616
|
+
76
|
1617
|
+
77
|
1618
|
+
78</pre>
|
1619
|
+
</td>
|
1620
|
+
<td>
|
1621
|
+
<pre class="code"><span class="info file"># File 'lib/resourcespace/configuration.rb', line 64</span>
|
1622
|
+
|
1623
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate!'>validate!</span>
|
1624
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1625
|
+
|
1626
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>URL is required</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1627
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>URL must end with /api/</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_url'>url</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/api/</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1628
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>User is required</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1629
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Private key is required</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_private_key'>private_key</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_private_key'>private_key</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1630
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Timeout must be positive</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_timeout'>timeout</span> <span class='op'>&&</span> <span class='id identifier rubyid_timeout'>timeout</span> <span class='op'><=</span> <span class='int'>0</span>
|
1631
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Retries must be non-negative</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_retries'>retries</span> <span class='op'>&&</span> <span class='id identifier rubyid_retries'>retries</span> <span class='op'><</span> <span class='int'>0</span>
|
1632
|
+
<span class='id identifier rubyid_errors'>errors</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Auth mode must be userkey, sessionkey, or native</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='qwords_beg'>%w[</span><span class='tstring_content'>userkey</span><span class='words_sep'> </span><span class='tstring_content'>sessionkey</span><span class='words_sep'> </span><span class='tstring_content'>native</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_auth_mode'>auth_mode</span><span class='rparen'>)</span>
|
1633
|
+
|
1634
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ConfigurationError.html" title="ResourceSpace::ConfigurationError (class)">ConfigurationError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Configuration errors: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>, </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1635
|
+
|
1636
|
+
<span class='kw'>true</span>
|
1637
|
+
<span class='kw'>end</span></pre>
|
1638
|
+
</td>
|
1639
|
+
</tr>
|
1640
|
+
</table>
|
1641
|
+
</div>
|
1642
|
+
|
1643
|
+
</div>
|
1644
|
+
|
1645
|
+
</div>
|
1646
|
+
|
1647
|
+
<div id="footer">
|
1648
|
+
Generated on Sat May 24 15:41:24 2025 by
|
1649
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1650
|
+
0.9.37 (ruby-3.4.4).
|
1651
|
+
</div>
|
1652
|
+
|
1653
|
+
</div>
|
1654
|
+
</body>
|
1655
|
+
</html>
|