datacentred 0.1.1pre → 1.1.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/.codeclimate.yml +11 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +2 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +46 -0
- data/Gemfile.lock +39 -2
- data/LICENSE +21 -0
- data/README.md +160 -2
- data/circle.yml +0 -2
- data/datacentred.gemspec +17 -14
- data/docs/Datacentred.html +537 -0
- data/docs/Datacentred/Errors.html +260 -0
- data/docs/Datacentred/Errors/Error.html +139 -0
- data/docs/Datacentred/Errors/NotFound.html +145 -0
- data/docs/Datacentred/Errors/Unauthorized.html +149 -0
- data/docs/Datacentred/Errors/UnprocessableEntity.html +145 -0
- data/docs/Datacentred/Model.html +128 -0
- data/docs/Datacentred/Model/Base.html +255 -0
- data/docs/Datacentred/Model/Project.html +1729 -0
- data/docs/Datacentred/Model/Role.html +1830 -0
- data/docs/Datacentred/Model/Usage.html +510 -0
- data/docs/Datacentred/Model/User.html +832 -0
- data/docs/Datacentred/Model/Version.html +451 -0
- data/docs/Datacentred/Project.html +142 -0
- data/docs/Datacentred/Request.html +128 -0
- data/docs/Datacentred/Request/Base.html +675 -0
- data/docs/Datacentred/Request/Projects.html +1286 -0
- data/docs/Datacentred/Request/Roles.html +1286 -0
- data/docs/Datacentred/Request/Usage.html +315 -0
- data/docs/Datacentred/Request/Users.html +841 -0
- data/docs/Datacentred/Request/Versions.html +258 -0
- data/docs/Datacentred/Response.html +410 -0
- data/docs/Datacentred/Role.html +142 -0
- data/docs/Datacentred/Usage.html +142 -0
- data/docs/Datacentred/User.html +142 -0
- data/docs/Datacentred/Version.html +142 -0
- data/docs/_index.html +349 -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.README.html +231 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +231 -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 +643 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/datacentred.rb +65 -12
- data/lib/datacentred/error.rb +37 -15
- data/lib/datacentred/model/base.rb +21 -0
- data/lib/datacentred/model/project.rb +90 -31
- data/lib/datacentred/model/role.rb +89 -31
- data/lib/datacentred/model/usage.rb +16 -9
- data/lib/datacentred/model/user.rb +54 -22
- data/lib/datacentred/model/version.rb +17 -8
- data/lib/datacentred/request/base.rb +68 -31
- data/lib/datacentred/request/projects.rb +92 -24
- data/lib/datacentred/request/roles.rb +92 -24
- data/lib/datacentred/request/usage.rb +10 -1
- data/lib/datacentred/request/users.rb +58 -15
- data/lib/datacentred/request/versions.rb +13 -1
- data/lib/datacentred/response.rb +6 -2
- data/test/integration/authorization_test.rb +30 -0
- data/test/integration/projects_test.rb +11 -11
- data/test/integration/roles_test.rb +17 -17
- data/test/integration/usage_test.rb +8 -8
- data/test/integration/users_test.rb +23 -19
- data/test/integration/versions_test.rb +1 -2
- data/test/test_helper.rb +8 -5
- data/test/vcr_cassettes/not_authorized.yml +57 -0
- data/test/vcr_cassettes/unexpected_error.yml +56 -0
- metadata +115 -9
@@ -0,0 +1,128 @@
|
|
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
|
+
Module: Datacentred::Request
|
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 = "Datacentred::Request";
|
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 (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Datacentred.html" title="Datacentred (module)">Datacentred</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Request</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>Module: Datacentred::Request
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/datacentred.rb<span class="defines">,<br />
|
82
|
+
lib/datacentred/request/base.rb,<br /> lib/datacentred/request/roles.rb,<br /> lib/datacentred/request/usage.rb,<br /> lib/datacentred/request/users.rb,<br /> lib/datacentred/request/projects.rb,<br /> lib/datacentred/request/versions.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>Request classes representing RESTful API interactions.</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Request/Base.html" title="Datacentred::Request::Base (class)">Base</a></span>, <span class='object_link'><a href="Request/Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span>, <span class='object_link'><a href="Request/Roles.html" title="Datacentred::Request::Roles (class)">Roles</a></span>, <span class='object_link'><a href="Request/Usage.html" title="Datacentred::Request::Usage (class)">Usage</a></span>, <span class='object_link'><a href="Request/Users.html" title="Datacentred::Request::Users (class)">Users</a></span>, <span class='object_link'><a href="Request/Versions.html" title="Datacentred::Request::Versions (class)">Versions</a></span>
|
106
|
+
|
107
|
+
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div id="footer">
|
121
|
+
Generated on Fri Sep 15 16:27:42 2017 by
|
122
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
|
+
0.9.9 (ruby-2.3.1).
|
124
|
+
</div>
|
125
|
+
|
126
|
+
</div>
|
127
|
+
</body>
|
128
|
+
</html>
|
@@ -0,0 +1,675 @@
|
|
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: Datacentred::Request::Base
|
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 = "Datacentred::Request::Base";
|
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 (B)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Datacentred.html" title="Datacentred (module)">Datacentred</a></span></span> » <span class='title'><span class='object_link'><a href="../Request.html" title="Datacentred::Request (module)">Request</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Base</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: Datacentred::Request::Base
|
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">Datacentred::Request::Base</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/datacentred/request/base.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Base class for all API requests.</p>
|
106
|
+
|
107
|
+
<p>Uses the Faraday library for HTTP interactions.</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div><div id="subclasses">
|
116
|
+
<h2>Direct Known Subclasses</h2>
|
117
|
+
<p class="children"><span class='object_link'><a href="Projects.html" title="Datacentred::Request::Projects (class)">Projects</a></span>, <span class='object_link'><a href="Roles.html" title="Datacentred::Request::Roles (class)">Roles</a></span>, <span class='object_link'><a href="Usage.html" title="Datacentred::Request::Usage (class)">Usage</a></span>, <span class='object_link'><a href="Users.html" title="Datacentred::Request::Users (class)">Users</a></span>, <span class='object_link'><a href="Versions.html" title="Datacentred::Request::Versions (class)">Versions</a></span></p>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<h2>
|
128
|
+
Class Method Summary
|
129
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
130
|
+
</h2>
|
131
|
+
|
132
|
+
<ul class="summary">
|
133
|
+
|
134
|
+
<li class="public ">
|
135
|
+
<span class="summary_signature">
|
136
|
+
|
137
|
+
<a href="#delete-class_method" title="delete (class method)">.<strong>delete</strong>(path) ⇒ nil </a>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<span class="summary_desc"><div class='inline'>
|
152
|
+
<p>Access a resource via HTTP DELETE.</p>
|
153
|
+
</div></span>
|
154
|
+
|
155
|
+
</li>
|
156
|
+
|
157
|
+
|
158
|
+
<li class="public ">
|
159
|
+
<span class="summary_signature">
|
160
|
+
|
161
|
+
<a href="#get-class_method" title="get (class method)">.<strong>get</strong>(path) ⇒ Object </a>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</span>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
<span class="summary_desc"><div class='inline'>
|
176
|
+
<p>Access a resource via HTTP GET.</p>
|
177
|
+
</div></span>
|
178
|
+
|
179
|
+
</li>
|
180
|
+
|
181
|
+
|
182
|
+
<li class="public ">
|
183
|
+
<span class="summary_signature">
|
184
|
+
|
185
|
+
<a href="#post-class_method" title="post (class method)">.<strong>post</strong>(path, payload = nil) ⇒ Object </a>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
</span>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<span class="summary_desc"><div class='inline'>
|
200
|
+
<p>Access a resource via HTTP POST.</p>
|
201
|
+
</div></span>
|
202
|
+
|
203
|
+
</li>
|
204
|
+
|
205
|
+
|
206
|
+
<li class="public ">
|
207
|
+
<span class="summary_signature">
|
208
|
+
|
209
|
+
<a href="#put-class_method" title="put (class method)">.<strong>put</strong>(path, payload = nil) ⇒ Object </a>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
</span>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<span class="summary_desc"><div class='inline'>
|
224
|
+
<p>Access a resource via HTTP PUT.</p>
|
225
|
+
</div></span>
|
226
|
+
|
227
|
+
</li>
|
228
|
+
|
229
|
+
|
230
|
+
</ul>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<div id="class_method_details" class="method_details_list">
|
236
|
+
<h2>Class Method Details</h2>
|
237
|
+
|
238
|
+
|
239
|
+
<div class="method_details first">
|
240
|
+
<h3 class="signature first" id="delete-class_method">
|
241
|
+
|
242
|
+
.<strong>delete</strong>(path) ⇒ <tt>nil</tt>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
</h3><div class="docstring">
|
249
|
+
<div class="discussion">
|
250
|
+
|
251
|
+
<p>Access a resource via HTTP DELETE.</p>
|
252
|
+
|
253
|
+
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
<div class="tags">
|
257
|
+
<p class="tag_title">Parameters:</p>
|
258
|
+
<ul class="param">
|
259
|
+
|
260
|
+
<li>
|
261
|
+
|
262
|
+
<span class='name'>path</span>
|
263
|
+
|
264
|
+
|
265
|
+
<span class='type'>(<tt>String</tt>)</span>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
—
|
270
|
+
<div class='inline'>
|
271
|
+
<p>Desired server path.</p>
|
272
|
+
</div>
|
273
|
+
|
274
|
+
</li>
|
275
|
+
|
276
|
+
</ul>
|
277
|
+
|
278
|
+
<p class="tag_title">Returns:</p>
|
279
|
+
<ul class="return">
|
280
|
+
|
281
|
+
<li>
|
282
|
+
|
283
|
+
|
284
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
—
|
289
|
+
<div class='inline'>
|
290
|
+
<p>Returns nil on success.</p>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
</li>
|
294
|
+
|
295
|
+
</ul>
|
296
|
+
<p class="tag_title">Raises:</p>
|
297
|
+
<ul class="raise">
|
298
|
+
|
299
|
+
<li>
|
300
|
+
|
301
|
+
|
302
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Error.html" title="Datacentred::Errors::Error (class)">Errors::Error</a></span></tt>)</span>
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
—
|
307
|
+
<div class='inline'>
|
308
|
+
<p>Raised if the server returns a non 2xx error code.</p>
|
309
|
+
</div>
|
310
|
+
|
311
|
+
</li>
|
312
|
+
|
313
|
+
</ul>
|
314
|
+
|
315
|
+
</div><table class="source_code">
|
316
|
+
<tr>
|
317
|
+
<td>
|
318
|
+
<pre class="lines">
|
319
|
+
|
320
|
+
|
321
|
+
42
|
322
|
+
43
|
323
|
+
44</pre>
|
324
|
+
</td>
|
325
|
+
<td>
|
326
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/request/base.rb', line 42</span>
|
327
|
+
|
328
|
+
<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='rparen'>)</span>
|
329
|
+
<span class='id identifier rubyid_action'>action</span> <span class='symbol'>:delete</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span>
|
330
|
+
<span class='kw'>end</span></pre>
|
331
|
+
</td>
|
332
|
+
</tr>
|
333
|
+
</table>
|
334
|
+
</div>
|
335
|
+
|
336
|
+
<div class="method_details ">
|
337
|
+
<h3 class="signature " id="get-class_method">
|
338
|
+
|
339
|
+
.<strong>get</strong>(path) ⇒ <tt>Object</tt>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
</h3><div class="docstring">
|
346
|
+
<div class="discussion">
|
347
|
+
|
348
|
+
<p>Access a resource via HTTP GET.</p>
|
349
|
+
|
350
|
+
|
351
|
+
</div>
|
352
|
+
</div>
|
353
|
+
<div class="tags">
|
354
|
+
<p class="tag_title">Parameters:</p>
|
355
|
+
<ul class="param">
|
356
|
+
|
357
|
+
<li>
|
358
|
+
|
359
|
+
<span class='name'>path</span>
|
360
|
+
|
361
|
+
|
362
|
+
<span class='type'>(<tt>String</tt>)</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
—
|
367
|
+
<div class='inline'>
|
368
|
+
<p>Desired server path.</p>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
</li>
|
372
|
+
|
373
|
+
</ul>
|
374
|
+
|
375
|
+
<p class="tag_title">Returns:</p>
|
376
|
+
<ul class="return">
|
377
|
+
|
378
|
+
<li>
|
379
|
+
|
380
|
+
|
381
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
—
|
386
|
+
<div class='inline'>
|
387
|
+
<p>Parsed server response body.</p>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
</li>
|
391
|
+
|
392
|
+
</ul>
|
393
|
+
<p class="tag_title">Raises:</p>
|
394
|
+
<ul class="raise">
|
395
|
+
|
396
|
+
<li>
|
397
|
+
|
398
|
+
|
399
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Error.html" title="Datacentred::Errors::Error (class)">Errors::Error</a></span></tt>)</span>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
—
|
404
|
+
<div class='inline'>
|
405
|
+
<p>Raised if the server returns a non 2xx error code.</p>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
</li>
|
409
|
+
|
410
|
+
</ul>
|
411
|
+
|
412
|
+
</div><table class="source_code">
|
413
|
+
<tr>
|
414
|
+
<td>
|
415
|
+
<pre class="lines">
|
416
|
+
|
417
|
+
|
418
|
+
13
|
419
|
+
14
|
420
|
+
15</pre>
|
421
|
+
</td>
|
422
|
+
<td>
|
423
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/request/base.rb', line 13</span>
|
424
|
+
|
425
|
+
<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='rparen'>)</span>
|
426
|
+
<span class='id identifier rubyid_action'>action</span> <span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span>
|
427
|
+
<span class='kw'>end</span></pre>
|
428
|
+
</td>
|
429
|
+
</tr>
|
430
|
+
</table>
|
431
|
+
</div>
|
432
|
+
|
433
|
+
<div class="method_details ">
|
434
|
+
<h3 class="signature " id="post-class_method">
|
435
|
+
|
436
|
+
.<strong>post</strong>(path, payload = nil) ⇒ <tt>Object</tt>
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
</h3><div class="docstring">
|
443
|
+
<div class="discussion">
|
444
|
+
|
445
|
+
<p>Access a resource via HTTP POST.</p>
|
446
|
+
|
447
|
+
|
448
|
+
</div>
|
449
|
+
</div>
|
450
|
+
<div class="tags">
|
451
|
+
<p class="tag_title">Parameters:</p>
|
452
|
+
<ul class="param">
|
453
|
+
|
454
|
+
<li>
|
455
|
+
|
456
|
+
<span class='name'>path</span>
|
457
|
+
|
458
|
+
|
459
|
+
<span class='type'>(<tt>String</tt>)</span>
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
—
|
464
|
+
<div class='inline'>
|
465
|
+
<p>Desired server path.</p>
|
466
|
+
</div>
|
467
|
+
|
468
|
+
</li>
|
469
|
+
|
470
|
+
<li>
|
471
|
+
|
472
|
+
<span class='name'>payload</span>
|
473
|
+
|
474
|
+
|
475
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
476
|
+
|
477
|
+
|
478
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
479
|
+
|
480
|
+
|
481
|
+
—
|
482
|
+
<div class='inline'>
|
483
|
+
<p>JSON serializable object.</p>
|
484
|
+
</div>
|
485
|
+
|
486
|
+
</li>
|
487
|
+
|
488
|
+
</ul>
|
489
|
+
|
490
|
+
<p class="tag_title">Returns:</p>
|
491
|
+
<ul class="return">
|
492
|
+
|
493
|
+
<li>
|
494
|
+
|
495
|
+
|
496
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
—
|
501
|
+
<div class='inline'>
|
502
|
+
<p>Parsed server response body.</p>
|
503
|
+
</div>
|
504
|
+
|
505
|
+
</li>
|
506
|
+
|
507
|
+
</ul>
|
508
|
+
<p class="tag_title">Raises:</p>
|
509
|
+
<ul class="raise">
|
510
|
+
|
511
|
+
<li>
|
512
|
+
|
513
|
+
|
514
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Error.html" title="Datacentred::Errors::Error (class)">Errors::Error</a></span></tt>)</span>
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
—
|
519
|
+
<div class='inline'>
|
520
|
+
<p>Raised if the server returns a non 2xx error code.</p>
|
521
|
+
</div>
|
522
|
+
|
523
|
+
</li>
|
524
|
+
|
525
|
+
</ul>
|
526
|
+
|
527
|
+
</div><table class="source_code">
|
528
|
+
<tr>
|
529
|
+
<td>
|
530
|
+
<pre class="lines">
|
531
|
+
|
532
|
+
|
533
|
+
23
|
534
|
+
24
|
535
|
+
25</pre>
|
536
|
+
</td>
|
537
|
+
<td>
|
538
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/request/base.rb', line 23</span>
|
539
|
+
|
540
|
+
<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_payload'>payload</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
541
|
+
<span class='id identifier rubyid_action'>action</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_payload'>payload</span>
|
542
|
+
<span class='kw'>end</span></pre>
|
543
|
+
</td>
|
544
|
+
</tr>
|
545
|
+
</table>
|
546
|
+
</div>
|
547
|
+
|
548
|
+
<div class="method_details ">
|
549
|
+
<h3 class="signature " id="put-class_method">
|
550
|
+
|
551
|
+
.<strong>put</strong>(path, payload = nil) ⇒ <tt>Object</tt>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
</h3><div class="docstring">
|
558
|
+
<div class="discussion">
|
559
|
+
|
560
|
+
<p>Access a resource via HTTP PUT.</p>
|
561
|
+
|
562
|
+
|
563
|
+
</div>
|
564
|
+
</div>
|
565
|
+
<div class="tags">
|
566
|
+
<p class="tag_title">Parameters:</p>
|
567
|
+
<ul class="param">
|
568
|
+
|
569
|
+
<li>
|
570
|
+
|
571
|
+
<span class='name'>path</span>
|
572
|
+
|
573
|
+
|
574
|
+
<span class='type'>(<tt>String</tt>)</span>
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
—
|
579
|
+
<div class='inline'>
|
580
|
+
<p>Desired server path.</p>
|
581
|
+
</div>
|
582
|
+
|
583
|
+
</li>
|
584
|
+
|
585
|
+
<li>
|
586
|
+
|
587
|
+
<span class='name'>payload</span>
|
588
|
+
|
589
|
+
|
590
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
591
|
+
|
592
|
+
|
593
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
594
|
+
|
595
|
+
|
596
|
+
—
|
597
|
+
<div class='inline'>
|
598
|
+
<p>JSON serializable object.</p>
|
599
|
+
</div>
|
600
|
+
|
601
|
+
</li>
|
602
|
+
|
603
|
+
</ul>
|
604
|
+
|
605
|
+
<p class="tag_title">Returns:</p>
|
606
|
+
<ul class="return">
|
607
|
+
|
608
|
+
<li>
|
609
|
+
|
610
|
+
|
611
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
—
|
616
|
+
<div class='inline'>
|
617
|
+
<p>Parsed server response body.</p>
|
618
|
+
</div>
|
619
|
+
|
620
|
+
</li>
|
621
|
+
|
622
|
+
</ul>
|
623
|
+
<p class="tag_title">Raises:</p>
|
624
|
+
<ul class="raise">
|
625
|
+
|
626
|
+
<li>
|
627
|
+
|
628
|
+
|
629
|
+
<span class='type'>(<tt><span class='object_link'><a href="../Errors/Error.html" title="Datacentred::Errors::Error (class)">Errors::Error</a></span></tt>)</span>
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
—
|
634
|
+
<div class='inline'>
|
635
|
+
<p>Raised if the server returns a non 2xx error code.</p>
|
636
|
+
</div>
|
637
|
+
|
638
|
+
</li>
|
639
|
+
|
640
|
+
</ul>
|
641
|
+
|
642
|
+
</div><table class="source_code">
|
643
|
+
<tr>
|
644
|
+
<td>
|
645
|
+
<pre class="lines">
|
646
|
+
|
647
|
+
|
648
|
+
33
|
649
|
+
34
|
650
|
+
35</pre>
|
651
|
+
</td>
|
652
|
+
<td>
|
653
|
+
<pre class="code"><span class="info file"># File 'lib/datacentred/request/base.rb', line 33</span>
|
654
|
+
|
655
|
+
<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_payload'>payload</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
656
|
+
<span class='id identifier rubyid_action'>action</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_payload'>payload</span>
|
657
|
+
<span class='kw'>end</span></pre>
|
658
|
+
</td>
|
659
|
+
</tr>
|
660
|
+
</table>
|
661
|
+
</div>
|
662
|
+
|
663
|
+
</div>
|
664
|
+
|
665
|
+
</div>
|
666
|
+
|
667
|
+
<div id="footer">
|
668
|
+
Generated on Fri Sep 15 16:27:42 2017 by
|
669
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
670
|
+
0.9.9 (ruby-2.3.1).
|
671
|
+
</div>
|
672
|
+
|
673
|
+
</div>
|
674
|
+
</body>
|
675
|
+
</html>
|