stack_path 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +9 -0
- data/.travis.yml +6 -0
- data/.yardopts +7 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/README.md +54 -0
- data/Rakefile +15 -0
- data/bin/console +7 -0
- data/bin/setup +6 -0
- data/docs/StackPath/APIError.html +135 -0
- data/docs/StackPath/Client.html +672 -0
- data/docs/StackPath.html +231 -0
- data/docs/_index.html +140 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.LICENSE.html +93 -0
- data/docs/file.README.html +137 -0
- data/docs/file_list.html +61 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +137 -0
- data/docs/js/app.js +248 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +115 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/stack_path/client.rb +67 -0
- data/lib/stack_path/version.rb +4 -0
- data/lib/stack_path.rb +14 -0
- data/stack_path.gemspec +33 -0
- metadata +188 -0
@@ -0,0 +1,672 @@
|
|
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: StackPath::Client
|
8
|
+
|
9
|
+
— Humidifier
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "StackPath::Client";
|
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="../StackPath.html" title="StackPath (module)">StackPath</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Client</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: StackPath::Client
|
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">StackPath::Client</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/stack_path/client.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>An API client that allows querying StackPath</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
<h2>Constant Summary</h2>
|
115
|
+
<dl class="constants">
|
116
|
+
|
117
|
+
<dt id="HEADERS-constant" class="">HEADERS =
|
118
|
+
<div class="docstring">
|
119
|
+
<div class="discussion">
|
120
|
+
|
121
|
+
<p>The constant headers that are sent with each request</p>
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
<div class="tags">
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
</dt>
|
131
|
+
<dd><pre class="code"><span class='lbrace'>{</span>
|
132
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>User-Agent</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Ruby StackPath CDN API Client</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
133
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>application/json</span><span class='tstring_end'>'</span></span>
|
134
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
135
|
+
|
136
|
+
</dl>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
142
|
+
<ul class="summary">
|
143
|
+
|
144
|
+
<li class="public ">
|
145
|
+
<span class="summary_signature">
|
146
|
+
|
147
|
+
<a href="#base_url-instance_method" title="#base_url (instance method)">#<strong>base_url</strong> ⇒ Object </a>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
</span>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="note title readonly">readonly</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<span class="summary_desc"><div class='inline'>
|
167
|
+
<p>Returns the value of attribute base_url.</p>
|
168
|
+
</div></span>
|
169
|
+
|
170
|
+
</li>
|
171
|
+
|
172
|
+
|
173
|
+
<li class="public ">
|
174
|
+
<span class="summary_signature">
|
175
|
+
|
176
|
+
<a href="#oauth_client-instance_method" title="#oauth_client (instance method)">#<strong>oauth_client</strong> ⇒ Object </a>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<span class="note title readonly">readonly</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<span class="summary_desc"><div class='inline'>
|
196
|
+
<p>Returns the value of attribute oauth_client.</p>
|
197
|
+
</div></span>
|
198
|
+
|
199
|
+
</li>
|
200
|
+
|
201
|
+
|
202
|
+
</ul>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<h2>
|
209
|
+
Instance Method Summary
|
210
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
211
|
+
</h2>
|
212
|
+
|
213
|
+
<ul class="summary">
|
214
|
+
|
215
|
+
<li class="public ">
|
216
|
+
<span class="summary_signature">
|
217
|
+
|
218
|
+
<a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(path, params = {}) ⇒ Object </a>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</span>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<span class="summary_desc"><div class='inline'>
|
233
|
+
<p>Send a DELETE request to the StackPath API.</p>
|
234
|
+
</div></span>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="public ">
|
240
|
+
<span class="summary_signature">
|
241
|
+
|
242
|
+
<a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(path, params = {}) ⇒ Object </a>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
</span>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<span class="summary_desc"><div class='inline'>
|
257
|
+
<p>Send a GET request to the StackPath API.</p>
|
258
|
+
</div></span>
|
259
|
+
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li class="public ">
|
264
|
+
<span class="summary_signature">
|
265
|
+
|
266
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ Client </a>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</span>
|
271
|
+
|
272
|
+
|
273
|
+
<span class="note title constructor">constructor</span>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<span class="summary_desc"><div class='inline'>
|
283
|
+
<p>A new instance of Client.</p>
|
284
|
+
</div></span>
|
285
|
+
|
286
|
+
</li>
|
287
|
+
|
288
|
+
|
289
|
+
<li class="public ">
|
290
|
+
<span class="summary_signature">
|
291
|
+
|
292
|
+
<a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong>(path, params = {}) ⇒ Object </a>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
<span class="summary_desc"><div class='inline'>
|
307
|
+
<p>Send a POST request to the StackPath API.</p>
|
308
|
+
</div></span>
|
309
|
+
|
310
|
+
</li>
|
311
|
+
|
312
|
+
|
313
|
+
<li class="public ">
|
314
|
+
<span class="summary_signature">
|
315
|
+
|
316
|
+
<a href="#put-instance_method" title="#put (instance method)">#<strong>put</strong>(path, params = {}) ⇒ Object </a>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
</span>
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
<span class="summary_desc"><div class='inline'>
|
331
|
+
<p>Send a PUT request to the StackPath API.</p>
|
332
|
+
</div></span>
|
333
|
+
|
334
|
+
</li>
|
335
|
+
|
336
|
+
|
337
|
+
</ul>
|
338
|
+
|
339
|
+
|
340
|
+
<div id="constructor_details" class="method_details_list">
|
341
|
+
<h2>Constructor Details</h2>
|
342
|
+
|
343
|
+
<div class="method_details first">
|
344
|
+
<h3 class="signature first" id="initialize-instance_method">
|
345
|
+
|
346
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="StackPath::Client (class)">Client</a></span></tt>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
</h3><div class="docstring">
|
353
|
+
<div class="discussion">
|
354
|
+
|
355
|
+
<p>Returns a new instance of Client</p>
|
356
|
+
|
357
|
+
|
358
|
+
</div>
|
359
|
+
</div>
|
360
|
+
<div class="tags">
|
361
|
+
|
362
|
+
|
363
|
+
</div><table class="source_code">
|
364
|
+
<tr>
|
365
|
+
<td>
|
366
|
+
<pre class="lines">
|
367
|
+
|
368
|
+
|
369
|
+
15
|
370
|
+
16
|
371
|
+
17
|
372
|
+
18
|
373
|
+
19
|
374
|
+
20
|
375
|
+
21
|
376
|
+
22
|
377
|
+
23</pre>
|
378
|
+
</td>
|
379
|
+
<td>
|
380
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 15</span>
|
381
|
+
|
382
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
383
|
+
<span class='ivar'>@base_url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https://api.stackpath.com/v1/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:company_alias</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
384
|
+
<span class='ivar'>@oauth_client</span> <span class='op'>=</span>
|
385
|
+
<span class='const'>Signet</span><span class='op'>::</span><span class='const'>OAuth1</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
386
|
+
<span class='label'>client_credential_key:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:client_key</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
387
|
+
<span class='label'>client_credential_secret:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:client_secret</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
388
|
+
<span class='label'>two_legged:</span> <span class='kw'>true</span>
|
389
|
+
<span class='rparen'>)</span>
|
390
|
+
<span class='kw'>end</span></pre>
|
391
|
+
</td>
|
392
|
+
</tr>
|
393
|
+
</table>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
</div>
|
397
|
+
|
398
|
+
<div id="instance_attr_details" class="attr_details">
|
399
|
+
<h2>Instance Attribute Details</h2>
|
400
|
+
|
401
|
+
|
402
|
+
<span id=""></span>
|
403
|
+
<div class="method_details first">
|
404
|
+
<h3 class="signature first" id="base_url-instance_method">
|
405
|
+
|
406
|
+
#<strong>base_url</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
</h3><div class="docstring">
|
413
|
+
<div class="discussion">
|
414
|
+
|
415
|
+
<p>Returns the value of attribute base_url</p>
|
416
|
+
|
417
|
+
|
418
|
+
</div>
|
419
|
+
</div>
|
420
|
+
<div class="tags">
|
421
|
+
|
422
|
+
|
423
|
+
</div><table class="source_code">
|
424
|
+
<tr>
|
425
|
+
<td>
|
426
|
+
<pre class="lines">
|
427
|
+
|
428
|
+
|
429
|
+
13
|
430
|
+
14
|
431
|
+
15</pre>
|
432
|
+
</td>
|
433
|
+
<td>
|
434
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 13</span>
|
435
|
+
|
436
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_base_url'>base_url</span>
|
437
|
+
<span class='ivar'>@base_url</span>
|
438
|
+
<span class='kw'>end</span></pre>
|
439
|
+
</td>
|
440
|
+
</tr>
|
441
|
+
</table>
|
442
|
+
</div>
|
443
|
+
|
444
|
+
|
445
|
+
<span id=""></span>
|
446
|
+
<div class="method_details ">
|
447
|
+
<h3 class="signature " id="oauth_client-instance_method">
|
448
|
+
|
449
|
+
#<strong>oauth_client</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
</h3><div class="docstring">
|
456
|
+
<div class="discussion">
|
457
|
+
|
458
|
+
<p>Returns the value of attribute oauth_client</p>
|
459
|
+
|
460
|
+
|
461
|
+
</div>
|
462
|
+
</div>
|
463
|
+
<div class="tags">
|
464
|
+
|
465
|
+
|
466
|
+
</div><table class="source_code">
|
467
|
+
<tr>
|
468
|
+
<td>
|
469
|
+
<pre class="lines">
|
470
|
+
|
471
|
+
|
472
|
+
13
|
473
|
+
14
|
474
|
+
15</pre>
|
475
|
+
</td>
|
476
|
+
<td>
|
477
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 13</span>
|
478
|
+
|
479
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_oauth_client'>oauth_client</span>
|
480
|
+
<span class='ivar'>@oauth_client</span>
|
481
|
+
<span class='kw'>end</span></pre>
|
482
|
+
</td>
|
483
|
+
</tr>
|
484
|
+
</table>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
</div>
|
488
|
+
|
489
|
+
|
490
|
+
<div id="instance_method_details" class="method_details_list">
|
491
|
+
<h2>Instance Method Details</h2>
|
492
|
+
|
493
|
+
|
494
|
+
<div class="method_details first">
|
495
|
+
<h3 class="signature first" id="delete-instance_method">
|
496
|
+
|
497
|
+
#<strong>delete</strong>(path, params = {}) ⇒ <tt>Object</tt>
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
</h3><div class="docstring">
|
504
|
+
<div class="discussion">
|
505
|
+
|
506
|
+
<p>Send a DELETE request to the StackPath API</p>
|
507
|
+
|
508
|
+
|
509
|
+
</div>
|
510
|
+
</div>
|
511
|
+
<div class="tags">
|
512
|
+
|
513
|
+
|
514
|
+
</div><table class="source_code">
|
515
|
+
<tr>
|
516
|
+
<td>
|
517
|
+
<pre class="lines">
|
518
|
+
|
519
|
+
|
520
|
+
42
|
521
|
+
43
|
522
|
+
44</pre>
|
523
|
+
</td>
|
524
|
+
<td>
|
525
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 42</span>
|
526
|
+
|
527
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
528
|
+
<span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
529
|
+
<span class='kw'>end</span></pre>
|
530
|
+
</td>
|
531
|
+
</tr>
|
532
|
+
</table>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
<div class="method_details ">
|
536
|
+
<h3 class="signature " id="get-instance_method">
|
537
|
+
|
538
|
+
#<strong>get</strong>(path, params = {}) ⇒ <tt>Object</tt>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
</h3><div class="docstring">
|
545
|
+
<div class="discussion">
|
546
|
+
|
547
|
+
<p>Send a GET request to the StackPath API</p>
|
548
|
+
|
549
|
+
|
550
|
+
</div>
|
551
|
+
</div>
|
552
|
+
<div class="tags">
|
553
|
+
|
554
|
+
|
555
|
+
</div><table class="source_code">
|
556
|
+
<tr>
|
557
|
+
<td>
|
558
|
+
<pre class="lines">
|
559
|
+
|
560
|
+
|
561
|
+
26
|
562
|
+
27
|
563
|
+
28
|
564
|
+
29</pre>
|
565
|
+
</td>
|
566
|
+
<td>
|
567
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 26</span>
|
568
|
+
|
569
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
570
|
+
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>?</span><span class='embexpr_beg'>#{</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode_www_form'>encode_www_form</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
571
|
+
<span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
572
|
+
<span class='kw'>end</span></pre>
|
573
|
+
</td>
|
574
|
+
</tr>
|
575
|
+
</table>
|
576
|
+
</div>
|
577
|
+
|
578
|
+
<div class="method_details ">
|
579
|
+
<h3 class="signature " id="post-instance_method">
|
580
|
+
|
581
|
+
#<strong>post</strong>(path, params = {}) ⇒ <tt>Object</tt>
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
</h3><div class="docstring">
|
588
|
+
<div class="discussion">
|
589
|
+
|
590
|
+
<p>Send a POST request to the StackPath API</p>
|
591
|
+
|
592
|
+
|
593
|
+
</div>
|
594
|
+
</div>
|
595
|
+
<div class="tags">
|
596
|
+
|
597
|
+
|
598
|
+
</div><table class="source_code">
|
599
|
+
<tr>
|
600
|
+
<td>
|
601
|
+
<pre class="lines">
|
602
|
+
|
603
|
+
|
604
|
+
32
|
605
|
+
33
|
606
|
+
34</pre>
|
607
|
+
</td>
|
608
|
+
<td>
|
609
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 32</span>
|
610
|
+
|
611
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
612
|
+
<span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
613
|
+
<span class='kw'>end</span></pre>
|
614
|
+
</td>
|
615
|
+
</tr>
|
616
|
+
</table>
|
617
|
+
</div>
|
618
|
+
|
619
|
+
<div class="method_details ">
|
620
|
+
<h3 class="signature " id="put-instance_method">
|
621
|
+
|
622
|
+
#<strong>put</strong>(path, params = {}) ⇒ <tt>Object</tt>
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
</h3><div class="docstring">
|
629
|
+
<div class="discussion">
|
630
|
+
|
631
|
+
<p>Send a PUT request to the StackPath API</p>
|
632
|
+
|
633
|
+
|
634
|
+
</div>
|
635
|
+
</div>
|
636
|
+
<div class="tags">
|
637
|
+
|
638
|
+
|
639
|
+
</div><table class="source_code">
|
640
|
+
<tr>
|
641
|
+
<td>
|
642
|
+
<pre class="lines">
|
643
|
+
|
644
|
+
|
645
|
+
37
|
646
|
+
38
|
647
|
+
39</pre>
|
648
|
+
</td>
|
649
|
+
<td>
|
650
|
+
<pre class="code"><span class="info file"># File 'lib/stack_path/client.rb', line 37</span>
|
651
|
+
|
652
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
653
|
+
<span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
654
|
+
<span class='kw'>end</span></pre>
|
655
|
+
</td>
|
656
|
+
</tr>
|
657
|
+
</table>
|
658
|
+
</div>
|
659
|
+
|
660
|
+
</div>
|
661
|
+
|
662
|
+
</div>
|
663
|
+
|
664
|
+
<div id="footer">
|
665
|
+
Generated on Wed Aug 23 13:10:22 2017 by
|
666
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
667
|
+
0.9.9 (ruby-2.4.1).
|
668
|
+
</div>
|
669
|
+
|
670
|
+
</div>
|
671
|
+
</body>
|
672
|
+
</html>
|