rhc-rest 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/COPYRIGHT +1 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +11 -0
  4. data/Rakefile +1 -0
  5. data/bin/sample-usage.rb +124 -0
  6. data/doc/Gemfile.html +119 -0
  7. data/doc/Rakefile.html +117 -0
  8. data/doc/Rhc/Rest/Application.html +571 -0
  9. data/doc/Rhc/Rest/BaseException.html +226 -0
  10. data/doc/Rhc/Rest/Cartridge.html +475 -0
  11. data/doc/Rhc/Rest/Client.html +609 -0
  12. data/doc/Rhc/Rest/ClientErrorException.html +167 -0
  13. data/doc/Rhc/Rest/Domain.html +457 -0
  14. data/doc/Rhc/Rest/Key.html +378 -0
  15. data/doc/Rhc/Rest/RequestDeniedException.html +166 -0
  16. data/doc/Rhc/Rest/ResourceAccessException.html +161 -0
  17. data/doc/Rhc/Rest/ResourceNotFoundException.html +166 -0
  18. data/doc/Rhc/Rest/ServerErrorException.html +161 -0
  19. data/doc/Rhc/Rest/ServiceUnavailableException.html +167 -0
  20. data/doc/Rhc/Rest/UnAuthorizedException.html +167 -0
  21. data/doc/Rhc/Rest/User.html +354 -0
  22. data/doc/Rhc/Rest/ValidationException.html +255 -0
  23. data/doc/Rhc/Rest.html +410 -0
  24. data/doc/Rhc.html +329 -0
  25. data/doc/created.rid +13 -0
  26. data/doc/doc/created.rid +0 -0
  27. data/doc/images/add.png +0 -0
  28. data/doc/images/brick.png +0 -0
  29. data/doc/images/brick_link.png +0 -0
  30. data/doc/images/bug.png +0 -0
  31. data/doc/images/bullet_black.png +0 -0
  32. data/doc/images/bullet_toggle_minus.png +0 -0
  33. data/doc/images/bullet_toggle_plus.png +0 -0
  34. data/doc/images/date.png +0 -0
  35. data/doc/images/delete.png +0 -0
  36. data/doc/images/find.png +0 -0
  37. data/doc/images/loadingAnimation.gif +0 -0
  38. data/doc/images/macFFBgHack.png +0 -0
  39. data/doc/images/package.png +0 -0
  40. data/doc/images/page_green.png +0 -0
  41. data/doc/images/page_white_text.png +0 -0
  42. data/doc/images/page_white_width.png +0 -0
  43. data/doc/images/plugin.png +0 -0
  44. data/doc/images/ruby.png +0 -0
  45. data/doc/images/tag_blue.png +0 -0
  46. data/doc/images/tag_green.png +0 -0
  47. data/doc/images/transparent.png +0 -0
  48. data/doc/images/wrench.png +0 -0
  49. data/doc/images/wrench_orange.png +0 -0
  50. data/doc/images/zoom.png +0 -0
  51. data/doc/index.html +112 -0
  52. data/doc/js/darkfish.js +153 -0
  53. data/doc/js/jquery.js +18 -0
  54. data/doc/js/navigation.js +142 -0
  55. data/doc/js/search.js +94 -0
  56. data/doc/js/search_index.js +1 -0
  57. data/doc/js/searcher.js +228 -0
  58. data/doc/rdoc.css +543 -0
  59. data/doc/table_of_contents.html +198 -0
  60. data/lib/rhc-rest/application.rb +81 -0
  61. data/lib/rhc-rest/cartridge.rb +64 -0
  62. data/lib/rhc-rest/client.rb +122 -0
  63. data/lib/rhc-rest/domain.rb +56 -0
  64. data/lib/rhc-rest/exceptions/exceptions.rb +73 -0
  65. data/lib/rhc-rest/key.rb +34 -0
  66. data/lib/rhc-rest/user.rb +41 -0
  67. data/lib/rhc-rest/version.rb +5 -0
  68. data/lib/rhc-rest.rb +155 -0
  69. data/rhc-rest.gemspec +26 -0
  70. data/rhc-rest.spec +79 -0
  71. metadata +162 -0
@@ -0,0 +1,167 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Rhc::Rest::ClientErrorException - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/rhc-rest/exceptions/exceptions.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link"><a href="BaseException.html">Rhc::Rest::BaseException</a>
63
+
64
+ </nav>
65
+
66
+
67
+
68
+ </div>
69
+
70
+ <div id="project-metadata">
71
+ <nav id="fileindex-section" class="section project-section">
72
+ <h3 class="section-header">Pages</h3>
73
+
74
+ <ul>
75
+
76
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a>
77
+
78
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a>
79
+
80
+ </ul>
81
+ </nav>
82
+
83
+ <nav id="classindex-section" class="section project-section">
84
+ <h3 class="section-header">Class and Module Index</h3>
85
+
86
+ <ul class="link-list">
87
+
88
+ <li><a href="../../Rhc.html">Rhc</a>
89
+
90
+ <li><a href="../../Rhc/Rest.html">Rhc::Rest</a>
91
+
92
+ <li><a href="../../Rhc/Rest/Application.html">Rhc::Rest::Application</a>
93
+
94
+ <li><a href="../../Rhc/Rest/BaseException.html">Rhc::Rest::BaseException</a>
95
+
96
+ <li><a href="../../Rhc/Rest/Cartridge.html">Rhc::Rest::Cartridge</a>
97
+
98
+ <li><a href="../../Rhc/Rest/Client.html">Rhc::Rest::Client</a>
99
+
100
+ <li><a href="../../Rhc/Rest/ClientErrorException.html">Rhc::Rest::ClientErrorException</a>
101
+
102
+ <li><a href="../../Rhc/Rest/Domain.html">Rhc::Rest::Domain</a>
103
+
104
+ <li><a href="../../Rhc/Rest/Key.html">Rhc::Rest::Key</a>
105
+
106
+ <li><a href="../../Rhc/Rest/RequestDeniedException.html">Rhc::Rest::RequestDeniedException</a>
107
+
108
+ <li><a href="../../Rhc/Rest/ResourceAccessException.html">Rhc::Rest::ResourceAccessException</a>
109
+
110
+ <li><a href="../../Rhc/Rest/ResourceNotFoundException.html">Rhc::Rest::ResourceNotFoundException</a>
111
+
112
+ <li><a href="../../Rhc/Rest/ServerErrorException.html">Rhc::Rest::ServerErrorException</a>
113
+
114
+ <li><a href="../../Rhc/Rest/ServiceUnavailableException.html">Rhc::Rest::ServiceUnavailableException</a>
115
+
116
+ <li><a href="../../Rhc/Rest/UnAuthorizedException.html">Rhc::Rest::UnAuthorizedException</a>
117
+
118
+ <li><a href="../../Rhc/Rest/User.html">Rhc::Rest::User</a>
119
+
120
+ <li><a href="../../Rhc/Rest/ValidationException.html">Rhc::Rest::ValidationException</a>
121
+
122
+ </ul>
123
+ </nav>
124
+
125
+ </div>
126
+ </nav>
127
+
128
+ <div id="documentation">
129
+ <h1 class="class">class Rhc::Rest::ClientErrorException</h1>
130
+
131
+ <div id="description" class="description">
132
+
133
+ <p>Exceptions thrown in case of an HTTP 4xx is received with the exception of
134
+ 401, 403, 403 and 422 where a more sepcific exception is thrown</p>
135
+
136
+ <p>HTTP Error Codes 4xx</p>
137
+
138
+ <p>The 4xx class of status code is intended for cases in which the client
139
+ seems to have errored.</p>
140
+
141
+ </div><!-- description -->
142
+
143
+
144
+
145
+
146
+ <section id="5Buntitled-5D" class="documentation-section">
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <!-- Methods -->
156
+
157
+ </section><!-- 5Buntitled-5D -->
158
+
159
+ </div><!-- documentation -->
160
+
161
+
162
+ <footer id="validator-badges">
163
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
164
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
165
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
166
+ </footer>
167
+
@@ -0,0 +1,457 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Rhc::Rest::Domain - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/rhc-rest/domain.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Object
63
+
64
+ </nav>
65
+
66
+ <!-- Included Modules -->
67
+ <nav id="includes-section" class="section">
68
+ <h3 class="section-header">Included Modules</h3>
69
+
70
+ <ul class="link-list">
71
+
72
+
73
+ <li><a class="include" href="../Rest.html">Rhc::Rest</a>
74
+
75
+
76
+ </ul>
77
+ </nav>
78
+
79
+ <!-- Method Quickref -->
80
+ <nav id="method-list-section" class="section">
81
+ <h3 class="section-header">Methods</h3>
82
+
83
+ <ul class="link-list">
84
+
85
+ <li><a href="#method-c-new">::new</a>
86
+
87
+ <li><a href="#method-i-add_application">#add_application</a>
88
+
89
+ <li><a href="#method-i-applications">#applications</a>
90
+
91
+ <li><a href="#method-i-delete">#delete</a>
92
+
93
+ <li><a href="#method-i-destroy">#destroy</a>
94
+
95
+ <li><a href="#method-i-save">#save</a>
96
+
97
+ <li><a href="#method-i-update">#update</a>
98
+
99
+ </ul>
100
+ </nav>
101
+
102
+ </div>
103
+
104
+ <div id="project-metadata">
105
+ <nav id="fileindex-section" class="section project-section">
106
+ <h3 class="section-header">Pages</h3>
107
+
108
+ <ul>
109
+
110
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a>
111
+
112
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a>
113
+
114
+ </ul>
115
+ </nav>
116
+
117
+ <nav id="classindex-section" class="section project-section">
118
+ <h3 class="section-header">Class and Module Index</h3>
119
+
120
+ <ul class="link-list">
121
+
122
+ <li><a href="../../Rhc.html">Rhc</a>
123
+
124
+ <li><a href="../../Rhc/Rest.html">Rhc::Rest</a>
125
+
126
+ <li><a href="../../Rhc/Rest/Application.html">Rhc::Rest::Application</a>
127
+
128
+ <li><a href="../../Rhc/Rest/BaseException.html">Rhc::Rest::BaseException</a>
129
+
130
+ <li><a href="../../Rhc/Rest/Cartridge.html">Rhc::Rest::Cartridge</a>
131
+
132
+ <li><a href="../../Rhc/Rest/Client.html">Rhc::Rest::Client</a>
133
+
134
+ <li><a href="../../Rhc/Rest/ClientErrorException.html">Rhc::Rest::ClientErrorException</a>
135
+
136
+ <li><a href="../../Rhc/Rest/Domain.html">Rhc::Rest::Domain</a>
137
+
138
+ <li><a href="../../Rhc/Rest/Key.html">Rhc::Rest::Key</a>
139
+
140
+ <li><a href="../../Rhc/Rest/RequestDeniedException.html">Rhc::Rest::RequestDeniedException</a>
141
+
142
+ <li><a href="../../Rhc/Rest/ResourceAccessException.html">Rhc::Rest::ResourceAccessException</a>
143
+
144
+ <li><a href="../../Rhc/Rest/ResourceNotFoundException.html">Rhc::Rest::ResourceNotFoundException</a>
145
+
146
+ <li><a href="../../Rhc/Rest/ServerErrorException.html">Rhc::Rest::ServerErrorException</a>
147
+
148
+ <li><a href="../../Rhc/Rest/ServiceUnavailableException.html">Rhc::Rest::ServiceUnavailableException</a>
149
+
150
+ <li><a href="../../Rhc/Rest/UnAuthorizedException.html">Rhc::Rest::UnAuthorizedException</a>
151
+
152
+ <li><a href="../../Rhc/Rest/User.html">Rhc::Rest::User</a>
153
+
154
+ <li><a href="../../Rhc/Rest/ValidationException.html">Rhc::Rest::ValidationException</a>
155
+
156
+ </ul>
157
+ </nav>
158
+
159
+ </div>
160
+ </nav>
161
+
162
+ <div id="documentation">
163
+ <h1 class="class">class Rhc::Rest::Domain</h1>
164
+
165
+ <div id="description" class="description">
166
+
167
+ </div><!-- description -->
168
+
169
+
170
+
171
+
172
+ <section id="5Buntitled-5D" class="documentation-section">
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <!-- Attributes -->
181
+ <section id="attribute-method-details" class="method-section section">
182
+ <h3 class="section-header">Attributes</h3>
183
+
184
+
185
+ <div id="attribute-i-namespace" class="method-detail">
186
+ <div class="method-heading attribute-method-heading">
187
+ <span class="method-name">namespace</span><span
188
+ class="attribute-access-type">[R]</span>
189
+ </div>
190
+
191
+ <div class="method-description">
192
+
193
+
194
+
195
+ </div>
196
+ </div>
197
+
198
+ </section><!-- attribute-method-details -->
199
+
200
+
201
+ <!-- Methods -->
202
+
203
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
204
+ <h3 class="section-header">Public Class Methods</h3>
205
+
206
+
207
+ <div id="method-c-new" class="method-detail ">
208
+
209
+ <div class="method-heading">
210
+ <span class="method-name">new</span><span
211
+ class="method-args">(args)</span>
212
+ <span class="method-click-advice">click to toggle source</span>
213
+ </div>
214
+
215
+
216
+ <div class="method-description">
217
+
218
+
219
+
220
+
221
+
222
+ <div class="method-source-code" id="new-source">
223
+ <pre><span class="ruby-comment"># File lib/rhc-rest/domain.rb, line 28</span>
224
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
225
+ <span class="ruby-ivar">@namespace</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:namespace</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">args</span>[<span class="ruby-string">&quot;namespace&quot;</span>]
226
+ <span class="ruby-ivar">@links</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:links</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">args</span>[<span class="ruby-string">&quot;links&quot;</span>]
227
+ <span class="ruby-keyword">end</span></pre>
228
+ </div><!-- new-source -->
229
+
230
+ </div>
231
+
232
+
233
+
234
+
235
+ </div><!-- new-method -->
236
+
237
+
238
+ </section><!-- public-class-method-details -->
239
+
240
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
241
+ <h3 class="section-header">Public Instance Methods</h3>
242
+
243
+
244
+ <div id="method-i-add_application" class="method-detail ">
245
+
246
+ <div class="method-heading">
247
+ <span class="method-name">add_application</span><span
248
+ class="method-args">(name, cartridge)</span>
249
+ <span class="method-click-advice">click to toggle source</span>
250
+ </div>
251
+
252
+
253
+ <div class="method-description">
254
+
255
+ <p>Add <a href="Application.html">Application</a> to this domain</p>
256
+
257
+
258
+
259
+ <div class="method-source-code" id="add_application-source">
260
+ <pre><span class="ruby-comment"># File lib/rhc-rest/domain.rb, line 34</span>
261
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">add_application</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">cartridge</span>)
262
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;Adding application #{name} to domain #{self.namespace}&quot;</span>
263
+ <span class="ruby-identifier">url</span> = <span class="ruby-identifier">@@end_point</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@links</span>[<span class="ruby-string">'ADD_APPLICATION'</span>][<span class="ruby-string">'href'</span>]
264
+ <span class="ruby-identifier">method</span> = <span class="ruby-ivar">@links</span>[<span class="ruby-string">'ADD_APPLICATION'</span>][<span class="ruby-string">'method'</span>]
265
+ <span class="ruby-identifier">payload</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">:cartridge</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">cartridge</span>}
266
+ <span class="ruby-identifier">request</span> = <span class="ruby-constant">RestClient</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">url</span>, <span class="ruby-value">:method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">method</span>, <span class="ruby-value">:headers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">@@headers</span>, <span class="ruby-value">:payload</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">payload</span>)
267
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request</span>)
268
+ <span class="ruby-keyword">end</span></pre>
269
+ </div><!-- add_application-source -->
270
+
271
+ </div>
272
+
273
+
274
+
275
+
276
+ </div><!-- add_application-method -->
277
+
278
+
279
+ <div id="method-i-applications" class="method-detail ">
280
+
281
+ <div class="method-heading">
282
+ <span class="method-name">applications</span><span
283
+ class="method-args">()</span>
284
+ <span class="method-click-advice">click to toggle source</span>
285
+ </div>
286
+
287
+
288
+ <div class="method-description">
289
+
290
+ <p>Get all <a href="Application.html">Application</a> for this domain</p>
291
+
292
+
293
+
294
+ <div class="method-source-code" id="applications-source">
295
+ <pre><span class="ruby-comment"># File lib/rhc-rest/domain.rb, line 44</span>
296
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">applications</span>
297
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;Getting all applications for domain #{self.namespace}&quot;</span>
298
+ <span class="ruby-identifier">url</span> = <span class="ruby-identifier">@@end_point</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@links</span>[<span class="ruby-string">'LIST_APPLICATIONS'</span>][<span class="ruby-string">'href'</span>]
299
+ <span class="ruby-identifier">method</span> = <span class="ruby-ivar">@links</span>[<span class="ruby-string">'LIST_APPLICATIONS'</span>][<span class="ruby-string">'method'</span>]
300
+ <span class="ruby-identifier">request</span> = <span class="ruby-constant">RestClient</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">url</span>, <span class="ruby-value">:method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">method</span>, <span class="ruby-value">:headers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">@@headers</span>)
301
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request</span>)
302
+ <span class="ruby-keyword">end</span></pre>
303
+ </div><!-- applications-source -->
304
+
305
+ </div>
306
+
307
+
308
+
309
+
310
+ </div><!-- applications-method -->
311
+
312
+
313
+ <div id="method-i-delete" class="method-detail method-alias">
314
+
315
+ <div class="method-heading">
316
+ <span class="method-name">delete</span><span
317
+ class="method-args">(force=false)</span>
318
+ <span class="method-click-advice">click to toggle source</span>
319
+ </div>
320
+
321
+
322
+ <div class="method-description">
323
+
324
+
325
+
326
+
327
+
328
+ </div>
329
+
330
+
331
+
332
+
333
+ <div class="aliases">
334
+ Alias for: <a href="Domain.html#method-i-destroy">destroy</a>
335
+ </div>
336
+
337
+ </div><!-- delete-method -->
338
+
339
+
340
+ <div id="method-i-destroy" class="method-detail ">
341
+
342
+ <div class="method-heading">
343
+ <span class="method-name">destroy</span><span
344
+ class="method-args">(force=false)</span>
345
+ <span class="method-click-advice">click to toggle source</span>
346
+ </div>
347
+
348
+
349
+ <div class="method-description">
350
+
351
+ <p>Delete <a href="Domain.html">Domain</a></p>
352
+
353
+
354
+
355
+ <div class="method-source-code" id="destroy-source">
356
+ <pre><span class="ruby-comment"># File lib/rhc-rest/domain.rb, line 64</span>
357
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">force</span>=<span class="ruby-keyword">false</span>)
358
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;Deleting domain #{self.namespace}&quot;</span>
359
+ <span class="ruby-identifier">url</span> = <span class="ruby-identifier">@@end_point</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@links</span>[<span class="ruby-string">'DELETE'</span>][<span class="ruby-string">'href'</span>]
360
+ <span class="ruby-identifier">method</span> = <span class="ruby-ivar">@links</span>[<span class="ruby-string">'DELETE'</span>][<span class="ruby-string">'method'</span>]
361
+ <span class="ruby-identifier">payload</span>[<span class="ruby-value">:force</span>] = <span class="ruby-identifier">force</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">force</span>
362
+ <span class="ruby-identifier">request</span> = <span class="ruby-constant">RestClient</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">url</span>, <span class="ruby-value">:method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">method</span>, <span class="ruby-value">:headers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">@@headers</span>)
363
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request</span>)
364
+ <span class="ruby-keyword">end</span></pre>
365
+ </div><!-- destroy-source -->
366
+
367
+ </div>
368
+
369
+
370
+ <div class="aliases">
371
+ Also aliased as: <a href="Domain.html#method-i-delete">delete</a>
372
+ </div>
373
+
374
+
375
+
376
+ </div><!-- destroy-method -->
377
+
378
+
379
+ <div id="method-i-save" class="method-detail method-alias">
380
+
381
+ <div class="method-heading">
382
+ <span class="method-name">save</span><span
383
+ class="method-args">(new_namespace)</span>
384
+ <span class="method-click-advice">click to toggle source</span>
385
+ </div>
386
+
387
+
388
+ <div class="method-description">
389
+
390
+
391
+
392
+
393
+
394
+ </div>
395
+
396
+
397
+
398
+
399
+ <div class="aliases">
400
+ Alias for: <a href="Domain.html#method-i-update">update</a>
401
+ </div>
402
+
403
+ </div><!-- save-method -->
404
+
405
+
406
+ <div id="method-i-update" class="method-detail ">
407
+
408
+ <div class="method-heading">
409
+ <span class="method-name">update</span><span
410
+ class="method-args">(new_namespace)</span>
411
+ <span class="method-click-advice">click to toggle source</span>
412
+ </div>
413
+
414
+
415
+ <div class="method-description">
416
+
417
+ <p>Update <a href="Domain.html">Domain</a></p>
418
+
419
+
420
+
421
+ <div class="method-source-code" id="update-source">
422
+ <pre><span class="ruby-comment"># File lib/rhc-rest/domain.rb, line 53</span>
423
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">new_namespace</span>)
424
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;Updating domain #{self.namespace}&quot;</span>
425
+ <span class="ruby-identifier">url</span> = <span class="ruby-identifier">@@end_point</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@links</span>[<span class="ruby-string">'UPDATE'</span>][<span class="ruby-string">'href'</span>]
426
+ <span class="ruby-identifier">method</span> = <span class="ruby-ivar">@links</span>[<span class="ruby-string">'UPDATE'</span>][<span class="ruby-string">'method'</span>]
427
+ <span class="ruby-identifier">payload</span> = {<span class="ruby-value">:namespace</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">new_namespace</span>}
428
+ <span class="ruby-identifier">request</span> = <span class="ruby-constant">RestClient</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">url</span>, <span class="ruby-value">:method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">method</span>, <span class="ruby-value">:headers</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">@@headers</span>, <span class="ruby-value">:payload</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">payload</span>)
429
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">request</span>)
430
+ <span class="ruby-keyword">end</span></pre>
431
+ </div><!-- update-source -->
432
+
433
+ </div>
434
+
435
+
436
+ <div class="aliases">
437
+ Also aliased as: <a href="Domain.html#method-i-save">save</a>
438
+ </div>
439
+
440
+
441
+
442
+ </div><!-- update-method -->
443
+
444
+
445
+ </section><!-- public-instance-method-details -->
446
+
447
+ </section><!-- 5Buntitled-5D -->
448
+
449
+ </div><!-- documentation -->
450
+
451
+
452
+ <footer id="validator-badges">
453
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
454
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
455
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
456
+ </footer>
457
+