crapi 0.1.3 → 1.0.1
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/.circleci/config.yml +64 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +53 -70
- data/.ruby-version +1 -1
- data/Gemfile.lock +138 -43
- data/README.md +29 -27
- data/crapi.gemspec +17 -17
- data/docs/{Crapi → CrAPI}/ArgumentError.html +21 -19
- data/docs/{Crapi → CrAPI}/BadHttpResponseError.html +21 -19
- data/docs/{Crapi → CrAPI}/Client.html +150 -222
- data/docs/{Crapi → CrAPI}/Error.html +19 -18
- data/docs/{Crapi → CrAPI}/Proxy.html +71 -114
- data/docs/CrAPI.html +157 -0
- data/docs/Net/HTTP.html +24 -29
- data/docs/_index.html +22 -20
- data/docs/class_list.html +10 -7
- data/docs/css/common.css +1 -1
- data/docs/css/full_list.css +201 -53
- data/docs/css/style.css +991 -401
- data/docs/file.README.html +51 -94
- data/docs/file_list.html +9 -6
- data/docs/frames.html +11 -6
- data/docs/index.html +51 -94
- data/docs/js/app.js +799 -246
- data/docs/js/full_list.js +332 -214
- data/docs/method_list.html +41 -38
- data/docs/top-level-namespace.html +11 -9
- data/lib/crapi/client.rb +224 -228
- data/lib/crapi/errors.rb +7 -7
- data/lib/crapi/proxy.rb +82 -82
- data/lib/crapi/version.rb +10 -10
- data/lib/crapi.rb +3 -1
- metadata +56 -55
- data/.travis.yml +0 -5
- data/docs/Crapi.html +0 -153
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>
|
|
7
|
-
Exception:
|
|
7
|
+
Exception: CrAPI::Error
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.44
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css">
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css">
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
18
|
-
pathId = "
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "CrAPI::Error";
|
|
19
19
|
relpath = '../';
|
|
20
20
|
</script>
|
|
21
21
|
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
|
30
|
+
<div id="main_progress" aria-hidden="true"></div>
|
|
31
|
+
|
|
30
32
|
<div class="nav_wrap">
|
|
31
33
|
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
32
34
|
<div id="resizer"></div>
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
<div id="menu">
|
|
38
40
|
|
|
39
41
|
<a href="../_index.html">Index (E)</a> »
|
|
40
|
-
<span class='title'><span class='object_link'><a href="../
|
|
42
|
+
<span class='title'><span class='object_link'><a href="../CrAPI.html" title="CrAPI (module)">CrAPI</a></span></span>
|
|
41
43
|
»
|
|
42
44
|
<span class="title">Error</span>
|
|
43
45
|
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
<div class="clear"></div>
|
|
60
62
|
</div>
|
|
61
63
|
|
|
62
|
-
<div id="content"><h1>Exception:
|
|
64
|
+
<div id="content"><h1>Exception: CrAPI::Error
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
|
|
77
79
|
<li class="next">StandardError</li>
|
|
78
80
|
|
|
79
|
-
<li class="next">
|
|
81
|
+
<li class="next">CrAPI::Error</li>
|
|
80
82
|
|
|
81
83
|
</ul>
|
|
82
84
|
<a href="#" class="inheritanceTree">show all</a>
|
|
@@ -96,16 +98,15 @@
|
|
|
96
98
|
|
|
97
99
|
<dl>
|
|
98
100
|
<dt>Defined in:</dt>
|
|
99
|
-
<dd>lib/crapi/errors.rb
|
|
101
|
+
<dd>lib/crapi/errors.rb
|
|
102
|
+
</dd>
|
|
100
103
|
</dl>
|
|
101
104
|
|
|
102
105
|
</div>
|
|
103
106
|
|
|
104
107
|
<h2>Overview</h2><div class="docstring">
|
|
105
108
|
<div class="discussion">
|
|
106
|
-
|
|
107
|
-
<p>The base Error class for all <span class='object_link'><a href="../Crapi.html" title="Crapi (module)">Crapi</a></span>-related issues.</p>
|
|
108
|
-
|
|
109
|
+
<p>The base Error class for all <span class='object_link'><a href="../CrAPI.html" title="CrAPI (module)">CrAPI</a></span>-related issues.</p>
|
|
109
110
|
|
|
110
111
|
</div>
|
|
111
112
|
</div>
|
|
@@ -114,7 +115,7 @@
|
|
|
114
115
|
|
|
115
116
|
</div><div id="subclasses">
|
|
116
117
|
<h2>Direct Known Subclasses</h2>
|
|
117
|
-
<p class="children"><span class='object_link'><a href="ArgumentError.html" title="
|
|
118
|
+
<p class="children"><span class='object_link'><a href="ArgumentError.html" title="CrAPI::ArgumentError (class)">ArgumentError</a></span>, <span class='object_link'><a href="BadHttpResponseError.html" title="CrAPI::BadHttpResponseError (class)">BadHttpResponseError</a></span></p>
|
|
118
119
|
</div>
|
|
119
120
|
|
|
120
121
|
|
|
@@ -129,11 +130,11 @@
|
|
|
129
130
|
</div>
|
|
130
131
|
|
|
131
132
|
<div id="footer">
|
|
132
|
-
Generated on
|
|
133
|
-
<a href="
|
|
134
|
-
0.9.
|
|
133
|
+
Generated on Sun Jul 5 14:46:38 2026 by
|
|
134
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
135
|
+
0.9.44 (ruby-3.4.8).
|
|
135
136
|
</div>
|
|
136
137
|
|
|
137
138
|
</div>
|
|
138
139
|
</body>
|
|
139
|
-
</html>
|
|
140
|
+
</html>
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>
|
|
7
|
-
Class:
|
|
7
|
+
Class: CrAPI::Proxy
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— Documentation by YARD 0.9.44
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css">
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css">
|
|
16
16
|
|
|
17
|
-
<script type="text/javascript"
|
|
18
|
-
pathId = "
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "CrAPI::Proxy";
|
|
19
19
|
relpath = '../';
|
|
20
20
|
</script>
|
|
21
21
|
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
|
30
|
+
<div id="main_progress" aria-hidden="true"></div>
|
|
31
|
+
|
|
30
32
|
<div class="nav_wrap">
|
|
31
33
|
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
32
34
|
<div id="resizer"></div>
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
<div id="menu">
|
|
38
40
|
|
|
39
41
|
<a href="../_index.html">Index (P)</a> »
|
|
40
|
-
<span class='title'><span class='object_link'><a href="../
|
|
42
|
+
<span class='title'><span class='object_link'><a href="../CrAPI.html" title="CrAPI (module)">CrAPI</a></span></span>
|
|
41
43
|
»
|
|
42
44
|
<span class="title">Proxy</span>
|
|
43
45
|
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
<div class="clear"></div>
|
|
60
62
|
</div>
|
|
61
63
|
|
|
62
|
-
<div id="content"><h1>Class:
|
|
64
|
+
<div id="content"><h1>Class: CrAPI::Proxy
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
|
|
@@ -74,7 +76,7 @@
|
|
|
74
76
|
<ul class="fullTree">
|
|
75
77
|
<li>Object</li>
|
|
76
78
|
|
|
77
|
-
<li class="next">
|
|
79
|
+
<li class="next">CrAPI::Proxy</li>
|
|
78
80
|
|
|
79
81
|
</ul>
|
|
80
82
|
<a href="#" class="inheritanceTree">show all</a>
|
|
@@ -94,25 +96,23 @@
|
|
|
94
96
|
|
|
95
97
|
<dl>
|
|
96
98
|
<dt>Defined in:</dt>
|
|
97
|
-
<dd>lib/crapi/proxy.rb
|
|
99
|
+
<dd>lib/crapi/proxy.rb
|
|
100
|
+
</dd>
|
|
98
101
|
</dl>
|
|
99
102
|
|
|
100
103
|
</div>
|
|
101
104
|
|
|
102
105
|
<h2>Overview</h2><div class="docstring">
|
|
103
106
|
<div class="discussion">
|
|
104
|
-
|
|
105
|
-
<
|
|
106
|
-
<span class='object_link'><a href="
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
path plus the proxy's segment) and more default headers, but without
|
|
114
|
-
the need for a separate connection to the target system.</p>
|
|
115
|
-
|
|
107
|
+
<p>Proxies simple CRUD methods (<span class='object_link'><a href="#delete-instance_method" title="CrAPI::Proxy#delete (method)">#delete</a></span> / <span class='object_link'><a href="#get-instance_method" title="CrAPI::Proxy#get (method)">#get</a></span> / <span class='object_link'><a href="#patch-instance_method" title="CrAPI::Proxy#patch (method)">#patch</a></span> / <span class='object_link'><a href="#post-instance_method" title="CrAPI::Proxy#post (method)">#post</a></span> / <span class='object_link'><a href="#put-instance_method" title="CrAPI::Proxy#put (method)">#put</a></span>) for a
|
|
108
|
+
<span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span> or another <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span>. Like
|
|
109
|
+
<span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span>, it also provides a proxy generator.</p>
|
|
110
|
+
<p>A <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span> has its own set of default headers and has a segment that is
|
|
111
|
+
prepended to its CRUD methods' <em>path</em> before being passed to the parent
|
|
112
|
+
<span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span>/<span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span>. This makes the proxxy functionally
|
|
113
|
+
equivalent to a new <span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span> with a new base path (the parent's base path
|
|
114
|
+
plus the proxy's segment) and more default headers, but without the need for a separate
|
|
115
|
+
connection to the target system.</p>
|
|
116
116
|
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
@@ -146,10 +146,7 @@ the need for a separate connection to the target system.</p>
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
<span class="summary_desc"><div class='inline'>
|
|
150
|
-
<p>A Hash containing headers to send with every request (unless overriden
|
|
151
|
-
elsewhere).</p>
|
|
152
|
-
</div></span>
|
|
149
|
+
<span class="summary_desc"><div class='inline'><p>A Hash containing headers to send with every request (unless overriden elsewhere).</p></div></span>
|
|
153
150
|
|
|
154
151
|
</li>
|
|
155
152
|
|
|
@@ -184,9 +181,7 @@ elsewhere).</p>
|
|
|
184
181
|
|
|
185
182
|
|
|
186
183
|
|
|
187
|
-
<span class="summary_desc"><div class='inline'>
|
|
188
|
-
<p>CRUD method: DELETE.</p>
|
|
189
|
-
</div></span>
|
|
184
|
+
<span class="summary_desc"><div class='inline'><p>CRUD method: DELETE.</p></div></span>
|
|
190
185
|
|
|
191
186
|
</li>
|
|
192
187
|
|
|
@@ -208,9 +203,7 @@ elsewhere).</p>
|
|
|
208
203
|
|
|
209
204
|
|
|
210
205
|
|
|
211
|
-
<span class="summary_desc"><div class='inline'>
|
|
212
|
-
<p>CRUD method: GET.</p>
|
|
213
|
-
</div></span>
|
|
206
|
+
<span class="summary_desc"><div class='inline'><p>CRUD method: GET.</p></div></span>
|
|
214
207
|
|
|
215
208
|
</li>
|
|
216
209
|
|
|
@@ -234,9 +227,7 @@ elsewhere).</p>
|
|
|
234
227
|
|
|
235
228
|
|
|
236
229
|
|
|
237
|
-
<span class="summary_desc"><div class='inline'>
|
|
238
|
-
<p>A new instance of Proxy.</p>
|
|
239
|
-
</div></span>
|
|
230
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of Proxy.</p></div></span>
|
|
240
231
|
|
|
241
232
|
</li>
|
|
242
233
|
|
|
@@ -244,7 +235,7 @@ elsewhere).</p>
|
|
|
244
235
|
<li class="public ">
|
|
245
236
|
<span class="summary_signature">
|
|
246
237
|
|
|
247
|
-
<a href="#new_proxy-instance_method" title="#new_proxy (instance method)">#<strong>new_proxy</strong>(segment = '/', headers: nil) ⇒
|
|
238
|
+
<a href="#new_proxy-instance_method" title="#new_proxy (instance method)">#<strong>new_proxy</strong>(segment = '/', headers: nil) ⇒ CrAPI::Proxy </a>
|
|
248
239
|
|
|
249
240
|
|
|
250
241
|
|
|
@@ -258,9 +249,7 @@ elsewhere).</p>
|
|
|
258
249
|
|
|
259
250
|
|
|
260
251
|
|
|
261
|
-
<span class="summary_desc"><div class='inline'>
|
|
262
|
-
<p>Returns a new <span class='object_link'><a href="" title="Crapi::Proxy (class)">Crapi::Proxy</a></span> for this proxy.</p>
|
|
263
|
-
</div></span>
|
|
252
|
+
<span class="summary_desc"><div class='inline'><p>Returns a new <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span> for this proxy.</p></div></span>
|
|
264
253
|
|
|
265
254
|
</li>
|
|
266
255
|
|
|
@@ -282,9 +271,7 @@ elsewhere).</p>
|
|
|
282
271
|
|
|
283
272
|
|
|
284
273
|
|
|
285
|
-
<span class="summary_desc"><div class='inline'>
|
|
286
|
-
<p>CRUD method: PATCH.</p>
|
|
287
|
-
</div></span>
|
|
274
|
+
<span class="summary_desc"><div class='inline'><p>CRUD method: PATCH.</p></div></span>
|
|
288
275
|
|
|
289
276
|
</li>
|
|
290
277
|
|
|
@@ -306,9 +293,7 @@ elsewhere).</p>
|
|
|
306
293
|
|
|
307
294
|
|
|
308
295
|
|
|
309
|
-
<span class="summary_desc"><div class='inline'>
|
|
310
|
-
<p>CRUD method: POST.</p>
|
|
311
|
-
</div></span>
|
|
296
|
+
<span class="summary_desc"><div class='inline'><p>CRUD method: POST.</p></div></span>
|
|
312
297
|
|
|
313
298
|
</li>
|
|
314
299
|
|
|
@@ -330,14 +315,13 @@ elsewhere).</p>
|
|
|
330
315
|
|
|
331
316
|
|
|
332
317
|
|
|
333
|
-
<span class="summary_desc"><div class='inline'>
|
|
334
|
-
<p>CRUD method: PUT.</p>
|
|
335
|
-
</div></span>
|
|
318
|
+
<span class="summary_desc"><div class='inline'><p>CRUD method: PUT.</p></div></span>
|
|
336
319
|
|
|
337
320
|
</li>
|
|
338
321
|
|
|
339
322
|
|
|
340
323
|
</ul>
|
|
324
|
+
|
|
341
325
|
|
|
342
326
|
|
|
343
327
|
<div id="constructor_details" class="method_details_list">
|
|
@@ -346,7 +330,7 @@ elsewhere).</p>
|
|
|
346
330
|
<div class="method_details first">
|
|
347
331
|
<h3 class="signature first" id="initialize-instance_method">
|
|
348
332
|
|
|
349
|
-
#<strong>initialize</strong>(add:, to:, headers: nil) ⇒ <tt><span class='object_link'><a href="" title="
|
|
333
|
+
#<strong>initialize</strong>(add:, to:, headers: nil) ⇒ <tt><span class='object_link'><a href="" title="CrAPI::Proxy (class)">Proxy</a></span></tt>
|
|
350
334
|
|
|
351
335
|
|
|
352
336
|
|
|
@@ -354,9 +338,7 @@ elsewhere).</p>
|
|
|
354
338
|
|
|
355
339
|
</h3><div class="docstring">
|
|
356
340
|
<div class="discussion">
|
|
357
|
-
|
|
358
|
-
<p>Returns a new instance of Proxy</p>
|
|
359
|
-
|
|
341
|
+
<p>Returns a new instance of Proxy.</p>
|
|
360
342
|
|
|
361
343
|
</div>
|
|
362
344
|
</div>
|
|
@@ -374,11 +356,8 @@ elsewhere).</p>
|
|
|
374
356
|
|
|
375
357
|
|
|
376
358
|
—
|
|
377
|
-
<div class='inline'>
|
|
378
|
-
|
|
379
|
-
used as the base path for the <span class='object_link'><a href="" title="Crapi::Proxy (class)">Crapi::Proxy</a></span>'s CRUD
|
|
380
|
-
methods.</p>
|
|
381
|
-
</div>
|
|
359
|
+
<div class='inline'><p>The new base path. This path (added to the parent's base path) will be used as the base
|
|
360
|
+
path for the <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span>'s CRUD methods.</p></div>
|
|
382
361
|
|
|
383
362
|
</li>
|
|
384
363
|
|
|
@@ -387,16 +366,13 @@ methods.</p>
|
|
|
387
366
|
<span class='name'>to</span>
|
|
388
367
|
|
|
389
368
|
|
|
390
|
-
<span class='type'>(<tt><span class='object_link'><a href="Client.html" title="
|
|
369
|
+
<span class='type'>(<tt><span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span></tt>, <tt><span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span></tt>)</span>
|
|
391
370
|
|
|
392
371
|
|
|
393
372
|
|
|
394
373
|
—
|
|
395
|
-
<div class='inline'>
|
|
396
|
-
|
|
397
|
-
that we'll be delegating CRUD calls to after proprocessing of headers
|
|
398
|
-
and paths.</p>
|
|
399
|
-
</div>
|
|
374
|
+
<div class='inline'><p>The parent <span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span> or <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span> that we'll be
|
|
375
|
+
delegating CRUD calls to after proprocessing of headers and paths.</p></div>
|
|
400
376
|
|
|
401
377
|
</li>
|
|
402
378
|
|
|
@@ -408,12 +384,11 @@ and paths.</p>
|
|
|
408
384
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
409
385
|
|
|
410
386
|
|
|
387
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
388
|
+
|
|
411
389
|
|
|
412
390
|
—
|
|
413
|
-
<div class='inline'>
|
|
414
|
-
<p>The default headers to send with every request (unless overriden
|
|
415
|
-
elsewhere).</p>
|
|
416
|
-
</div>
|
|
391
|
+
<div class='inline'><p>The default headers to send with every request (unless overriden elsewhere).</p></div>
|
|
417
392
|
|
|
418
393
|
</li>
|
|
419
394
|
|
|
@@ -463,14 +438,10 @@ elsewhere).</p>
|
|
|
463
438
|
|
|
464
439
|
</h3><div class="docstring">
|
|
465
440
|
<div class="discussion">
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
<
|
|
470
|
-
<span class='object_link'><a href="Client.html" title="Crapi::Client (class)">Crapi::Client</a></span>, headers set by the user via the CRUD
|
|
471
|
-
methods' <em>headers</em> still override any conflicting default
|
|
472
|
-
header.</p>
|
|
473
|
-
|
|
441
|
+
<p>A Hash containing headers to send with every request (unless overriden elsewhere). In case of
|
|
442
|
+
conflicts, headers set as default for a <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span> override those set by the
|
|
443
|
+
parent. As in a <span class='object_link'><a href="Client.html" title="CrAPI::Client (class)">CrAPI::Client</a></span>, headers set by the user via the CRUD methods'
|
|
444
|
+
<em>headers</em> still override any conflicting default header.</p>
|
|
474
445
|
|
|
475
446
|
</div>
|
|
476
447
|
</div>
|
|
@@ -480,7 +451,7 @@ header.</p>
|
|
|
480
451
|
<p class="tag_title">See Also:</p>
|
|
481
452
|
<ul class="see">
|
|
482
453
|
|
|
483
|
-
<li><span class='object_link'><a href="Client.html#default_headers-instance_method" title="
|
|
454
|
+
<li><span class='object_link'><a href="Client.html#default_headers-instance_method" title="CrAPI::Client#default_headers (method)">CrAPI::Client#default_headers</a></span></li>
|
|
484
455
|
|
|
485
456
|
</ul>
|
|
486
457
|
|
|
@@ -523,9 +494,7 @@ header.</p>
|
|
|
523
494
|
|
|
524
495
|
</h3><div class="docstring">
|
|
525
496
|
<div class="discussion">
|
|
526
|
-
|
|
527
|
-
<p>CRUD method: DELETE</p>
|
|
528
|
-
|
|
497
|
+
<p>CRUD method: DELETE</p>
|
|
529
498
|
|
|
530
499
|
</div>
|
|
531
500
|
</div>
|
|
@@ -548,7 +517,7 @@ header.</p>
|
|
|
548
517
|
<p class="tag_title">See Also:</p>
|
|
549
518
|
<ul class="see">
|
|
550
519
|
|
|
551
|
-
<li><span class='object_link'><a href="Client.html#delete-instance_method" title="
|
|
520
|
+
<li><span class='object_link'><a href="Client.html#delete-instance_method" title="CrAPI::Client#delete (method)">CrAPI::Client#delete</a></span></li>
|
|
552
521
|
|
|
553
522
|
</ul>
|
|
554
523
|
|
|
@@ -586,9 +555,7 @@ header.</p>
|
|
|
586
555
|
|
|
587
556
|
</h3><div class="docstring">
|
|
588
557
|
<div class="discussion">
|
|
589
|
-
|
|
590
|
-
<p>CRUD method: GET</p>
|
|
591
|
-
|
|
558
|
+
<p>CRUD method: GET</p>
|
|
592
559
|
|
|
593
560
|
</div>
|
|
594
561
|
</div>
|
|
@@ -611,7 +578,7 @@ header.</p>
|
|
|
611
578
|
<p class="tag_title">See Also:</p>
|
|
612
579
|
<ul class="see">
|
|
613
580
|
|
|
614
|
-
<li><span class='object_link'><a href="Client.html#get-instance_method" title="
|
|
581
|
+
<li><span class='object_link'><a href="Client.html#get-instance_method" title="CrAPI::Client#get (method)">CrAPI::Client#get</a></span></li>
|
|
615
582
|
|
|
616
583
|
</ul>
|
|
617
584
|
|
|
@@ -641,7 +608,7 @@ header.</p>
|
|
|
641
608
|
<div class="method_details ">
|
|
642
609
|
<h3 class="signature " id="new_proxy-instance_method">
|
|
643
610
|
|
|
644
|
-
#<strong>new_proxy</strong>(segment = '/', headers: nil) ⇒ <tt><span class='object_link'><a href="" title="
|
|
611
|
+
#<strong>new_proxy</strong>(segment = '/', headers: nil) ⇒ <tt><span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span></tt>
|
|
645
612
|
|
|
646
613
|
|
|
647
614
|
|
|
@@ -649,9 +616,7 @@ header.</p>
|
|
|
649
616
|
|
|
650
617
|
</h3><div class="docstring">
|
|
651
618
|
<div class="discussion">
|
|
652
|
-
|
|
653
|
-
<p>Returns a new <span class='object_link'><a href="" title="Crapi::Proxy (class)">Crapi::Proxy</a></span> for this proxy.</p>
|
|
654
|
-
|
|
619
|
+
<p>Returns a new <span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span> for this proxy.</p>
|
|
655
620
|
|
|
656
621
|
</div>
|
|
657
622
|
</div>
|
|
@@ -671,9 +636,7 @@ header.</p>
|
|
|
671
636
|
|
|
672
637
|
|
|
673
638
|
—
|
|
674
|
-
<div class='inline'>
|
|
675
|
-
<p>The segment to add to this proxy's path.</p>
|
|
676
|
-
</div>
|
|
639
|
+
<div class='inline'><p>The segment to add to this proxy's path.</p></div>
|
|
677
640
|
|
|
678
641
|
</li>
|
|
679
642
|
|
|
@@ -685,11 +648,11 @@ header.</p>
|
|
|
685
648
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
686
649
|
|
|
687
650
|
|
|
651
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
652
|
+
|
|
688
653
|
|
|
689
654
|
—
|
|
690
|
-
<div class='inline'>
|
|
691
|
-
<p>The default headers for the new proxy.</p>
|
|
692
|
-
</div>
|
|
655
|
+
<div class='inline'><p>The default headers for the new proxy.</p></div>
|
|
693
656
|
|
|
694
657
|
</li>
|
|
695
658
|
|
|
@@ -701,7 +664,7 @@ header.</p>
|
|
|
701
664
|
<li>
|
|
702
665
|
|
|
703
666
|
|
|
704
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="
|
|
667
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="CrAPI::Proxy (class)">CrAPI::Proxy</a></span></tt>)</span>
|
|
705
668
|
|
|
706
669
|
|
|
707
670
|
|
|
@@ -712,7 +675,7 @@ header.</p>
|
|
|
712
675
|
<p class="tag_title">See Also:</p>
|
|
713
676
|
<ul class="see">
|
|
714
677
|
|
|
715
|
-
<li><span class='object_link'><a href="Client.html#new_proxy-instance_method" title="
|
|
678
|
+
<li><span class='object_link'><a href="Client.html#new_proxy-instance_method" title="CrAPI::Client#new_proxy (method)">CrAPI::Client#new_proxy</a></span></li>
|
|
716
679
|
|
|
717
680
|
</ul>
|
|
718
681
|
|
|
@@ -730,7 +693,7 @@ header.</p>
|
|
|
730
693
|
<pre class="code"><span class="info file"># File 'lib/crapi/proxy.rb', line 57</span>
|
|
731
694
|
|
|
732
695
|
<span class='kw'>def</span> <span class='id identifier rubyid_new_proxy'>new_proxy</span><span class='lparen'>(</span><span class='id identifier rubyid_segment'>segment</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>headers:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
733
|
-
<span class='const'><span class='object_link'><a href="" title="
|
|
696
|
+
<span class='const'><span class='object_link'><a href="" title="CrAPI::Proxy (class)">Proxy</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="CrAPI::Proxy#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>add:</span> <span class='id identifier rubyid_segment'>segment</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>headers:</span> <span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
|
|
734
697
|
<span class='kw'>end</span></pre>
|
|
735
698
|
</td>
|
|
736
699
|
</tr>
|
|
@@ -748,9 +711,7 @@ header.</p>
|
|
|
748
711
|
|
|
749
712
|
</h3><div class="docstring">
|
|
750
713
|
<div class="discussion">
|
|
751
|
-
|
|
752
|
-
<p>CRUD method: PATCH</p>
|
|
753
|
-
|
|
714
|
+
<p>CRUD method: PATCH</p>
|
|
754
715
|
|
|
755
716
|
</div>
|
|
756
717
|
</div>
|
|
@@ -773,7 +734,7 @@ header.</p>
|
|
|
773
734
|
<p class="tag_title">See Also:</p>
|
|
774
735
|
<ul class="see">
|
|
775
736
|
|
|
776
|
-
<li><span class='object_link'><a href="Client.html#patch-instance_method" title="
|
|
737
|
+
<li><span class='object_link'><a href="Client.html#patch-instance_method" title="CrAPI::Client#patch (method)">CrAPI::Client#patch</a></span></li>
|
|
777
738
|
|
|
778
739
|
</ul>
|
|
779
740
|
|
|
@@ -793,7 +754,7 @@ header.</p>
|
|
|
793
754
|
|
|
794
755
|
<span class='kw'>def</span> <span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>headers:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>query:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>payload:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
795
756
|
<span class='ivar'>@parent</span><span class='period'>.</span><span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@segment</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>%r{</span><span class='tstring_content'>/+</span><span class='regexp_end'>}</span></span><span class='comma'>,</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='comma'>,</span>
|
|
796
|
-
<span class='label'>
|
|
757
|
+
<span class='label'>headers:</span> <span class='ivar'>@default_headers</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>query:</span> <span class='id identifier rubyid_query'>query</span><span class='comma'>,</span> <span class='label'>payload:</span> <span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
|
|
797
758
|
<span class='kw'>end</span></pre>
|
|
798
759
|
</td>
|
|
799
760
|
</tr>
|
|
@@ -811,9 +772,7 @@ header.</p>
|
|
|
811
772
|
|
|
812
773
|
</h3><div class="docstring">
|
|
813
774
|
<div class="discussion">
|
|
814
|
-
|
|
815
|
-
<p>CRUD method: POST</p>
|
|
816
|
-
|
|
775
|
+
<p>CRUD method: POST</p>
|
|
817
776
|
|
|
818
777
|
</div>
|
|
819
778
|
</div>
|
|
@@ -836,7 +795,7 @@ header.</p>
|
|
|
836
795
|
<p class="tag_title">See Also:</p>
|
|
837
796
|
<ul class="see">
|
|
838
797
|
|
|
839
|
-
<li><span class='object_link'><a href="Client.html#post-instance_method" title="
|
|
798
|
+
<li><span class='object_link'><a href="Client.html#post-instance_method" title="CrAPI::Client#post (method)">CrAPI::Client#post</a></span></li>
|
|
840
799
|
|
|
841
800
|
</ul>
|
|
842
801
|
|
|
@@ -874,9 +833,7 @@ header.</p>
|
|
|
874
833
|
|
|
875
834
|
</h3><div class="docstring">
|
|
876
835
|
<div class="discussion">
|
|
877
|
-
|
|
878
|
-
<p>CRUD method: PUT</p>
|
|
879
|
-
|
|
836
|
+
<p>CRUD method: PUT</p>
|
|
880
837
|
|
|
881
838
|
</div>
|
|
882
839
|
</div>
|
|
@@ -899,7 +856,7 @@ header.</p>
|
|
|
899
856
|
<p class="tag_title">See Also:</p>
|
|
900
857
|
<ul class="see">
|
|
901
858
|
|
|
902
|
-
<li><span class='object_link'><a href="Client.html#put-instance_method" title="
|
|
859
|
+
<li><span class='object_link'><a href="Client.html#put-instance_method" title="CrAPI::Client#put (method)">CrAPI::Client#put</a></span></li>
|
|
903
860
|
|
|
904
861
|
</ul>
|
|
905
862
|
|
|
@@ -931,11 +888,11 @@ header.</p>
|
|
|
931
888
|
</div>
|
|
932
889
|
|
|
933
890
|
<div id="footer">
|
|
934
|
-
Generated on
|
|
935
|
-
<a href="
|
|
936
|
-
0.9.
|
|
891
|
+
Generated on Sun Jul 5 14:46:38 2026 by
|
|
892
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
893
|
+
0.9.44 (ruby-3.4.8).
|
|
937
894
|
</div>
|
|
938
895
|
|
|
939
896
|
</div>
|
|
940
897
|
</body>
|
|
941
|
-
</html>
|
|
898
|
+
</html>
|