automate_soup 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +128 -0
- data/Rakefile +10 -0
- data/automate_soup.gemspec +31 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/AutomateSoup.html +2566 -0
- data/docs/AutomateSoup/API.html +1174 -0
- data/docs/AutomateSoup/Change.html +892 -0
- data/docs/AutomateSoup/Credentials.html +452 -0
- data/docs/AutomateSoup/Rest.html +321 -0
- data/docs/AutomateSoup/Stage.html +428 -0
- data/docs/AutomateSoup/Topic.html +530 -0
- data/docs/_index.html +166 -0
- data/docs/class_list.html +51 -0
- data/docs/coverage/.last_run.json +5 -0
- data/docs/coverage/.resultset.json +145 -0
- data/docs/coverage/.resultset.json.lock +0 -0
- data/docs/coverage/assets/0.10.2/application.css +799 -0
- data/docs/coverage/assets/0.10.2/application.js +1707 -0
- data/docs/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/docs/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/docs/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/docs/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/docs/coverage/assets/0.10.2/favicon_green.png +0 -0
- data/docs/coverage/assets/0.10.2/favicon_red.png +0 -0
- data/docs/coverage/assets/0.10.2/favicon_yellow.png +0 -0
- data/docs/coverage/assets/0.10.2/loading.gif +0 -0
- data/docs/coverage/assets/0.10.2/magnify.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/docs/coverage/index.html +968 -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.README.html +211 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +211 -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 +395 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/automate_soup.rb +264 -0
- data/lib/automate_soup/api.rb +112 -0
- data/lib/automate_soup/change.rb +105 -0
- data/lib/automate_soup/credentials.rb +16 -0
- data/lib/automate_soup/rest.rb +40 -0
- data/lib/automate_soup/stage.rb +25 -0
- data/lib/automate_soup/version.rb +3 -0
- metadata +195 -0
@@ -0,0 +1,1174 @@
|
|
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: AutomateSoup::API
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
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 = "AutomateSoup::API";
|
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 (A)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">API</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: AutomateSoup::API
|
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">AutomateSoup::API</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/automate_soup/api.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>API class to interact with chef automate</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(soup) ⇒ API </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
<span class="note title constructor">constructor</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>A new instance of API.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#orgs-instance_method" title="#orgs (instance method)">#<strong>orgs</strong>(enterprise = 'default') ⇒ Object </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>Get the organizations given the enterprise.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="public ">
|
179
|
+
<span class="summary_signature">
|
180
|
+
|
181
|
+
<a href="#pipeline-instance_method" title="#pipeline (instance method)">#<strong>pipeline</strong>(enterprise: 'default', organization: nil, project: nil, pipeline: nil) ⇒ Object </a>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<span class="summary_desc"><div class='inline'>
|
196
|
+
<p>Fetch a projects pipeline under an enterprise, organization pair.</p>
|
197
|
+
</div></span>
|
198
|
+
|
199
|
+
</li>
|
200
|
+
|
201
|
+
|
202
|
+
<li class="public ">
|
203
|
+
<span class="summary_signature">
|
204
|
+
|
205
|
+
<a href="#pipelines-instance_method" title="#pipelines (instance method)">#<strong>pipelines</strong>(enterprise: 'default', organization: nil, project: nil) ⇒ Object </a>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</span>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="summary_desc"><div class='inline'>
|
220
|
+
<p>Fetch all project pipelines under an enterprise, organization pair.</p>
|
221
|
+
</div></span>
|
222
|
+
|
223
|
+
</li>
|
224
|
+
|
225
|
+
|
226
|
+
<li class="public ">
|
227
|
+
<span class="summary_signature">
|
228
|
+
|
229
|
+
<a href="#project-instance_method" title="#project (instance method)">#<strong>project</strong>(enterprise: 'default', organization: nil, project: nil) ⇒ Object </a>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</span>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'>
|
244
|
+
<p>Fetch a project under an enterprise, organization pair.</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
<li class="public ">
|
251
|
+
<span class="summary_signature">
|
252
|
+
|
253
|
+
<a href="#projects-instance_method" title="#projects (instance method)">#<strong>projects</strong>(enterprise: 'default', organization: nil) ⇒ Object </a>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</span>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'>
|
268
|
+
<p>Get the projects under and organization given the enterprise.</p>
|
269
|
+
</div></span>
|
270
|
+
|
271
|
+
</li>
|
272
|
+
|
273
|
+
|
274
|
+
<li class="public ">
|
275
|
+
<span class="summary_signature">
|
276
|
+
|
277
|
+
<a href="#status-instance_method" title="#status (instance method)">#<strong>status</strong> ⇒ Object </a>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</span>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<span class="summary_desc"><div class='inline'>
|
292
|
+
<p>Get the status of the Automate API.</p>
|
293
|
+
</div></span>
|
294
|
+
|
295
|
+
</li>
|
296
|
+
|
297
|
+
|
298
|
+
</ul>
|
299
|
+
|
300
|
+
|
301
|
+
<div id="constructor_details" class="method_details_list">
|
302
|
+
<h2>Constructor Details</h2>
|
303
|
+
|
304
|
+
<div class="method_details first">
|
305
|
+
<h3 class="signature first" id="initialize-instance_method">
|
306
|
+
|
307
|
+
#<strong>initialize</strong>(soup) ⇒ <tt><span class='object_link'><a href="" title="AutomateSoup::API (class)">API</a></span></tt>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</h3><div class="docstring">
|
314
|
+
<div class="discussion">
|
315
|
+
|
316
|
+
<p>Returns a new instance of API</p>
|
317
|
+
|
318
|
+
|
319
|
+
</div>
|
320
|
+
</div>
|
321
|
+
<div class="tags">
|
322
|
+
|
323
|
+
|
324
|
+
</div><table class="source_code">
|
325
|
+
<tr>
|
326
|
+
<td>
|
327
|
+
<pre class="lines">
|
328
|
+
|
329
|
+
|
330
|
+
5
|
331
|
+
6
|
332
|
+
7</pre>
|
333
|
+
</td>
|
334
|
+
<td>
|
335
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 5</span>
|
336
|
+
|
337
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_soup'>soup</span><span class='rparen'>)</span>
|
338
|
+
<span class='ivar'>@soup</span> <span class='op'>=</span> <span class='id identifier rubyid_soup'>soup</span>
|
339
|
+
<span class='kw'>end</span></pre>
|
340
|
+
</td>
|
341
|
+
</tr>
|
342
|
+
</table>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
</div>
|
346
|
+
|
347
|
+
|
348
|
+
<div id="instance_method_details" class="method_details_list">
|
349
|
+
<h2>Instance Method Details</h2>
|
350
|
+
|
351
|
+
|
352
|
+
<div class="method_details first">
|
353
|
+
<h3 class="signature first" id="orgs-instance_method">
|
354
|
+
|
355
|
+
#<strong>orgs</strong>(enterprise = 'default') ⇒ <tt>Object</tt>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</h3><div class="docstring">
|
362
|
+
<div class="discussion">
|
363
|
+
|
364
|
+
<p>Get the organizations given the enterprise.</p>
|
365
|
+
|
366
|
+
<p>default.</p>
|
367
|
+
|
368
|
+
|
369
|
+
</div>
|
370
|
+
</div>
|
371
|
+
<div class="tags">
|
372
|
+
<p class="tag_title">Parameters:</p>
|
373
|
+
<ul class="param">
|
374
|
+
|
375
|
+
<li>
|
376
|
+
|
377
|
+
<span class='name'>enterprise</span>
|
378
|
+
|
379
|
+
|
380
|
+
<span class='type'>(<tt>String</tt>)</span>
|
381
|
+
|
382
|
+
|
383
|
+
<em class="default">(defaults to: <tt>'default'</tt>)</em>
|
384
|
+
|
385
|
+
|
386
|
+
—
|
387
|
+
<div class='inline'>
|
388
|
+
<p>the enterprise to fetch orgs from, defaults to</p>
|
389
|
+
</div>
|
390
|
+
|
391
|
+
</li>
|
392
|
+
|
393
|
+
</ul>
|
394
|
+
|
395
|
+
|
396
|
+
</div><table class="source_code">
|
397
|
+
<tr>
|
398
|
+
<td>
|
399
|
+
<pre class="lines">
|
400
|
+
|
401
|
+
|
402
|
+
26
|
403
|
+
27
|
404
|
+
28
|
405
|
+
29
|
406
|
+
30
|
407
|
+
31
|
408
|
+
32
|
409
|
+
33
|
410
|
+
34</pre>
|
411
|
+
</td>
|
412
|
+
<td>
|
413
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 26</span>
|
414
|
+
|
415
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_orgs'>orgs</span><span class='lparen'>(</span><span class='id identifier rubyid_enterprise'>enterprise</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
416
|
+
<span class='ivar'>@hash</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rest.html" title="AutomateSoup::Rest (module)">Rest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="Rest.html#get-class_method" title="AutomateSoup::Rest.get (method)">get</a></span></span><span class='lparen'>(</span>
|
417
|
+
<span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/v0/e/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_content'>/orgs</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
418
|
+
<span class='label'>username:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
419
|
+
<span class='label'>token:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
|
420
|
+
<span class='rparen'>)</span>
|
421
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to fetch orgs under enterprise </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='ivar'>@hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>orgs</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
422
|
+
<span class='ivar'>@hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>orgs</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
423
|
+
<span class='kw'>end</span></pre>
|
424
|
+
</td>
|
425
|
+
</tr>
|
426
|
+
</table>
|
427
|
+
</div>
|
428
|
+
|
429
|
+
<div class="method_details ">
|
430
|
+
<h3 class="signature " id="pipeline-instance_method">
|
431
|
+
|
432
|
+
#<strong>pipeline</strong>(enterprise: 'default', organization: nil, project: nil, pipeline: nil) ⇒ <tt>Object</tt>
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
</h3><div class="docstring">
|
439
|
+
<div class="discussion">
|
440
|
+
|
441
|
+
<p>Fetch a projects pipeline under an enterprise, organization pair</p>
|
442
|
+
|
443
|
+
<p>default.</p>
|
444
|
+
|
445
|
+
|
446
|
+
</div>
|
447
|
+
</div>
|
448
|
+
<div class="tags">
|
449
|
+
<p class="tag_title">Parameters:</p>
|
450
|
+
<ul class="param">
|
451
|
+
|
452
|
+
<li>
|
453
|
+
|
454
|
+
<span class='name'>enterprise</span>
|
455
|
+
|
456
|
+
|
457
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
—
|
462
|
+
<div class='inline'>
|
463
|
+
<p>a customizable set of options</p>
|
464
|
+
</div>
|
465
|
+
|
466
|
+
</li>
|
467
|
+
|
468
|
+
<li>
|
469
|
+
|
470
|
+
<span class='name'>organization</span>
|
471
|
+
|
472
|
+
|
473
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
—
|
478
|
+
<div class='inline'>
|
479
|
+
<p>a customizable set of options</p>
|
480
|
+
</div>
|
481
|
+
|
482
|
+
</li>
|
483
|
+
|
484
|
+
<li>
|
485
|
+
|
486
|
+
<span class='name'>project</span>
|
487
|
+
|
488
|
+
|
489
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
—
|
494
|
+
<div class='inline'>
|
495
|
+
<p>a customizable set of options</p>
|
496
|
+
</div>
|
497
|
+
|
498
|
+
</li>
|
499
|
+
|
500
|
+
<li>
|
501
|
+
|
502
|
+
<span class='name'>pipeline</span>
|
503
|
+
|
504
|
+
|
505
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
—
|
510
|
+
<div class='inline'>
|
511
|
+
<p>a customizable set of options</p>
|
512
|
+
</div>
|
513
|
+
|
514
|
+
</li>
|
515
|
+
|
516
|
+
</ul>
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
<p class="tag_title">Options Hash (<tt>enterprise:</tt>):</p>
|
522
|
+
<ul class="option">
|
523
|
+
|
524
|
+
<li>
|
525
|
+
<span class="name">the</span>
|
526
|
+
<span class="type">(<tt>String</tt>)</span>
|
527
|
+
<span class="default">
|
528
|
+
|
529
|
+
</span>
|
530
|
+
|
531
|
+
— <div class='inline'>
|
532
|
+
<p>enterprise to fetch org from, defaults to</p>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
</li>
|
536
|
+
|
537
|
+
</ul>
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
<p class="tag_title">Options Hash (<tt>organization:</tt>):</p>
|
542
|
+
<ul class="option">
|
543
|
+
|
544
|
+
<li>
|
545
|
+
<span class="name">the</span>
|
546
|
+
<span class="type">(<tt>String</tt>)</span>
|
547
|
+
<span class="default">
|
548
|
+
|
549
|
+
</span>
|
550
|
+
|
551
|
+
— <div class='inline'>
|
552
|
+
<p>organization to fetch from.</p>
|
553
|
+
</div>
|
554
|
+
|
555
|
+
</li>
|
556
|
+
|
557
|
+
</ul>
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
<p class="tag_title">Options Hash (<tt>project:</tt>):</p>
|
562
|
+
<ul class="option">
|
563
|
+
|
564
|
+
<li>
|
565
|
+
<span class="name">the</span>
|
566
|
+
<span class="type">(<tt>String</tt>)</span>
|
567
|
+
<span class="default">
|
568
|
+
|
569
|
+
</span>
|
570
|
+
|
571
|
+
— <div class='inline'>
|
572
|
+
<p>project to fetch from.</p>
|
573
|
+
</div>
|
574
|
+
|
575
|
+
</li>
|
576
|
+
|
577
|
+
</ul>
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
<p class="tag_title">Options Hash (<tt>pipeline:</tt>):</p>
|
582
|
+
<ul class="option">
|
583
|
+
|
584
|
+
<li>
|
585
|
+
<span class="name">the</span>
|
586
|
+
<span class="type">(<tt>String</tt>)</span>
|
587
|
+
<span class="default">
|
588
|
+
|
589
|
+
</span>
|
590
|
+
|
591
|
+
— <div class='inline'>
|
592
|
+
<p>pipeline to fetch from.</p>
|
593
|
+
</div>
|
594
|
+
|
595
|
+
</li>
|
596
|
+
|
597
|
+
</ul>
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
</div><table class="source_code">
|
602
|
+
<tr>
|
603
|
+
<td>
|
604
|
+
<pre class="lines">
|
605
|
+
|
606
|
+
|
607
|
+
102
|
608
|
+
103
|
609
|
+
104
|
610
|
+
105
|
611
|
+
106
|
612
|
+
107
|
613
|
+
108
|
614
|
+
109
|
615
|
+
110</pre>
|
616
|
+
</td>
|
617
|
+
<td>
|
618
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 102</span>
|
619
|
+
|
620
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pipeline'>pipeline</span><span class='lparen'>(</span><span class='label'>enterprise:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>organization:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>project:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>pipeline:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
621
|
+
<span class='ivar'>@hash</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rest.html" title="AutomateSoup::Rest (module)">Rest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="Rest.html#get-class_method" title="AutomateSoup::Rest.get (method)">get</a></span></span><span class='lparen'>(</span>
|
622
|
+
<span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/v0/e/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_content'>/orgs/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'>/projects/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_project'>project</span><span class='embexpr_end'>}</span><span class='tstring_content'>/changes?pipeline=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pipeline'>pipeline</span><span class='embexpr_end'>}</span><span class='tstring_content'>&limit=25</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
623
|
+
<span class='label'>username:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
624
|
+
<span class='label'>token:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
|
625
|
+
<span class='rparen'>)</span>
|
626
|
+
<span class='kw'>rescue</span> <span class='const'>JSON</span><span class='op'>::</span><span class='const'>ParserError</span>
|
627
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to fetch pipelines under organization </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'> enterprise </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
628
|
+
<span class='kw'>end</span></pre>
|
629
|
+
</td>
|
630
|
+
</tr>
|
631
|
+
</table>
|
632
|
+
</div>
|
633
|
+
|
634
|
+
<div class="method_details ">
|
635
|
+
<h3 class="signature " id="pipelines-instance_method">
|
636
|
+
|
637
|
+
#<strong>pipelines</strong>(enterprise: 'default', organization: nil, project: nil) ⇒ <tt>Object</tt>
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
</h3><div class="docstring">
|
644
|
+
<div class="discussion">
|
645
|
+
|
646
|
+
<p>Fetch all project pipelines under an enterprise, organization pair</p>
|
647
|
+
|
648
|
+
<p>default.</p>
|
649
|
+
|
650
|
+
|
651
|
+
</div>
|
652
|
+
</div>
|
653
|
+
<div class="tags">
|
654
|
+
<p class="tag_title">Parameters:</p>
|
655
|
+
<ul class="param">
|
656
|
+
|
657
|
+
<li>
|
658
|
+
|
659
|
+
<span class='name'>enterprise</span>
|
660
|
+
|
661
|
+
|
662
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
—
|
667
|
+
<div class='inline'>
|
668
|
+
<p>a customizable set of options</p>
|
669
|
+
</div>
|
670
|
+
|
671
|
+
</li>
|
672
|
+
|
673
|
+
<li>
|
674
|
+
|
675
|
+
<span class='name'>organization</span>
|
676
|
+
|
677
|
+
|
678
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
—
|
683
|
+
<div class='inline'>
|
684
|
+
<p>a customizable set of options</p>
|
685
|
+
</div>
|
686
|
+
|
687
|
+
</li>
|
688
|
+
|
689
|
+
<li>
|
690
|
+
|
691
|
+
<span class='name'>project</span>
|
692
|
+
|
693
|
+
|
694
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
—
|
699
|
+
<div class='inline'>
|
700
|
+
<p>a customizable set of options</p>
|
701
|
+
</div>
|
702
|
+
|
703
|
+
</li>
|
704
|
+
|
705
|
+
</ul>
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
<p class="tag_title">Options Hash (<tt>enterprise:</tt>):</p>
|
711
|
+
<ul class="option">
|
712
|
+
|
713
|
+
<li>
|
714
|
+
<span class="name">the</span>
|
715
|
+
<span class="type">(<tt>String</tt>)</span>
|
716
|
+
<span class="default">
|
717
|
+
|
718
|
+
</span>
|
719
|
+
|
720
|
+
— <div class='inline'>
|
721
|
+
<p>enterprise to fetch org from, defaults to</p>
|
722
|
+
</div>
|
723
|
+
|
724
|
+
</li>
|
725
|
+
|
726
|
+
</ul>
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
<p class="tag_title">Options Hash (<tt>organization:</tt>):</p>
|
731
|
+
<ul class="option">
|
732
|
+
|
733
|
+
<li>
|
734
|
+
<span class="name">the</span>
|
735
|
+
<span class="type">(<tt>String</tt>)</span>
|
736
|
+
<span class="default">
|
737
|
+
|
738
|
+
</span>
|
739
|
+
|
740
|
+
— <div class='inline'>
|
741
|
+
<p>organization to fetch pipelines from.</p>
|
742
|
+
</div>
|
743
|
+
|
744
|
+
</li>
|
745
|
+
|
746
|
+
</ul>
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
<p class="tag_title">Options Hash (<tt>project:</tt>):</p>
|
751
|
+
<ul class="option">
|
752
|
+
|
753
|
+
<li>
|
754
|
+
<span class="name">the</span>
|
755
|
+
<span class="type">(<tt>String</tt>)</span>
|
756
|
+
<span class="default">
|
757
|
+
|
758
|
+
</span>
|
759
|
+
|
760
|
+
— <div class='inline'>
|
761
|
+
<p>project to fetch pipelines from.</p>
|
762
|
+
</div>
|
763
|
+
|
764
|
+
</li>
|
765
|
+
|
766
|
+
</ul>
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
</div><table class="source_code">
|
771
|
+
<tr>
|
772
|
+
<td>
|
773
|
+
<pre class="lines">
|
774
|
+
|
775
|
+
|
776
|
+
81
|
777
|
+
82
|
778
|
+
83
|
779
|
+
84
|
780
|
+
85
|
781
|
+
86
|
782
|
+
87
|
783
|
+
88
|
784
|
+
89
|
785
|
+
90
|
786
|
+
91</pre>
|
787
|
+
</td>
|
788
|
+
<td>
|
789
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 81</span>
|
790
|
+
|
791
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pipelines'>pipelines</span><span class='lparen'>(</span><span class='label'>enterprise:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>organization:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>project:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
792
|
+
<span class='ivar'>@hash</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rest.html" title="AutomateSoup::Rest (module)">Rest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="Rest.html#get-class_method" title="AutomateSoup::Rest.get (method)">get</a></span></span><span class='lparen'>(</span>
|
793
|
+
<span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/v0/e/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_content'>/orgs/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'>/projects/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_project'>project</span><span class='embexpr_end'>}</span><span class='tstring_content'>/pipelines</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
794
|
+
<span class='label'>username:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
795
|
+
<span class='label'>token:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
|
796
|
+
<span class='rparen'>)</span>
|
797
|
+
<span class='ivar'>@hash</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pipelines</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
798
|
+
|
799
|
+
<span class='kw'>rescue</span> <span class='const'>JSON</span><span class='op'>::</span><span class='const'>ParserError</span>
|
800
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to fetch pipelines under organization </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'> enterprise </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
801
|
+
<span class='kw'>end</span></pre>
|
802
|
+
</td>
|
803
|
+
</tr>
|
804
|
+
</table>
|
805
|
+
</div>
|
806
|
+
|
807
|
+
<div class="method_details ">
|
808
|
+
<h3 class="signature " id="project-instance_method">
|
809
|
+
|
810
|
+
#<strong>project</strong>(enterprise: 'default', organization: nil, project: nil) ⇒ <tt>Object</tt>
|
811
|
+
|
812
|
+
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
</h3><div class="docstring">
|
817
|
+
<div class="discussion">
|
818
|
+
|
819
|
+
<p>Fetch a project under an enterprise, organization pair</p>
|
820
|
+
|
821
|
+
<p>default.</p>
|
822
|
+
|
823
|
+
|
824
|
+
</div>
|
825
|
+
</div>
|
826
|
+
<div class="tags">
|
827
|
+
<p class="tag_title">Parameters:</p>
|
828
|
+
<ul class="param">
|
829
|
+
|
830
|
+
<li>
|
831
|
+
|
832
|
+
<span class='name'>enterprise</span>
|
833
|
+
|
834
|
+
|
835
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
—
|
840
|
+
<div class='inline'>
|
841
|
+
<p>a customizable set of options</p>
|
842
|
+
</div>
|
843
|
+
|
844
|
+
</li>
|
845
|
+
|
846
|
+
<li>
|
847
|
+
|
848
|
+
<span class='name'>organization</span>
|
849
|
+
|
850
|
+
|
851
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
852
|
+
|
853
|
+
|
854
|
+
|
855
|
+
—
|
856
|
+
<div class='inline'>
|
857
|
+
<p>a customizable set of options</p>
|
858
|
+
</div>
|
859
|
+
|
860
|
+
</li>
|
861
|
+
|
862
|
+
<li>
|
863
|
+
|
864
|
+
<span class='name'>project</span>
|
865
|
+
|
866
|
+
|
867
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
—
|
872
|
+
<div class='inline'>
|
873
|
+
<p>a customizable set of options</p>
|
874
|
+
</div>
|
875
|
+
|
876
|
+
</li>
|
877
|
+
|
878
|
+
</ul>
|
879
|
+
|
880
|
+
|
881
|
+
|
882
|
+
|
883
|
+
<p class="tag_title">Options Hash (<tt>enterprise:</tt>):</p>
|
884
|
+
<ul class="option">
|
885
|
+
|
886
|
+
<li>
|
887
|
+
<span class="name">the</span>
|
888
|
+
<span class="type">(<tt>String</tt>)</span>
|
889
|
+
<span class="default">
|
890
|
+
|
891
|
+
</span>
|
892
|
+
|
893
|
+
— <div class='inline'>
|
894
|
+
<p>enterprise to fetch org from, defaults to</p>
|
895
|
+
</div>
|
896
|
+
|
897
|
+
</li>
|
898
|
+
|
899
|
+
</ul>
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
<p class="tag_title">Options Hash (<tt>organization:</tt>):</p>
|
904
|
+
<ul class="option">
|
905
|
+
|
906
|
+
<li>
|
907
|
+
<span class="name">the</span>
|
908
|
+
<span class="type">(<tt>String</tt>)</span>
|
909
|
+
<span class="default">
|
910
|
+
|
911
|
+
</span>
|
912
|
+
|
913
|
+
— <div class='inline'>
|
914
|
+
<p>organization to fetch projects from.</p>
|
915
|
+
</div>
|
916
|
+
|
917
|
+
</li>
|
918
|
+
|
919
|
+
</ul>
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
<p class="tag_title">Options Hash (<tt>project:</tt>):</p>
|
924
|
+
<ul class="option">
|
925
|
+
|
926
|
+
<li>
|
927
|
+
<span class="name">the</span>
|
928
|
+
<span class="type">(<tt>String</tt>)</span>
|
929
|
+
<span class="default">
|
930
|
+
|
931
|
+
</span>
|
932
|
+
|
933
|
+
— <div class='inline'>
|
934
|
+
<p>organization to fetch projects from.</p>
|
935
|
+
</div>
|
936
|
+
|
937
|
+
</li>
|
938
|
+
|
939
|
+
</ul>
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
</div><table class="source_code">
|
944
|
+
<tr>
|
945
|
+
<td>
|
946
|
+
<pre class="lines">
|
947
|
+
|
948
|
+
|
949
|
+
62
|
950
|
+
63
|
951
|
+
64
|
952
|
+
65
|
953
|
+
66
|
954
|
+
67
|
955
|
+
68
|
956
|
+
69
|
957
|
+
70
|
958
|
+
71</pre>
|
959
|
+
</td>
|
960
|
+
<td>
|
961
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 62</span>
|
962
|
+
|
963
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_project'>project</span><span class='lparen'>(</span><span class='label'>enterprise:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>organization:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>project:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
964
|
+
<span class='ivar'>@hash</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rest.html" title="AutomateSoup::Rest (module)">Rest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="Rest.html#get-class_method" title="AutomateSoup::Rest.get (method)">get</a></span></span><span class='lparen'>(</span>
|
965
|
+
<span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/v0/e/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_content'>/orgs/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'>/projects/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_project'>project</span><span class='embexpr_end'>}</span><span class='tstring_content'>/pipelines</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
966
|
+
<span class='label'>username:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
967
|
+
<span class='label'>token:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
|
968
|
+
<span class='rparen'>)</span>
|
969
|
+
|
970
|
+
<span class='kw'>rescue</span> <span class='const'>JSON</span><span class='op'>::</span><span class='const'>ParserError</span>
|
971
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to fetch projects under organization </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'> enterprise </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
972
|
+
<span class='kw'>end</span></pre>
|
973
|
+
</td>
|
974
|
+
</tr>
|
975
|
+
</table>
|
976
|
+
</div>
|
977
|
+
|
978
|
+
<div class="method_details ">
|
979
|
+
<h3 class="signature " id="projects-instance_method">
|
980
|
+
|
981
|
+
#<strong>projects</strong>(enterprise: 'default', organization: nil) ⇒ <tt>Object</tt>
|
982
|
+
|
983
|
+
|
984
|
+
|
985
|
+
|
986
|
+
|
987
|
+
</h3><div class="docstring">
|
988
|
+
<div class="discussion">
|
989
|
+
|
990
|
+
<p>Get the projects under and organization given the enterprise.</p>
|
991
|
+
|
992
|
+
<p>default.</p>
|
993
|
+
|
994
|
+
|
995
|
+
</div>
|
996
|
+
</div>
|
997
|
+
<div class="tags">
|
998
|
+
<p class="tag_title">Parameters:</p>
|
999
|
+
<ul class="param">
|
1000
|
+
|
1001
|
+
<li>
|
1002
|
+
|
1003
|
+
<span class='name'>enterprise</span>
|
1004
|
+
|
1005
|
+
|
1006
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
—
|
1011
|
+
<div class='inline'>
|
1012
|
+
<p>a customizable set of options</p>
|
1013
|
+
</div>
|
1014
|
+
|
1015
|
+
</li>
|
1016
|
+
|
1017
|
+
<li>
|
1018
|
+
|
1019
|
+
<span class='name'>organization</span>
|
1020
|
+
|
1021
|
+
|
1022
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
—
|
1027
|
+
<div class='inline'>
|
1028
|
+
<p>a customizable set of options</p>
|
1029
|
+
</div>
|
1030
|
+
|
1031
|
+
</li>
|
1032
|
+
|
1033
|
+
</ul>
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
|
1038
|
+
<p class="tag_title">Options Hash (<tt>enterprise:</tt>):</p>
|
1039
|
+
<ul class="option">
|
1040
|
+
|
1041
|
+
<li>
|
1042
|
+
<span class="name">the</span>
|
1043
|
+
<span class="type">(<tt>String</tt>)</span>
|
1044
|
+
<span class="default">
|
1045
|
+
|
1046
|
+
</span>
|
1047
|
+
|
1048
|
+
— <div class='inline'>
|
1049
|
+
<p>enterprise to fetch org from, defaults to</p>
|
1050
|
+
</div>
|
1051
|
+
|
1052
|
+
</li>
|
1053
|
+
|
1054
|
+
</ul>
|
1055
|
+
|
1056
|
+
|
1057
|
+
|
1058
|
+
<p class="tag_title">Options Hash (<tt>organization:</tt>):</p>
|
1059
|
+
<ul class="option">
|
1060
|
+
|
1061
|
+
<li>
|
1062
|
+
<span class="name">the</span>
|
1063
|
+
<span class="type">(<tt>String</tt>)</span>
|
1064
|
+
<span class="default">
|
1065
|
+
|
1066
|
+
</span>
|
1067
|
+
|
1068
|
+
— <div class='inline'>
|
1069
|
+
<p>organization to fetch projects from.</p>
|
1070
|
+
</div>
|
1071
|
+
|
1072
|
+
</li>
|
1073
|
+
|
1074
|
+
</ul>
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
</div><table class="source_code">
|
1079
|
+
<tr>
|
1080
|
+
<td>
|
1081
|
+
<pre class="lines">
|
1082
|
+
|
1083
|
+
|
1084
|
+
43
|
1085
|
+
44
|
1086
|
+
45
|
1087
|
+
46
|
1088
|
+
47
|
1089
|
+
48
|
1090
|
+
49
|
1091
|
+
50
|
1092
|
+
51
|
1093
|
+
52</pre>
|
1094
|
+
</td>
|
1095
|
+
<td>
|
1096
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 43</span>
|
1097
|
+
|
1098
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_projects'>projects</span><span class='lparen'>(</span><span class='label'>enterprise:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>organization:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1099
|
+
<span class='ivar'>@hash</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rest.html" title="AutomateSoup::Rest (module)">Rest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="Rest.html#get-class_method" title="AutomateSoup::Rest.get (method)">get</a></span></span><span class='lparen'>(</span>
|
1100
|
+
<span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/v0/e/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_content'>/orgs/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'>/projects</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1101
|
+
<span class='label'>username:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
1102
|
+
<span class='label'>token:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
|
1103
|
+
<span class='rparen'>)</span>
|
1104
|
+
|
1105
|
+
<span class='kw'>rescue</span> <span class='const'>JSON</span><span class='op'>::</span><span class='const'>ParserError</span>
|
1106
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to fetch projects under organization </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_organization'>organization</span><span class='embexpr_end'>}</span><span class='tstring_content'> enterprise </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_enterprise'>enterprise</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1107
|
+
<span class='kw'>end</span></pre>
|
1108
|
+
</td>
|
1109
|
+
</tr>
|
1110
|
+
</table>
|
1111
|
+
</div>
|
1112
|
+
|
1113
|
+
<div class="method_details ">
|
1114
|
+
<h3 class="signature " id="status-instance_method">
|
1115
|
+
|
1116
|
+
#<strong>status</strong> ⇒ <tt>Object</tt>
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
</h3><div class="docstring">
|
1123
|
+
<div class="discussion">
|
1124
|
+
|
1125
|
+
<p>Get the status of the Automate API</p>
|
1126
|
+
|
1127
|
+
|
1128
|
+
</div>
|
1129
|
+
</div>
|
1130
|
+
<div class="tags">
|
1131
|
+
|
1132
|
+
|
1133
|
+
</div><table class="source_code">
|
1134
|
+
<tr>
|
1135
|
+
<td>
|
1136
|
+
<pre class="lines">
|
1137
|
+
|
1138
|
+
|
1139
|
+
12
|
1140
|
+
13
|
1141
|
+
14
|
1142
|
+
15
|
1143
|
+
16
|
1144
|
+
17
|
1145
|
+
18</pre>
|
1146
|
+
</td>
|
1147
|
+
<td>
|
1148
|
+
<pre class="code"><span class="info file"># File 'lib/automate_soup/api.rb', line 12</span>
|
1149
|
+
|
1150
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
|
1151
|
+
<span class='const'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Rest.html" title="AutomateSoup::Rest (module)">Rest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="Rest.html#get-class_method" title="AutomateSoup::Rest.get (method)">get</a></span></span><span class='lparen'>(</span>
|
1152
|
+
<span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/api/_status</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1153
|
+
<span class='label'>username:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
1154
|
+
<span class='label'>token:</span> <span class='ivar'>@soup</span><span class='period'>.</span><span class='id identifier rubyid_credentials'>credentials</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span>
|
1155
|
+
<span class='rparen'>)</span>
|
1156
|
+
<span class='kw'>end</span></pre>
|
1157
|
+
</td>
|
1158
|
+
</tr>
|
1159
|
+
</table>
|
1160
|
+
</div>
|
1161
|
+
|
1162
|
+
</div>
|
1163
|
+
|
1164
|
+
</div>
|
1165
|
+
|
1166
|
+
<div id="footer">
|
1167
|
+
Generated on Mon Dec 18 14:46:35 2017 by
|
1168
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1169
|
+
0.9.9 (ruby-2.4.1).
|
1170
|
+
</div>
|
1171
|
+
|
1172
|
+
</div>
|
1173
|
+
</body>
|
1174
|
+
</html>
|