gandi_v5 0.2.0 → 0.3.0
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/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/.travis.yml +9 -0
- data/CHANGELOG.md +15 -0
- data/FUNDING.yml +10 -0
- data/README.md +7 -17
- data/gandi_v5.gemspec +3 -2
- data/lib/gandi_v5.rb +24 -10
- data/lib/gandi_v5/billing.rb +0 -2
- data/lib/gandi_v5/billing/info.rb +0 -2
- data/lib/gandi_v5/data.rb +0 -2
- data/lib/gandi_v5/data/converter.rb +0 -4
- data/lib/gandi_v5/domain.rb +159 -17
- data/lib/gandi_v5/domain/availability.rb +0 -3
- data/lib/gandi_v5/domain/availability/product.rb +0 -3
- data/lib/gandi_v5/domain/live_dns.rb +42 -0
- data/lib/gandi_v5/domain/renewal_information.rb +0 -3
- data/lib/gandi_v5/email.rb +0 -4
- data/lib/gandi_v5/email/forward.rb +108 -0
- data/lib/gandi_v5/email/mailbox.rb +0 -2
- data/lib/gandi_v5/error.rb +0 -2
- data/lib/gandi_v5/live_dns.rb +0 -4
- data/lib/gandi_v5/live_dns/domain.rb +1 -144
- data/lib/gandi_v5/live_dns/has_zone_records.rb +153 -0
- data/lib/gandi_v5/live_dns/zone.rb +1 -146
- data/lib/gandi_v5/organization.rb +28 -5
- data/lib/gandi_v5/version.rb +1 -1
- data/spec/.rubocop.yml +1 -1
- data/spec/features/domain_spec.rb +1 -1
- data/spec/fixtures/bodies/GandiV5_Billing/{info.yaml → info.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Domain/{get.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Domain/{fetch_contacts.yaml → fetch_contacts.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Domain/fetch_glue_records.yml +7 -0
- data/spec/fixtures/bodies/GandiV5_Domain/fetch_livedns.yml +6 -0
- data/spec/fixtures/bodies/GandiV5_Domain/fetch_name_servers.yml +2 -0
- data/spec/fixtures/bodies/GandiV5_Domain/{renewal_info.yaml → fetch_renewal_info.yml} +0 -3
- data/spec/fixtures/bodies/GandiV5_Domain/{restore_info.yaml → fetch_restore_info.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Domain/{list.yaml → list.yml} +1 -0
- data/spec/fixtures/bodies/GandiV5_Domain_Availability/{fetch.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Domain_TLD/{fetch.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Domain_TLD/{list.yaml → list.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Email_Forward/list.yml +6 -0
- data/spec/fixtures/bodies/GandiV5_Email_Mailbox/{get.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Email_Mailbox/{list.yaml → list.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Email_Slot/{get.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Email_Slot/{list.yaml → list.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain/{get.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain/{list.yaml → list.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone/{get.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone/{list.yaml → list.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/{fetch.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/{list.yaml → list.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Organization/{get.yaml → fetch.yml} +0 -0
- data/spec/fixtures/bodies/GandiV5_Organization/list.yml +7 -0
- data/spec/fixtures/vcr/Domain_features/List_domains.yml +2 -1
- data/spec/spec_helper.rb +2 -2
- data/spec/units/gandi_v5/billing_spec.rb +2 -2
- data/spec/units/gandi_v5/domain/availability_spec.rb +1 -1
- data/spec/units/gandi_v5/domain/live_dns_spec.rb +45 -0
- data/spec/units/gandi_v5/domain/tld_spec.rb +2 -2
- data/spec/units/gandi_v5/domain_spec.rb +241 -22
- data/spec/units/gandi_v5/email/forward_spec.rb +121 -0
- data/spec/units/gandi_v5/email/mailbox_spec.rb +3 -3
- data/spec/units/gandi_v5/email/slot_spec.rb +3 -3
- data/spec/units/gandi_v5/live_dns/domain_spec.rb +3 -3
- data/spec/units/gandi_v5/live_dns/zone/snapshot_spec.rb +2 -2
- data/spec/units/gandi_v5/live_dns/zone_spec.rb +2 -2
- data/spec/units/gandi_v5/organization_spec.rb +38 -1
- metadata +51 -77
- data/doc/GandiV5.html +0 -1183
- data/doc/GandiV5/Billing.html +0 -293
- data/doc/GandiV5/Billing/Info.html +0 -641
- data/doc/GandiV5/Billing/Info/Prepaid.html +0 -817
- data/doc/GandiV5/Data.html +0 -785
- data/doc/GandiV5/Data/ClassMethods.html +0 -223
- data/doc/GandiV5/Data/Converter.html +0 -433
- data/doc/GandiV5/Data/Converter/ArrayOf.html +0 -413
- data/doc/GandiV5/Data/Converter/Symbol.html +0 -322
- data/doc/GandiV5/Data/Converter/Time.html +0 -330
- data/doc/GandiV5/Domain.html +0 -16847
- data/doc/GandiV5/Domain/AutoRenew.html +0 -1237
- data/doc/GandiV5/Domain/Availability.html +0 -1020
- data/doc/GandiV5/Domain/Availability/Product.html +0 -988
- data/doc/GandiV5/Domain/Availability/Product/Period.html +0 -220
- data/doc/GandiV5/Domain/Availability/Product/Price.html +0 -1031
- data/doc/GandiV5/Domain/Availability/Tax.html +0 -440
- data/doc/GandiV5/Domain/Contact.html +0 -4459
- data/doc/GandiV5/Domain/Contract.html +0 -520
- data/doc/GandiV5/Domain/Dates.html +0 -1313
- data/doc/GandiV5/Domain/RenewalInformation.html +0 -1147
- data/doc/GandiV5/Domain/RestoreInformation.html +0 -339
- data/doc/GandiV5/Domain/SharingSpace.html +0 -437
- data/doc/GandiV5/Domain/TLD.html +0 -1565
- data/doc/GandiV5/Email.html +0 -144
- data/doc/GandiV5/Email/Mailbox.html +0 -6307
- data/doc/GandiV5/Email/Mailbox/Responder.html +0 -1560
- data/doc/GandiV5/Email/Offer.html +0 -514
- data/doc/GandiV5/Email/Slot.html +0 -4244
- data/doc/GandiV5/Error.html +0 -151
- data/doc/GandiV5/Error/GandiError.html +0 -270
- data/doc/GandiV5/LiveDNS.html +0 -300
- data/doc/GandiV5/LiveDNS/Domain.html +0 -2984
- data/doc/GandiV5/LiveDNS/RecordSet.html +0 -1593
- data/doc/GandiV5/LiveDNS/Zone.html +0 -8891
- data/doc/GandiV5/LiveDNS/Zone/Snapshot.html +0 -1556
- data/doc/GandiV5/Organization.html +0 -2341
- data/doc/_index.html +0 -474
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -496
- data/doc/file.README.html +0 -175
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -175
- data/doc/js/app.js +0 -303
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -2427
- data/doc/top-level-namespace.html +0 -110
@@ -1,2984 +0,0 @@
|
|
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: GandiV5::LiveDNS::Domain
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.19
|
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 = "GandiV5::LiveDNS::Domain";
|
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 (D)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span> » <span class='title'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Domain</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: GandiV5::LiveDNS::Domain
|
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">GandiV5::LiveDNS::Domain</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
<dl>
|
91
|
-
<dt>Includes:</dt>
|
92
|
-
<dd><span class='object_link'><a href="../Data.html" title="GandiV5::Data (module)">Data</a></span></dd>
|
93
|
-
</dl>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<dl>
|
101
|
-
<dt>Defined in:</dt>
|
102
|
-
<dd>lib/gandi_v5/live_dns/domain.rb</dd>
|
103
|
-
</dl>
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
<h2>Overview</h2><div class="docstring">
|
108
|
-
<div class="discussion">
|
109
|
-
|
110
|
-
<p>A domain name within the LiveDNS system.</p>
|
111
|
-
|
112
|
-
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
<div class="tags">
|
116
|
-
|
117
|
-
|
118
|
-
</div>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
123
|
-
<ul class="summary">
|
124
|
-
|
125
|
-
<li class="public ">
|
126
|
-
<span class="summary_signature">
|
127
|
-
|
128
|
-
<a href="#fqdn-instance_method" title="#fqdn (instance method)">#<strong>fqdn</strong> ⇒ String </a>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
</span>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
<span class="note title readonly">readonly</span>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
148
|
-
|
149
|
-
</li>
|
150
|
-
|
151
|
-
|
152
|
-
<li class="public ">
|
153
|
-
<span class="summary_signature">
|
154
|
-
|
155
|
-
<a href="#zone_uuid-instance_method" title="#zone_uuid (instance method)">#<strong>zone_uuid</strong> ⇒ String </a>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
</span>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<span class="note title readonly">readonly</span>
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
175
|
-
|
176
|
-
</li>
|
177
|
-
|
178
|
-
|
179
|
-
</ul>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
<h2>
|
186
|
-
Class Method Summary
|
187
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
188
|
-
</h2>
|
189
|
-
|
190
|
-
<ul class="summary">
|
191
|
-
|
192
|
-
<li class="public ">
|
193
|
-
<span class="summary_signature">
|
194
|
-
|
195
|
-
<a href="#fetch-class_method" title="fetch (class method)">.<strong>fetch</strong>(fqdn) ⇒ GandiV5::LiveDNS::Domain </a>
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
</span>
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
<span class="summary_desc"><div class='inline'>
|
210
|
-
<p>Get a domain.</p>
|
211
|
-
</div></span>
|
212
|
-
|
213
|
-
</li>
|
214
|
-
|
215
|
-
|
216
|
-
<li class="public ">
|
217
|
-
<span class="summary_signature">
|
218
|
-
|
219
|
-
<a href="#list-class_method" title="list (class method)">.<strong>list</strong> ⇒ Array<GandiV5::LiveDNS::Domain> </a>
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
</span>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
<span class="summary_desc"><div class='inline'>
|
234
|
-
<p>List the domains.</p>
|
235
|
-
</div></span>
|
236
|
-
|
237
|
-
</li>
|
238
|
-
|
239
|
-
|
240
|
-
</ul>
|
241
|
-
|
242
|
-
<h2>
|
243
|
-
Instance Method Summary
|
244
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
245
|
-
</h2>
|
246
|
-
|
247
|
-
<ul class="summary">
|
248
|
-
|
249
|
-
<li class="public ">
|
250
|
-
<span class="summary_signature">
|
251
|
-
|
252
|
-
<a href="#add_record-instance_method" title="#add_record (instance method)">#<strong>add_record</strong>(name, type, ttl, *values) ⇒ String </a>
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
</span>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
<span class="summary_desc"><div class='inline'>
|
267
|
-
<p>Add record to this domain.</p>
|
268
|
-
</div></span>
|
269
|
-
|
270
|
-
</li>
|
271
|
-
|
272
|
-
|
273
|
-
<li class="public ">
|
274
|
-
<span class="summary_signature">
|
275
|
-
|
276
|
-
<a href="#change_zone-instance_method" title="#change_zone (instance method)">#<strong>change_zone</strong>(uuid) ⇒ String </a>
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
</span>
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
<span class="summary_desc"><div class='inline'>
|
291
|
-
<p>Change the zone used by this domain.</p>
|
292
|
-
</div></span>
|
293
|
-
|
294
|
-
</li>
|
295
|
-
|
296
|
-
|
297
|
-
<li class="public ">
|
298
|
-
<span class="summary_signature">
|
299
|
-
|
300
|
-
<a href="#delete_records-instance_method" title="#delete_records (instance method)">#<strong>delete_records</strong>(name = nil, type = nil) ⇒ nil </a>
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
</span>
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
315
|
-
|
316
|
-
</li>
|
317
|
-
|
318
|
-
|
319
|
-
<li class="public ">
|
320
|
-
<span class="summary_signature">
|
321
|
-
|
322
|
-
<a href="#fetch_records-instance_method" title="#fetch_records (instance method)">#<strong>fetch_records</strong>(name = nil, type = nil) ⇒ Array<GandiV5::LiveDNS::RecordSet> </a>
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
</span>
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
337
|
-
|
338
|
-
</li>
|
339
|
-
|
340
|
-
|
341
|
-
<li class="public ">
|
342
|
-
<span class="summary_signature">
|
343
|
-
|
344
|
-
<a href="#fetch_zone-instance_method" title="#fetch_zone (instance method)">#<strong>fetch_zone</strong> ⇒ GandiV5::LiveDNS::Zone </a>
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
</span>
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
<span class="summary_desc"><div class='inline'>
|
359
|
-
<p>Get the domain's zone from Gandi.</p>
|
360
|
-
</div></span>
|
361
|
-
|
362
|
-
</li>
|
363
|
-
|
364
|
-
|
365
|
-
<li class="public ">
|
366
|
-
<span class="summary_signature">
|
367
|
-
|
368
|
-
<a href="#fetch_zone_lines-instance_method" title="#fetch_zone_lines (instance method)">#<strong>fetch_zone_lines</strong>(name = nil, type = nil) ⇒ String </a>
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
</span>
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
383
|
-
|
384
|
-
</li>
|
385
|
-
|
386
|
-
|
387
|
-
<li class="public ">
|
388
|
-
<span class="summary_signature">
|
389
|
-
|
390
|
-
<a href="#refresh-instance_method" title="#refresh (instance method)">#<strong>refresh</strong> ⇒ GandiV5::LiveDNS::Domain </a>
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
</span>
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
<span class="summary_desc"><div class='inline'>
|
405
|
-
<p>Refetch the information for this domain from Gandi.</p>
|
406
|
-
</div></span>
|
407
|
-
|
408
|
-
</li>
|
409
|
-
|
410
|
-
|
411
|
-
<li class="public ">
|
412
|
-
<span class="summary_signature">
|
413
|
-
|
414
|
-
<a href="#replace_records-instance_method" title="#replace_records (instance method)">#<strong>replace_records</strong>(records: nil, text: nil) ⇒ String </a>
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
</span>
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
<span class="summary_desc"><div class='inline'>
|
429
|
-
<p>Replace all records for this domain.</p>
|
430
|
-
</div></span>
|
431
|
-
|
432
|
-
</li>
|
433
|
-
|
434
|
-
|
435
|
-
<li class="public ">
|
436
|
-
<span class="summary_signature">
|
437
|
-
|
438
|
-
<a href="#replace_records_for-instance_method" title="#replace_records_for (instance method)">#<strong>replace_records_for</strong>(name, records, type: nil, ttl: nil) ⇒ String </a>
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
</span>
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
<span class="summary_desc"><div class='inline'>
|
453
|
-
<p>The confirmation message from Gandi.</p>
|
454
|
-
</div></span>
|
455
|
-
|
456
|
-
</li>
|
457
|
-
|
458
|
-
|
459
|
-
<li class="public ">
|
460
|
-
<span class="summary_signature">
|
461
|
-
|
462
|
-
<a href="#zone-instance_method" title="#zone (instance method)">#<strong>zone</strong> ⇒ GandiV5::LiveDNS::Zone </a>
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
</span>
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
<span class="summary_desc"><div class='inline'>
|
477
|
-
<p>The domain's zone (fetching from Gandi if required).</p>
|
478
|
-
</div></span>
|
479
|
-
|
480
|
-
</li>
|
481
|
-
|
482
|
-
|
483
|
-
</ul>
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Data.html" title="GandiV5::Data (module)">Data</a></span></h3>
|
496
|
-
<p class="inherited"><span class='object_link'><a href="../Data.html#from_gandi-instance_method" title="GandiV5::Data#from_gandi (method)">#from_gandi</a></span>, <span class='object_link'><a href="../Data.html#included-class_method" title="GandiV5::Data.included (method)">included</a></span>, <span class='object_link'><a href="../Data.html#initialize-instance_method" title="GandiV5::Data#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Data.html#to_gandi-instance_method" title="GandiV5::Data#to_gandi (method)">#to_gandi</a></span>, <span class='object_link'><a href="../Data.html#to_h-instance_method" title="GandiV5::Data#to_h (method)">#to_h</a></span>, <span class='object_link'><a href="../Data.html#values_at-instance_method" title="GandiV5::Data#values_at (method)">#values_at</a></span></p>
|
497
|
-
|
498
|
-
<div id="instance_attr_details" class="attr_details">
|
499
|
-
<h2>Instance Attribute Details</h2>
|
500
|
-
|
501
|
-
|
502
|
-
<span id=""></span>
|
503
|
-
<div class="method_details first">
|
504
|
-
<h3 class="signature first" id="fqdn-instance_method">
|
505
|
-
|
506
|
-
#<strong>fqdn</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span>
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
</h3><div class="docstring">
|
513
|
-
<div class="discussion">
|
514
|
-
|
515
|
-
|
516
|
-
</div>
|
517
|
-
</div>
|
518
|
-
<div class="tags">
|
519
|
-
|
520
|
-
<p class="tag_title">Returns:</p>
|
521
|
-
<ul class="return">
|
522
|
-
|
523
|
-
<li>
|
524
|
-
|
525
|
-
|
526
|
-
<span class='type'>(<tt>String</tt>)</span>
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
</li>
|
531
|
-
|
532
|
-
</ul>
|
533
|
-
|
534
|
-
</div><table class="source_code">
|
535
|
-
<tr>
|
536
|
-
<td>
|
537
|
-
<pre class="lines">
|
538
|
-
|
539
|
-
|
540
|
-
10
|
541
|
-
11
|
542
|
-
12
|
543
|
-
13
|
544
|
-
14
|
545
|
-
15
|
546
|
-
16
|
547
|
-
17
|
548
|
-
18
|
549
|
-
19
|
550
|
-
20
|
551
|
-
21
|
552
|
-
22
|
553
|
-
23
|
554
|
-
24
|
555
|
-
25
|
556
|
-
26
|
557
|
-
27
|
558
|
-
28
|
559
|
-
29
|
560
|
-
30
|
561
|
-
31
|
562
|
-
32
|
563
|
-
33
|
564
|
-
34
|
565
|
-
35
|
566
|
-
36
|
567
|
-
37
|
568
|
-
38
|
569
|
-
39
|
570
|
-
40
|
571
|
-
41
|
572
|
-
42
|
573
|
-
43
|
574
|
-
44
|
575
|
-
45
|
576
|
-
46
|
577
|
-
47
|
578
|
-
48
|
579
|
-
49
|
580
|
-
50
|
581
|
-
51
|
582
|
-
52
|
583
|
-
53
|
584
|
-
54
|
585
|
-
55
|
586
|
-
56
|
587
|
-
57
|
588
|
-
58
|
589
|
-
59
|
590
|
-
60
|
591
|
-
61
|
592
|
-
62
|
593
|
-
63
|
594
|
-
64
|
595
|
-
65
|
596
|
-
66
|
597
|
-
67
|
598
|
-
68
|
599
|
-
69
|
600
|
-
70
|
601
|
-
71
|
602
|
-
72
|
603
|
-
73
|
604
|
-
74
|
605
|
-
75
|
606
|
-
76
|
607
|
-
77
|
608
|
-
78
|
609
|
-
79
|
610
|
-
80
|
611
|
-
81
|
612
|
-
82
|
613
|
-
83
|
614
|
-
84
|
615
|
-
85
|
616
|
-
86
|
617
|
-
87
|
618
|
-
88
|
619
|
-
89
|
620
|
-
90
|
621
|
-
91
|
622
|
-
92
|
623
|
-
93
|
624
|
-
94
|
625
|
-
95
|
626
|
-
96
|
627
|
-
97
|
628
|
-
98
|
629
|
-
99
|
630
|
-
100
|
631
|
-
101
|
632
|
-
102
|
633
|
-
103
|
634
|
-
104
|
635
|
-
105
|
636
|
-
106
|
637
|
-
107
|
638
|
-
108
|
639
|
-
109
|
640
|
-
110
|
641
|
-
111
|
642
|
-
112
|
643
|
-
113
|
644
|
-
114
|
645
|
-
115
|
646
|
-
116
|
647
|
-
117
|
648
|
-
118
|
649
|
-
119
|
650
|
-
120
|
651
|
-
121
|
652
|
-
122
|
653
|
-
123
|
654
|
-
124
|
655
|
-
125
|
656
|
-
126
|
657
|
-
127
|
658
|
-
128
|
659
|
-
129
|
660
|
-
130
|
661
|
-
131
|
662
|
-
132
|
663
|
-
133
|
664
|
-
134
|
665
|
-
135
|
666
|
-
136
|
667
|
-
137
|
668
|
-
138
|
669
|
-
139
|
670
|
-
140
|
671
|
-
141
|
672
|
-
142
|
673
|
-
143
|
674
|
-
144
|
675
|
-
145
|
676
|
-
146
|
677
|
-
147
|
678
|
-
148
|
679
|
-
149
|
680
|
-
150
|
681
|
-
151
|
682
|
-
152
|
683
|
-
153
|
684
|
-
154
|
685
|
-
155
|
686
|
-
156
|
687
|
-
157
|
688
|
-
158
|
689
|
-
159
|
690
|
-
160
|
691
|
-
161
|
692
|
-
162
|
693
|
-
163
|
694
|
-
164
|
695
|
-
165
|
696
|
-
166
|
697
|
-
167
|
698
|
-
168
|
699
|
-
169
|
700
|
-
170
|
701
|
-
171
|
702
|
-
172
|
703
|
-
173
|
704
|
-
174
|
705
|
-
175
|
706
|
-
176
|
707
|
-
177
|
708
|
-
178
|
709
|
-
179
|
710
|
-
180
|
711
|
-
181
|
712
|
-
182
|
713
|
-
183
|
714
|
-
184
|
715
|
-
185
|
716
|
-
186
|
717
|
-
187
|
718
|
-
188
|
719
|
-
189
|
720
|
-
190
|
721
|
-
191
|
722
|
-
192
|
723
|
-
193
|
724
|
-
194
|
725
|
-
195
|
726
|
-
196
|
727
|
-
197
|
728
|
-
198
|
729
|
-
199
|
730
|
-
200
|
731
|
-
201
|
732
|
-
202
|
733
|
-
203
|
734
|
-
204
|
735
|
-
205
|
736
|
-
206
|
737
|
-
207
|
738
|
-
208
|
739
|
-
209
|
740
|
-
210
|
741
|
-
211
|
742
|
-
212
|
743
|
-
213
|
744
|
-
214
|
745
|
-
215
|
746
|
-
216
|
747
|
-
217
|
748
|
-
218
|
749
|
-
219
|
750
|
-
220
|
751
|
-
221
|
752
|
-
222
|
753
|
-
223
|
754
|
-
224
|
755
|
-
225</pre>
|
756
|
-
</td>
|
757
|
-
<td>
|
758
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 10</span>
|
759
|
-
|
760
|
-
<span class='kw'>class</span> <span class='const'><span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">Domain</a></span></span>
|
761
|
-
<span class='id identifier rubyid_include'>include</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Data.html" title="GandiV5::Data (module)">Data</a></span></span>
|
762
|
-
|
763
|
-
<span class='id identifier rubyid_members'>members</span> <span class='symbol'>:fqdn</span>
|
764
|
-
|
765
|
-
<span class='id identifier rubyid_member'>member</span><span class='lparen'>(</span>
|
766
|
-
<span class='symbol'>:zone_uuid</span><span class='comma'>,</span>
|
767
|
-
<span class='label'>gandi_key:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>zone</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
768
|
-
<span class='label'>converter:</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Data.html" title="GandiV5::Data (module)">Data</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Data/Converter.html" title="GandiV5::Data::Converter (class)">Converter</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Data/Converter.html#initialize-instance_method" title="GandiV5::Data::Converter#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>from_gandi:</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_zone'>zone</span><span class='op'>&.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='op'>&.</span><span class='id identifier rubyid_last'>last</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
769
|
-
<span class='rparen'>)</span>
|
770
|
-
|
771
|
-
<span class='comment'># Refetch the information for this domain from Gandi.
|
772
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Domain]
|
773
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
774
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_refresh'>refresh</span>
|
775
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span>
|
776
|
-
<span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_data'>data</span>
|
777
|
-
<span class='kw'>end</span>
|
778
|
-
|
779
|
-
<span class='comment'># @overload fetch_records()
|
780
|
-
</span> <span class='comment'># Fetch all records for this domain.
|
781
|
-
</span> <span class='comment'># @overload fetch_records(name)
|
782
|
-
</span> <span class='comment'># Fetch records for a name.
|
783
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
784
|
-
</span> <span class='comment'># @overload fetch_records(name, type)
|
785
|
-
</span> <span class='comment'># Fetch records of a type for a name.
|
786
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
787
|
-
</span> <span class='comment'># @param type [String] the record type to fetch.
|
788
|
-
</span> <span class='comment'># @return [Array<GandiV5::LiveDNS::RecordSet>]
|
789
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
790
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_records'>fetch_records</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
791
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
792
|
-
|
793
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
794
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
795
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
796
|
-
|
797
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url_'>url_</span>
|
798
|
-
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_data'>data</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
799
|
-
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">RecordSet</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_gandi'><span class='object_link'><a href="../Data.html#from_gandi-instance_method" title="GandiV5::Data#from_gandi (method)">from_gandi</a></span></span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
|
800
|
-
<span class='kw'>end</span>
|
801
|
-
|
802
|
-
<span class='comment'># @overload fetch_zone_lines()
|
803
|
-
</span> <span class='comment'># Fetch all records for this domain.
|
804
|
-
</span> <span class='comment'># @overload fetch_zone_lines(name)
|
805
|
-
</span> <span class='comment'># Fetch records for a name.
|
806
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
807
|
-
</span> <span class='comment'># @overload fetch_zone_lines(name, type)
|
808
|
-
</span> <span class='comment'># Fetch records of a type for a name.
|
809
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
810
|
-
</span> <span class='comment'># @param type [String] the record type to fetch.
|
811
|
-
</span> <span class='comment'># @return [String]
|
812
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
813
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_zone_lines'>fetch_zone_lines</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
814
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
815
|
-
|
816
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
817
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
818
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
819
|
-
|
820
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url_'>url_</span><span class='comma'>,</span> <span class='label'>accept:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
821
|
-
<span class='kw'>end</span>
|
822
|
-
|
823
|
-
<span class='comment'># Add record to this domain.
|
824
|
-
</span> <span class='comment'># @param name [String]
|
825
|
-
</span> <span class='comment'># @param type [String]
|
826
|
-
</span> <span class='comment'># @param ttl [Integer]
|
827
|
-
</span> <span class='comment'># @param values [Array<String>]
|
828
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
829
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
830
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_add_record'>add_record</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
831
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span>
|
832
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ttl must be positive and non-zero</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
833
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>there must be at least one value</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_none?'>none?</span>
|
834
|
-
|
835
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
836
|
-
<span class='label'>rrset_name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
837
|
-
<span class='label'>rrset_type:</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
838
|
-
<span class='label'>rrset_ttl:</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='comma'>,</span>
|
839
|
-
<span class='label'>rrset_values:</span> <span class='id identifier rubyid_values'>values</span>
|
840
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
841
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_post'><span class='object_link'><a href="../../GandiV5.html#post-class_method" title="GandiV5.post (method)">post</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span>
|
842
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
843
|
-
<span class='kw'>end</span>
|
844
|
-
|
845
|
-
<span class='comment'># @overload delete_records()
|
846
|
-
</span> <span class='comment'># Delete all records for this domain.
|
847
|
-
</span> <span class='comment'># @overload delete_records(name)
|
848
|
-
</span> <span class='comment'># Delete records for a name.
|
849
|
-
</span> <span class='comment'># @param name [String] the name to delete records for.
|
850
|
-
</span> <span class='comment'># @overload delete_records(name, type)
|
851
|
-
</span> <span class='comment'># Delete records of a type for a name.
|
852
|
-
</span> <span class='comment'># @param name [String] the name to delete records for.
|
853
|
-
</span> <span class='comment'># @param type [String] the record type to delete.
|
854
|
-
</span> <span class='comment'># @return [nil]
|
855
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
856
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_records'>delete_records</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
857
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
858
|
-
|
859
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
860
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
861
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
862
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_delete'><span class='object_link'><a href="../../GandiV5.html#delete-class_method" title="GandiV5.delete (method)">delete</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url_'>url_</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
863
|
-
<span class='kw'>end</span>
|
864
|
-
|
865
|
-
<span class='comment'># Replace all records for this domain.
|
866
|
-
</span> <span class='comment'># @param records
|
867
|
-
</span> <span class='comment'># [Array<Hash<:name, :type => String, :ttl => Integer, :values => Array<String>>>]
|
868
|
-
</span> <span class='comment'># the records to add.
|
869
|
-
</span> <span class='comment'># @param text [String] zone file lines to replace the records with.
|
870
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
871
|
-
</span> <span class='comment'># @raise [ArgumentError] if neither/both of records & test are passed.
|
872
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
873
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_replace_records'>replace_records</span><span class='lparen'>(</span><span class='label'>records:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>text:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
874
|
-
<span class='kw'>unless</span> <span class='lbracket'>[</span><span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:nil?</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
|
875
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>you must pass ONE of records: or text:</span><span class='tstring_end'>'</span></span>
|
876
|
-
<span class='kw'>end</span>
|
877
|
-
|
878
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_records'>records</span>
|
879
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
880
|
-
<span class='label'>items:</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rrset_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
881
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
882
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span>
|
883
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_text'>text</span>
|
884
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>content-type</span><span class='label_end'>':</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>'</span></span>
|
885
|
-
<span class='kw'>end</span>
|
886
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
887
|
-
<span class='kw'>end</span>
|
888
|
-
|
889
|
-
<span class='comment'># @override replace_records_for(name, records)
|
890
|
-
</span> <span class='comment'># Replace records for a name in this domain.
|
891
|
-
</span> <span class='comment'># @param name [String]
|
892
|
-
</span> <span class='comment'># @param records
|
893
|
-
</span> <span class='comment'># [Array<Hash<type: String, ttl: Integer, values: Array<String>>>]
|
894
|
-
</span> <span class='comment'># the records to add.
|
895
|
-
</span> <span class='comment'># @override replace_records_for(name, values, type: nil, ttl: nil)
|
896
|
-
</span> <span class='comment'># Replace records for a name in this domain.
|
897
|
-
</span> <span class='comment'># @param name [String]
|
898
|
-
</span> <span class='comment'># @param type [String] the record type.
|
899
|
-
</span> <span class='comment'># @param ttl [Integer] the TTL to set for the record.
|
900
|
-
</span> <span class='comment'># @param values [Array<String>] the values to set for the record.
|
901
|
-
</span> <span class='comment'># @raise [ArgumentError] if ttl is present and type is absent.
|
902
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
903
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
904
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_replace_records_for'>replace_records_for</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>ttl:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
905
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>missing keyword: type</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>&&</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
906
|
-
|
907
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
908
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span>
|
909
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>rrset_values:</span> <span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='label'>rrset_ttl:</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='rbrace'>}</span>
|
910
|
-
<span class='comment'># body[:rrset_ttl] = ttl if ttl
|
911
|
-
</span> <span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
912
|
-
|
913
|
-
<span class='kw'>else</span>
|
914
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
915
|
-
<span class='label'>items:</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rrset_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
916
|
-
<span class='rbrace'>}</span>
|
917
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
918
|
-
<span class='kw'>end</span>
|
919
|
-
|
920
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
921
|
-
<span class='kw'>end</span>
|
922
|
-
|
923
|
-
<span class='comment'># Change the zone used by this domain.
|
924
|
-
</span> <span class='comment'># @param uuid [String, #uuid, #to_s] the UUID of the zone this domain should now use.
|
925
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
926
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
927
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_change_zone'>change_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_uuid'>uuid</span><span class='rparen'>)</span>
|
928
|
-
<span class='id identifier rubyid_uuid'>uuid</span> <span class='op'>=</span> <span class='id identifier rubyid_uuid'>uuid</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span> <span class='kw'>if</span> <span class='id identifier rubyid_uuid'>uuid</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:uuid</span><span class='rparen'>)</span>
|
929
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_patch'><span class='object_link'><a href="../../GandiV5.html#patch-class_method" title="GandiV5.patch (method)">patch</a></span></span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>zone_uuid:</span> <span class='id identifier rubyid_uuid'>uuid</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
930
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_zone_uuid'>zone_uuid</span> <span class='op'>=</span> <span class='id identifier rubyid_uuid'>uuid</span>
|
931
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
932
|
-
<span class='kw'>end</span>
|
933
|
-
|
934
|
-
<span class='comment'># Get the domain's zone from Gandi.
|
935
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Zone]
|
936
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
937
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_zone'>fetch_zone</span>
|
938
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">Zone</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fetch'><span class='object_link'><a href="Zone.html#fetch-class_method" title="GandiV5::LiveDNS::Zone.fetch (method)">fetch</a></span></span> <span class='id identifier rubyid_zone_uuid'>zone_uuid</span>
|
939
|
-
<span class='kw'>end</span>
|
940
|
-
|
941
|
-
<span class='comment'># The domain's zone (fetching from Gandi if required).
|
942
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Zone]
|
943
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
944
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_zone'>zone</span>
|
945
|
-
<span class='ivar'>@zone</span> <span class='op'>||=</span> <span class='id identifier rubyid_fetch_zone'>fetch_zone</span>
|
946
|
-
<span class='kw'>end</span>
|
947
|
-
|
948
|
-
<span class='comment'># List the domains.
|
949
|
-
</span> <span class='comment'># @return [Array<GandiV5::LiveDNS::Domain>]
|
950
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
951
|
-
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span>
|
952
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span>
|
953
|
-
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
|
954
|
-
<span class='kw'>end</span>
|
955
|
-
|
956
|
-
<span class='comment'># Get a domain.
|
957
|
-
</span> <span class='comment'># @param fqdn [String, #to_s] the fully qualified domain name to fetch.
|
958
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Domain]
|
959
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
960
|
-
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span>
|
961
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span>
|
962
|
-
<span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_data'>data</span>
|
963
|
-
<span class='kw'>end</span>
|
964
|
-
|
965
|
-
<span class='id identifier rubyid_private'>private</span>
|
966
|
-
|
967
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
968
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../LiveDNS.html#BASE-constant" title="GandiV5::LiveDNS::BASE (constant)">BASE</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>domains/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
969
|
-
<span class='kw'>end</span>
|
970
|
-
|
971
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
972
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../LiveDNS.html#BASE-constant" title="GandiV5::LiveDNS::BASE (constant)">BASE</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>domains</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
973
|
-
<span class='kw'>end</span>
|
974
|
-
<span class='id identifier rubyid_private_class_method'>private_class_method</span> <span class='symbol'>:url</span>
|
975
|
-
<span class='kw'>end</span></pre>
|
976
|
-
</td>
|
977
|
-
</tr>
|
978
|
-
</table>
|
979
|
-
</div>
|
980
|
-
|
981
|
-
|
982
|
-
<span id=""></span>
|
983
|
-
<div class="method_details ">
|
984
|
-
<h3 class="signature " id="zone_uuid-instance_method">
|
985
|
-
|
986
|
-
#<strong>zone_uuid</strong> ⇒ <tt>String</tt> <span class="extras">(readonly)</span>
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
</h3><div class="docstring">
|
993
|
-
<div class="discussion">
|
994
|
-
|
995
|
-
|
996
|
-
</div>
|
997
|
-
</div>
|
998
|
-
<div class="tags">
|
999
|
-
|
1000
|
-
<p class="tag_title">Returns:</p>
|
1001
|
-
<ul class="return">
|
1002
|
-
|
1003
|
-
<li>
|
1004
|
-
|
1005
|
-
|
1006
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
</li>
|
1011
|
-
|
1012
|
-
</ul>
|
1013
|
-
|
1014
|
-
</div><table class="source_code">
|
1015
|
-
<tr>
|
1016
|
-
<td>
|
1017
|
-
<pre class="lines">
|
1018
|
-
|
1019
|
-
|
1020
|
-
10
|
1021
|
-
11
|
1022
|
-
12
|
1023
|
-
13
|
1024
|
-
14
|
1025
|
-
15
|
1026
|
-
16
|
1027
|
-
17
|
1028
|
-
18
|
1029
|
-
19
|
1030
|
-
20
|
1031
|
-
21
|
1032
|
-
22
|
1033
|
-
23
|
1034
|
-
24
|
1035
|
-
25
|
1036
|
-
26
|
1037
|
-
27
|
1038
|
-
28
|
1039
|
-
29
|
1040
|
-
30
|
1041
|
-
31
|
1042
|
-
32
|
1043
|
-
33
|
1044
|
-
34
|
1045
|
-
35
|
1046
|
-
36
|
1047
|
-
37
|
1048
|
-
38
|
1049
|
-
39
|
1050
|
-
40
|
1051
|
-
41
|
1052
|
-
42
|
1053
|
-
43
|
1054
|
-
44
|
1055
|
-
45
|
1056
|
-
46
|
1057
|
-
47
|
1058
|
-
48
|
1059
|
-
49
|
1060
|
-
50
|
1061
|
-
51
|
1062
|
-
52
|
1063
|
-
53
|
1064
|
-
54
|
1065
|
-
55
|
1066
|
-
56
|
1067
|
-
57
|
1068
|
-
58
|
1069
|
-
59
|
1070
|
-
60
|
1071
|
-
61
|
1072
|
-
62
|
1073
|
-
63
|
1074
|
-
64
|
1075
|
-
65
|
1076
|
-
66
|
1077
|
-
67
|
1078
|
-
68
|
1079
|
-
69
|
1080
|
-
70
|
1081
|
-
71
|
1082
|
-
72
|
1083
|
-
73
|
1084
|
-
74
|
1085
|
-
75
|
1086
|
-
76
|
1087
|
-
77
|
1088
|
-
78
|
1089
|
-
79
|
1090
|
-
80
|
1091
|
-
81
|
1092
|
-
82
|
1093
|
-
83
|
1094
|
-
84
|
1095
|
-
85
|
1096
|
-
86
|
1097
|
-
87
|
1098
|
-
88
|
1099
|
-
89
|
1100
|
-
90
|
1101
|
-
91
|
1102
|
-
92
|
1103
|
-
93
|
1104
|
-
94
|
1105
|
-
95
|
1106
|
-
96
|
1107
|
-
97
|
1108
|
-
98
|
1109
|
-
99
|
1110
|
-
100
|
1111
|
-
101
|
1112
|
-
102
|
1113
|
-
103
|
1114
|
-
104
|
1115
|
-
105
|
1116
|
-
106
|
1117
|
-
107
|
1118
|
-
108
|
1119
|
-
109
|
1120
|
-
110
|
1121
|
-
111
|
1122
|
-
112
|
1123
|
-
113
|
1124
|
-
114
|
1125
|
-
115
|
1126
|
-
116
|
1127
|
-
117
|
1128
|
-
118
|
1129
|
-
119
|
1130
|
-
120
|
1131
|
-
121
|
1132
|
-
122
|
1133
|
-
123
|
1134
|
-
124
|
1135
|
-
125
|
1136
|
-
126
|
1137
|
-
127
|
1138
|
-
128
|
1139
|
-
129
|
1140
|
-
130
|
1141
|
-
131
|
1142
|
-
132
|
1143
|
-
133
|
1144
|
-
134
|
1145
|
-
135
|
1146
|
-
136
|
1147
|
-
137
|
1148
|
-
138
|
1149
|
-
139
|
1150
|
-
140
|
1151
|
-
141
|
1152
|
-
142
|
1153
|
-
143
|
1154
|
-
144
|
1155
|
-
145
|
1156
|
-
146
|
1157
|
-
147
|
1158
|
-
148
|
1159
|
-
149
|
1160
|
-
150
|
1161
|
-
151
|
1162
|
-
152
|
1163
|
-
153
|
1164
|
-
154
|
1165
|
-
155
|
1166
|
-
156
|
1167
|
-
157
|
1168
|
-
158
|
1169
|
-
159
|
1170
|
-
160
|
1171
|
-
161
|
1172
|
-
162
|
1173
|
-
163
|
1174
|
-
164
|
1175
|
-
165
|
1176
|
-
166
|
1177
|
-
167
|
1178
|
-
168
|
1179
|
-
169
|
1180
|
-
170
|
1181
|
-
171
|
1182
|
-
172
|
1183
|
-
173
|
1184
|
-
174
|
1185
|
-
175
|
1186
|
-
176
|
1187
|
-
177
|
1188
|
-
178
|
1189
|
-
179
|
1190
|
-
180
|
1191
|
-
181
|
1192
|
-
182
|
1193
|
-
183
|
1194
|
-
184
|
1195
|
-
185
|
1196
|
-
186
|
1197
|
-
187
|
1198
|
-
188
|
1199
|
-
189
|
1200
|
-
190
|
1201
|
-
191
|
1202
|
-
192
|
1203
|
-
193
|
1204
|
-
194
|
1205
|
-
195
|
1206
|
-
196
|
1207
|
-
197
|
1208
|
-
198
|
1209
|
-
199
|
1210
|
-
200
|
1211
|
-
201
|
1212
|
-
202
|
1213
|
-
203
|
1214
|
-
204
|
1215
|
-
205
|
1216
|
-
206
|
1217
|
-
207
|
1218
|
-
208
|
1219
|
-
209
|
1220
|
-
210
|
1221
|
-
211
|
1222
|
-
212
|
1223
|
-
213
|
1224
|
-
214
|
1225
|
-
215
|
1226
|
-
216
|
1227
|
-
217
|
1228
|
-
218
|
1229
|
-
219
|
1230
|
-
220
|
1231
|
-
221
|
1232
|
-
222
|
1233
|
-
223
|
1234
|
-
224
|
1235
|
-
225</pre>
|
1236
|
-
</td>
|
1237
|
-
<td>
|
1238
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 10</span>
|
1239
|
-
|
1240
|
-
<span class='kw'>class</span> <span class='const'><span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">Domain</a></span></span>
|
1241
|
-
<span class='id identifier rubyid_include'>include</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Data.html" title="GandiV5::Data (module)">Data</a></span></span>
|
1242
|
-
|
1243
|
-
<span class='id identifier rubyid_members'>members</span> <span class='symbol'>:fqdn</span>
|
1244
|
-
|
1245
|
-
<span class='id identifier rubyid_member'>member</span><span class='lparen'>(</span>
|
1246
|
-
<span class='symbol'>:zone_uuid</span><span class='comma'>,</span>
|
1247
|
-
<span class='label'>gandi_key:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>zone</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1248
|
-
<span class='label'>converter:</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Data.html" title="GandiV5::Data (module)">Data</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Data/Converter.html" title="GandiV5::Data::Converter (class)">Converter</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Data/Converter.html#initialize-instance_method" title="GandiV5::Data::Converter#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>from_gandi:</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_zone'>zone</span><span class='op'>&.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='op'>&.</span><span class='id identifier rubyid_last'>last</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
1249
|
-
<span class='rparen'>)</span>
|
1250
|
-
|
1251
|
-
<span class='comment'># Refetch the information for this domain from Gandi.
|
1252
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Domain]
|
1253
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1254
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_refresh'>refresh</span>
|
1255
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span>
|
1256
|
-
<span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_data'>data</span>
|
1257
|
-
<span class='kw'>end</span>
|
1258
|
-
|
1259
|
-
<span class='comment'># @overload fetch_records()
|
1260
|
-
</span> <span class='comment'># Fetch all records for this domain.
|
1261
|
-
</span> <span class='comment'># @overload fetch_records(name)
|
1262
|
-
</span> <span class='comment'># Fetch records for a name.
|
1263
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
1264
|
-
</span> <span class='comment'># @overload fetch_records(name, type)
|
1265
|
-
</span> <span class='comment'># Fetch records of a type for a name.
|
1266
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
1267
|
-
</span> <span class='comment'># @param type [String] the record type to fetch.
|
1268
|
-
</span> <span class='comment'># @return [Array<GandiV5::LiveDNS::RecordSet>]
|
1269
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1270
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_records'>fetch_records</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1271
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1272
|
-
|
1273
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
1274
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
1275
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1276
|
-
|
1277
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url_'>url_</span>
|
1278
|
-
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_data'>data</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
1279
|
-
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">RecordSet</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_gandi'><span class='object_link'><a href="../Data.html#from_gandi-instance_method" title="GandiV5::Data#from_gandi (method)">from_gandi</a></span></span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
|
1280
|
-
<span class='kw'>end</span>
|
1281
|
-
|
1282
|
-
<span class='comment'># @overload fetch_zone_lines()
|
1283
|
-
</span> <span class='comment'># Fetch all records for this domain.
|
1284
|
-
</span> <span class='comment'># @overload fetch_zone_lines(name)
|
1285
|
-
</span> <span class='comment'># Fetch records for a name.
|
1286
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
1287
|
-
</span> <span class='comment'># @overload fetch_zone_lines(name, type)
|
1288
|
-
</span> <span class='comment'># Fetch records of a type for a name.
|
1289
|
-
</span> <span class='comment'># @param name [String] the name to fetch records for.
|
1290
|
-
</span> <span class='comment'># @param type [String] the record type to fetch.
|
1291
|
-
</span> <span class='comment'># @return [String]
|
1292
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1293
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_zone_lines'>fetch_zone_lines</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1294
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1295
|
-
|
1296
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
1297
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
1298
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1299
|
-
|
1300
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url_'>url_</span><span class='comma'>,</span> <span class='label'>accept:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
1301
|
-
<span class='kw'>end</span>
|
1302
|
-
|
1303
|
-
<span class='comment'># Add record to this domain.
|
1304
|
-
</span> <span class='comment'># @param name [String]
|
1305
|
-
</span> <span class='comment'># @param type [String]
|
1306
|
-
</span> <span class='comment'># @param ttl [Integer]
|
1307
|
-
</span> <span class='comment'># @param values [Array<String>]
|
1308
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
1309
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1310
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_add_record'>add_record</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
1311
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span>
|
1312
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ttl must be positive and non-zero</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1313
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>there must be at least one value</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_none?'>none?</span>
|
1314
|
-
|
1315
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1316
|
-
<span class='label'>rrset_name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
1317
|
-
<span class='label'>rrset_type:</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
1318
|
-
<span class='label'>rrset_ttl:</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='comma'>,</span>
|
1319
|
-
<span class='label'>rrset_values:</span> <span class='id identifier rubyid_values'>values</span>
|
1320
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1321
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_post'><span class='object_link'><a href="../../GandiV5.html#post-class_method" title="GandiV5.post (method)">post</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span>
|
1322
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1323
|
-
<span class='kw'>end</span>
|
1324
|
-
|
1325
|
-
<span class='comment'># @overload delete_records()
|
1326
|
-
</span> <span class='comment'># Delete all records for this domain.
|
1327
|
-
</span> <span class='comment'># @overload delete_records(name)
|
1328
|
-
</span> <span class='comment'># Delete records for a name.
|
1329
|
-
</span> <span class='comment'># @param name [String] the name to delete records for.
|
1330
|
-
</span> <span class='comment'># @overload delete_records(name, type)
|
1331
|
-
</span> <span class='comment'># Delete records of a type for a name.
|
1332
|
-
</span> <span class='comment'># @param name [String] the name to delete records for.
|
1333
|
-
</span> <span class='comment'># @param type [String] the record type to delete.
|
1334
|
-
</span> <span class='comment'># @return [nil]
|
1335
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1336
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_delete_records'>delete_records</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1337
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1338
|
-
|
1339
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
1340
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
1341
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1342
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_delete'><span class='object_link'><a href="../../GandiV5.html#delete-class_method" title="GandiV5.delete (method)">delete</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url_'>url_</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
1343
|
-
<span class='kw'>end</span>
|
1344
|
-
|
1345
|
-
<span class='comment'># Replace all records for this domain.
|
1346
|
-
</span> <span class='comment'># @param records
|
1347
|
-
</span> <span class='comment'># [Array<Hash<:name, :type => String, :ttl => Integer, :values => Array<String>>>]
|
1348
|
-
</span> <span class='comment'># the records to add.
|
1349
|
-
</span> <span class='comment'># @param text [String] zone file lines to replace the records with.
|
1350
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
1351
|
-
</span> <span class='comment'># @raise [ArgumentError] if neither/both of records & test are passed.
|
1352
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1353
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_replace_records'>replace_records</span><span class='lparen'>(</span><span class='label'>records:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>text:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1354
|
-
<span class='kw'>unless</span> <span class='lbracket'>[</span><span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:nil?</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
|
1355
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>you must pass ONE of records: or text:</span><span class='tstring_end'>'</span></span>
|
1356
|
-
<span class='kw'>end</span>
|
1357
|
-
|
1358
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_records'>records</span>
|
1359
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1360
|
-
<span class='label'>items:</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rrset_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
1361
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1362
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span>
|
1363
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_text'>text</span>
|
1364
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>content-type</span><span class='label_end'>':</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>'</span></span>
|
1365
|
-
<span class='kw'>end</span>
|
1366
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1367
|
-
<span class='kw'>end</span>
|
1368
|
-
|
1369
|
-
<span class='comment'># @override replace_records_for(name, records)
|
1370
|
-
</span> <span class='comment'># Replace records for a name in this domain.
|
1371
|
-
</span> <span class='comment'># @param name [String]
|
1372
|
-
</span> <span class='comment'># @param records
|
1373
|
-
</span> <span class='comment'># [Array<Hash<type: String, ttl: Integer, values: Array<String>>>]
|
1374
|
-
</span> <span class='comment'># the records to add.
|
1375
|
-
</span> <span class='comment'># @override replace_records_for(name, values, type: nil, ttl: nil)
|
1376
|
-
</span> <span class='comment'># Replace records for a name in this domain.
|
1377
|
-
</span> <span class='comment'># @param name [String]
|
1378
|
-
</span> <span class='comment'># @param type [String] the record type.
|
1379
|
-
</span> <span class='comment'># @param ttl [Integer] the TTL to set for the record.
|
1380
|
-
</span> <span class='comment'># @param values [Array<String>] the values to set for the record.
|
1381
|
-
</span> <span class='comment'># @raise [ArgumentError] if ttl is present and type is absent.
|
1382
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
1383
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1384
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_replace_records_for'>replace_records_for</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>ttl:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1385
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>missing keyword: type</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>&&</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1386
|
-
|
1387
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
1388
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span>
|
1389
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>rrset_values:</span> <span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='label'>rrset_ttl:</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='rbrace'>}</span>
|
1390
|
-
<span class='comment'># body[:rrset_ttl] = ttl if ttl
|
1391
|
-
</span> <span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1392
|
-
|
1393
|
-
<span class='kw'>else</span>
|
1394
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1395
|
-
<span class='label'>items:</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rrset_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
1396
|
-
<span class='rbrace'>}</span>
|
1397
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1398
|
-
<span class='kw'>end</span>
|
1399
|
-
|
1400
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1401
|
-
<span class='kw'>end</span>
|
1402
|
-
|
1403
|
-
<span class='comment'># Change the zone used by this domain.
|
1404
|
-
</span> <span class='comment'># @param uuid [String, #uuid, #to_s] the UUID of the zone this domain should now use.
|
1405
|
-
</span> <span class='comment'># @return [String] The confirmation message from Gandi.
|
1406
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1407
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_change_zone'>change_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_uuid'>uuid</span><span class='rparen'>)</span>
|
1408
|
-
<span class='id identifier rubyid_uuid'>uuid</span> <span class='op'>=</span> <span class='id identifier rubyid_uuid'>uuid</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span> <span class='kw'>if</span> <span class='id identifier rubyid_uuid'>uuid</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:uuid</span><span class='rparen'>)</span>
|
1409
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_patch'><span class='object_link'><a href="../../GandiV5.html#patch-class_method" title="GandiV5.patch (method)">patch</a></span></span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>zone_uuid:</span> <span class='id identifier rubyid_uuid'>uuid</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1410
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_zone_uuid'>zone_uuid</span> <span class='op'>=</span> <span class='id identifier rubyid_uuid'>uuid</span>
|
1411
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1412
|
-
<span class='kw'>end</span>
|
1413
|
-
|
1414
|
-
<span class='comment'># Get the domain's zone from Gandi.
|
1415
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Zone]
|
1416
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1417
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_fetch_zone'>fetch_zone</span>
|
1418
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">Zone</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fetch'><span class='object_link'><a href="Zone.html#fetch-class_method" title="GandiV5::LiveDNS::Zone.fetch (method)">fetch</a></span></span> <span class='id identifier rubyid_zone_uuid'>zone_uuid</span>
|
1419
|
-
<span class='kw'>end</span>
|
1420
|
-
|
1421
|
-
<span class='comment'># The domain's zone (fetching from Gandi if required).
|
1422
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Zone]
|
1423
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1424
|
-
</span> <span class='kw'>def</span> <span class='id identifier rubyid_zone'>zone</span>
|
1425
|
-
<span class='ivar'>@zone</span> <span class='op'>||=</span> <span class='id identifier rubyid_fetch_zone'>fetch_zone</span>
|
1426
|
-
<span class='kw'>end</span>
|
1427
|
-
|
1428
|
-
<span class='comment'># List the domains.
|
1429
|
-
</span> <span class='comment'># @return [Array<GandiV5::LiveDNS::Domain>]
|
1430
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1431
|
-
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span>
|
1432
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span>
|
1433
|
-
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
|
1434
|
-
<span class='kw'>end</span>
|
1435
|
-
|
1436
|
-
<span class='comment'># Get a domain.
|
1437
|
-
</span> <span class='comment'># @param fqdn [String, #to_s] the fully qualified domain name to fetch.
|
1438
|
-
</span> <span class='comment'># @return [GandiV5::LiveDNS::Domain]
|
1439
|
-
</span> <span class='comment'># @raise [GandiV5::Error::GandiError] if Gandi returns an error.
|
1440
|
-
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span>
|
1441
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span>
|
1442
|
-
<span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_data'>data</span>
|
1443
|
-
<span class='kw'>end</span>
|
1444
|
-
|
1445
|
-
<span class='id identifier rubyid_private'>private</span>
|
1446
|
-
|
1447
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
1448
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../LiveDNS.html#BASE-constant" title="GandiV5::LiveDNS::BASE (constant)">BASE</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>domains/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1449
|
-
<span class='kw'>end</span>
|
1450
|
-
|
1451
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1452
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../LiveDNS.html#BASE-constant" title="GandiV5::LiveDNS::BASE (constant)">BASE</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>domains</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1453
|
-
<span class='kw'>end</span>
|
1454
|
-
<span class='id identifier rubyid_private_class_method'>private_class_method</span> <span class='symbol'>:url</span>
|
1455
|
-
<span class='kw'>end</span></pre>
|
1456
|
-
</td>
|
1457
|
-
</tr>
|
1458
|
-
</table>
|
1459
|
-
</div>
|
1460
|
-
|
1461
|
-
</div>
|
1462
|
-
|
1463
|
-
|
1464
|
-
<div id="class_method_details" class="method_details_list">
|
1465
|
-
<h2>Class Method Details</h2>
|
1466
|
-
|
1467
|
-
|
1468
|
-
<div class="method_details first">
|
1469
|
-
<h3 class="signature first" id="fetch-class_method">
|
1470
|
-
|
1471
|
-
.<strong>fetch</strong>(fqdn) ⇒ <tt><span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">GandiV5::LiveDNS::Domain</a></span></tt>
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
</h3><div class="docstring">
|
1478
|
-
<div class="discussion">
|
1479
|
-
|
1480
|
-
<p>Get a domain.</p>
|
1481
|
-
|
1482
|
-
|
1483
|
-
</div>
|
1484
|
-
</div>
|
1485
|
-
<div class="tags">
|
1486
|
-
<p class="tag_title">Parameters:</p>
|
1487
|
-
<ul class="param">
|
1488
|
-
|
1489
|
-
<li>
|
1490
|
-
|
1491
|
-
<span class='name'>fqdn</span>
|
1492
|
-
|
1493
|
-
|
1494
|
-
<span class='type'>(<tt>String</tt>, <tt>#to_s</tt>)</span>
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
—
|
1499
|
-
<div class='inline'>
|
1500
|
-
<p>the fully qualified domain name to fetch.</p>
|
1501
|
-
</div>
|
1502
|
-
|
1503
|
-
</li>
|
1504
|
-
|
1505
|
-
</ul>
|
1506
|
-
|
1507
|
-
<p class="tag_title">Returns:</p>
|
1508
|
-
<ul class="return">
|
1509
|
-
|
1510
|
-
<li>
|
1511
|
-
|
1512
|
-
|
1513
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">GandiV5::LiveDNS::Domain</a></span></tt>)</span>
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
</li>
|
1518
|
-
|
1519
|
-
</ul>
|
1520
|
-
<p class="tag_title">Raises:</p>
|
1521
|
-
<ul class="raise">
|
1522
|
-
|
1523
|
-
<li>
|
1524
|
-
|
1525
|
-
|
1526
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
—
|
1531
|
-
<div class='inline'>
|
1532
|
-
<p>if Gandi returns an error.</p>
|
1533
|
-
</div>
|
1534
|
-
|
1535
|
-
</li>
|
1536
|
-
|
1537
|
-
</ul>
|
1538
|
-
|
1539
|
-
</div><table class="source_code">
|
1540
|
-
<tr>
|
1541
|
-
<td>
|
1542
|
-
<pre class="lines">
|
1543
|
-
|
1544
|
-
|
1545
|
-
210
|
1546
|
-
211
|
1547
|
-
212
|
1548
|
-
213</pre>
|
1549
|
-
</td>
|
1550
|
-
<td>
|
1551
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 210</span>
|
1552
|
-
|
1553
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span>
|
1554
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span><span class='lparen'>(</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='rparen'>)</span>
|
1555
|
-
<span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_data'>data</span>
|
1556
|
-
<span class='kw'>end</span></pre>
|
1557
|
-
</td>
|
1558
|
-
</tr>
|
1559
|
-
</table>
|
1560
|
-
</div>
|
1561
|
-
|
1562
|
-
<div class="method_details ">
|
1563
|
-
<h3 class="signature " id="list-class_method">
|
1564
|
-
|
1565
|
-
.<strong>list</strong> ⇒ <tt>Array<<span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">GandiV5::LiveDNS::Domain</a></span>></tt>
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
</h3><div class="docstring">
|
1572
|
-
<div class="discussion">
|
1573
|
-
|
1574
|
-
<p>List the domains.</p>
|
1575
|
-
|
1576
|
-
|
1577
|
-
</div>
|
1578
|
-
</div>
|
1579
|
-
<div class="tags">
|
1580
|
-
|
1581
|
-
<p class="tag_title">Returns:</p>
|
1582
|
-
<ul class="return">
|
1583
|
-
|
1584
|
-
<li>
|
1585
|
-
|
1586
|
-
|
1587
|
-
<span class='type'>(<tt>Array<<span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">GandiV5::LiveDNS::Domain</a></span>></tt>)</span>
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
</li>
|
1592
|
-
|
1593
|
-
</ul>
|
1594
|
-
<p class="tag_title">Raises:</p>
|
1595
|
-
<ul class="raise">
|
1596
|
-
|
1597
|
-
<li>
|
1598
|
-
|
1599
|
-
|
1600
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
—
|
1605
|
-
<div class='inline'>
|
1606
|
-
<p>if Gandi returns an error.</p>
|
1607
|
-
</div>
|
1608
|
-
|
1609
|
-
</li>
|
1610
|
-
|
1611
|
-
</ul>
|
1612
|
-
|
1613
|
-
</div><table class="source_code">
|
1614
|
-
<tr>
|
1615
|
-
<td>
|
1616
|
-
<pre class="lines">
|
1617
|
-
|
1618
|
-
|
1619
|
-
201
|
1620
|
-
202
|
1621
|
-
203
|
1622
|
-
204</pre>
|
1623
|
-
</td>
|
1624
|
-
<td>
|
1625
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 201</span>
|
1626
|
-
|
1627
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span>
|
1628
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span>
|
1629
|
-
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
|
1630
|
-
<span class='kw'>end</span></pre>
|
1631
|
-
</td>
|
1632
|
-
</tr>
|
1633
|
-
</table>
|
1634
|
-
</div>
|
1635
|
-
|
1636
|
-
</div>
|
1637
|
-
|
1638
|
-
<div id="instance_method_details" class="method_details_list">
|
1639
|
-
<h2>Instance Method Details</h2>
|
1640
|
-
|
1641
|
-
|
1642
|
-
<div class="method_details first">
|
1643
|
-
<h3 class="signature first" id="add_record-instance_method">
|
1644
|
-
|
1645
|
-
#<strong>add_record</strong>(name, type, ttl, *values) ⇒ <tt>String</tt>
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
</h3><div class="docstring">
|
1652
|
-
<div class="discussion">
|
1653
|
-
|
1654
|
-
<p>Add record to this domain.</p>
|
1655
|
-
|
1656
|
-
|
1657
|
-
</div>
|
1658
|
-
</div>
|
1659
|
-
<div class="tags">
|
1660
|
-
<p class="tag_title">Parameters:</p>
|
1661
|
-
<ul class="param">
|
1662
|
-
|
1663
|
-
<li>
|
1664
|
-
|
1665
|
-
<span class='name'>name</span>
|
1666
|
-
|
1667
|
-
|
1668
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
</li>
|
1673
|
-
|
1674
|
-
<li>
|
1675
|
-
|
1676
|
-
<span class='name'>type</span>
|
1677
|
-
|
1678
|
-
|
1679
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
</li>
|
1684
|
-
|
1685
|
-
<li>
|
1686
|
-
|
1687
|
-
<span class='name'>ttl</span>
|
1688
|
-
|
1689
|
-
|
1690
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
</li>
|
1695
|
-
|
1696
|
-
<li>
|
1697
|
-
|
1698
|
-
<span class='name'>values</span>
|
1699
|
-
|
1700
|
-
|
1701
|
-
<span class='type'>(<tt>Array<String></tt>)</span>
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
</li>
|
1706
|
-
|
1707
|
-
</ul>
|
1708
|
-
|
1709
|
-
<p class="tag_title">Returns:</p>
|
1710
|
-
<ul class="return">
|
1711
|
-
|
1712
|
-
<li>
|
1713
|
-
|
1714
|
-
|
1715
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
—
|
1720
|
-
<div class='inline'>
|
1721
|
-
<p>The confirmation message from Gandi.</p>
|
1722
|
-
</div>
|
1723
|
-
|
1724
|
-
</li>
|
1725
|
-
|
1726
|
-
</ul>
|
1727
|
-
<p class="tag_title">Raises:</p>
|
1728
|
-
<ul class="raise">
|
1729
|
-
|
1730
|
-
<li>
|
1731
|
-
|
1732
|
-
|
1733
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
—
|
1738
|
-
<div class='inline'>
|
1739
|
-
<p>if Gandi returns an error.</p>
|
1740
|
-
</div>
|
1741
|
-
|
1742
|
-
</li>
|
1743
|
-
|
1744
|
-
</ul>
|
1745
|
-
|
1746
|
-
</div><table class="source_code">
|
1747
|
-
<tr>
|
1748
|
-
<td>
|
1749
|
-
<pre class="lines">
|
1750
|
-
|
1751
|
-
|
1752
|
-
80
|
1753
|
-
81
|
1754
|
-
82
|
1755
|
-
83
|
1756
|
-
84
|
1757
|
-
85
|
1758
|
-
86
|
1759
|
-
87
|
1760
|
-
88
|
1761
|
-
89
|
1762
|
-
90
|
1763
|
-
91
|
1764
|
-
92
|
1765
|
-
93</pre>
|
1766
|
-
</td>
|
1767
|
-
<td>
|
1768
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 80</span>
|
1769
|
-
|
1770
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_add_record'>add_record</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
1771
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span>
|
1772
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ttl must be positive and non-zero</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1773
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>there must be at least one value</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_none?'>none?</span>
|
1774
|
-
|
1775
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1776
|
-
<span class='label'>rrset_name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
1777
|
-
<span class='label'>rrset_type:</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
1778
|
-
<span class='label'>rrset_ttl:</span> <span class='id identifier rubyid_ttl'>ttl</span><span class='comma'>,</span>
|
1779
|
-
<span class='label'>rrset_values:</span> <span class='id identifier rubyid_values'>values</span>
|
1780
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1781
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_post'><span class='object_link'><a href="../../GandiV5.html#post-class_method" title="GandiV5.post (method)">post</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span>
|
1782
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1783
|
-
<span class='kw'>end</span></pre>
|
1784
|
-
</td>
|
1785
|
-
</tr>
|
1786
|
-
</table>
|
1787
|
-
</div>
|
1788
|
-
|
1789
|
-
<div class="method_details ">
|
1790
|
-
<h3 class="signature " id="change_zone-instance_method">
|
1791
|
-
|
1792
|
-
#<strong>change_zone</strong>(uuid) ⇒ <tt>String</tt>
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
</h3><div class="docstring">
|
1799
|
-
<div class="discussion">
|
1800
|
-
|
1801
|
-
<p>Change the zone used by this domain.</p>
|
1802
|
-
|
1803
|
-
|
1804
|
-
</div>
|
1805
|
-
</div>
|
1806
|
-
<div class="tags">
|
1807
|
-
<p class="tag_title">Parameters:</p>
|
1808
|
-
<ul class="param">
|
1809
|
-
|
1810
|
-
<li>
|
1811
|
-
|
1812
|
-
<span class='name'>uuid</span>
|
1813
|
-
|
1814
|
-
|
1815
|
-
<span class='type'>(<tt>String</tt>, <tt>#uuid</tt>, <tt>#to_s</tt>)</span>
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
—
|
1820
|
-
<div class='inline'>
|
1821
|
-
<p>the UUID of the zone this domain should now use.</p>
|
1822
|
-
</div>
|
1823
|
-
|
1824
|
-
</li>
|
1825
|
-
|
1826
|
-
</ul>
|
1827
|
-
|
1828
|
-
<p class="tag_title">Returns:</p>
|
1829
|
-
<ul class="return">
|
1830
|
-
|
1831
|
-
<li>
|
1832
|
-
|
1833
|
-
|
1834
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
—
|
1839
|
-
<div class='inline'>
|
1840
|
-
<p>The confirmation message from Gandi.</p>
|
1841
|
-
</div>
|
1842
|
-
|
1843
|
-
</li>
|
1844
|
-
|
1845
|
-
</ul>
|
1846
|
-
<p class="tag_title">Raises:</p>
|
1847
|
-
<ul class="raise">
|
1848
|
-
|
1849
|
-
<li>
|
1850
|
-
|
1851
|
-
|
1852
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
—
|
1857
|
-
<div class='inline'>
|
1858
|
-
<p>if Gandi returns an error.</p>
|
1859
|
-
</div>
|
1860
|
-
|
1861
|
-
</li>
|
1862
|
-
|
1863
|
-
</ul>
|
1864
|
-
|
1865
|
-
</div><table class="source_code">
|
1866
|
-
<tr>
|
1867
|
-
<td>
|
1868
|
-
<pre class="lines">
|
1869
|
-
|
1870
|
-
|
1871
|
-
177
|
1872
|
-
178
|
1873
|
-
179
|
1874
|
-
180
|
1875
|
-
181
|
1876
|
-
182</pre>
|
1877
|
-
</td>
|
1878
|
-
<td>
|
1879
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 177</span>
|
1880
|
-
|
1881
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_change_zone'>change_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_uuid'>uuid</span><span class='rparen'>)</span>
|
1882
|
-
<span class='id identifier rubyid_uuid'>uuid</span> <span class='op'>=</span> <span class='id identifier rubyid_uuid'>uuid</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span> <span class='kw'>if</span> <span class='id identifier rubyid_uuid'>uuid</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:uuid</span><span class='rparen'>)</span>
|
1883
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_patch'><span class='object_link'><a href="../../GandiV5.html#patch-class_method" title="GandiV5.patch (method)">patch</a></span></span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>zone_uuid:</span> <span class='id identifier rubyid_uuid'>uuid</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
1884
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_zone_uuid'>zone_uuid</span> <span class='op'>=</span> <span class='id identifier rubyid_uuid'>uuid</span>
|
1885
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
1886
|
-
<span class='kw'>end</span></pre>
|
1887
|
-
</td>
|
1888
|
-
</tr>
|
1889
|
-
</table>
|
1890
|
-
</div>
|
1891
|
-
|
1892
|
-
<div class="method_details ">
|
1893
|
-
<h3 class="signature " id="delete_records-instance_method">
|
1894
|
-
|
1895
|
-
|
1896
|
-
<span class="overload">#<strong>delete_records</strong> ⇒ <tt>nil</tt> </span>
|
1897
|
-
|
1898
|
-
<span class="overload">#<strong>delete_records</strong>(name) ⇒ <tt>nil</tt> </span>
|
1899
|
-
|
1900
|
-
<span class="overload">#<strong>delete_records</strong>(name, type) ⇒ <tt>nil</tt> </span>
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
</h3><div class="docstring">
|
1908
|
-
<div class="discussion">
|
1909
|
-
|
1910
|
-
|
1911
|
-
</div>
|
1912
|
-
</div>
|
1913
|
-
<div class="tags">
|
1914
|
-
|
1915
|
-
<p class="tag_title">Overloads:</p>
|
1916
|
-
<ul class="overload">
|
1917
|
-
|
1918
|
-
|
1919
|
-
<li class="overload_item">
|
1920
|
-
<span class="signature">#<strong>delete_records</strong> ⇒ <tt>nil</tt> </span>
|
1921
|
-
<div class="docstring">
|
1922
|
-
<div class="discussion">
|
1923
|
-
|
1924
|
-
<p>Delete all records for this domain.</p>
|
1925
|
-
|
1926
|
-
|
1927
|
-
</div>
|
1928
|
-
</div>
|
1929
|
-
<div class="tags">
|
1930
|
-
|
1931
|
-
|
1932
|
-
</div>
|
1933
|
-
</li>
|
1934
|
-
|
1935
|
-
|
1936
|
-
<li class="overload_item">
|
1937
|
-
<span class="signature">#<strong>delete_records</strong>(name) ⇒ <tt>nil</tt> </span>
|
1938
|
-
<div class="docstring">
|
1939
|
-
<div class="discussion">
|
1940
|
-
|
1941
|
-
<p>Delete records for a name.</p>
|
1942
|
-
|
1943
|
-
|
1944
|
-
</div>
|
1945
|
-
</div>
|
1946
|
-
<div class="tags">
|
1947
|
-
<p class="tag_title">Parameters:</p>
|
1948
|
-
<ul class="param">
|
1949
|
-
|
1950
|
-
<li>
|
1951
|
-
|
1952
|
-
<span class='name'>name</span>
|
1953
|
-
|
1954
|
-
|
1955
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
—
|
1960
|
-
<div class='inline'>
|
1961
|
-
<p>the name to delete records for.</p>
|
1962
|
-
</div>
|
1963
|
-
|
1964
|
-
</li>
|
1965
|
-
|
1966
|
-
</ul>
|
1967
|
-
|
1968
|
-
|
1969
|
-
</div>
|
1970
|
-
</li>
|
1971
|
-
|
1972
|
-
|
1973
|
-
<li class="overload_item">
|
1974
|
-
<span class="signature">#<strong>delete_records</strong>(name, type) ⇒ <tt>nil</tt> </span>
|
1975
|
-
<div class="docstring">
|
1976
|
-
<div class="discussion">
|
1977
|
-
|
1978
|
-
<p>Delete records of a type for a name.</p>
|
1979
|
-
|
1980
|
-
|
1981
|
-
</div>
|
1982
|
-
</div>
|
1983
|
-
<div class="tags">
|
1984
|
-
<p class="tag_title">Parameters:</p>
|
1985
|
-
<ul class="param">
|
1986
|
-
|
1987
|
-
<li>
|
1988
|
-
|
1989
|
-
<span class='name'>name</span>
|
1990
|
-
|
1991
|
-
|
1992
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1993
|
-
|
1994
|
-
|
1995
|
-
|
1996
|
-
—
|
1997
|
-
<div class='inline'>
|
1998
|
-
<p>the name to delete records for.</p>
|
1999
|
-
</div>
|
2000
|
-
|
2001
|
-
</li>
|
2002
|
-
|
2003
|
-
<li>
|
2004
|
-
|
2005
|
-
<span class='name'>type</span>
|
2006
|
-
|
2007
|
-
|
2008
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
—
|
2013
|
-
<div class='inline'>
|
2014
|
-
<p>the record type to delete.</p>
|
2015
|
-
</div>
|
2016
|
-
|
2017
|
-
</li>
|
2018
|
-
|
2019
|
-
</ul>
|
2020
|
-
|
2021
|
-
|
2022
|
-
</div>
|
2023
|
-
</li>
|
2024
|
-
|
2025
|
-
</ul>
|
2026
|
-
|
2027
|
-
<p class="tag_title">Returns:</p>
|
2028
|
-
<ul class="return">
|
2029
|
-
|
2030
|
-
<li>
|
2031
|
-
|
2032
|
-
|
2033
|
-
<span class='type'>(<tt>nil</tt>)</span>
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
</li>
|
2038
|
-
|
2039
|
-
</ul>
|
2040
|
-
<p class="tag_title">Raises:</p>
|
2041
|
-
<ul class="raise">
|
2042
|
-
|
2043
|
-
<li>
|
2044
|
-
|
2045
|
-
|
2046
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
—
|
2051
|
-
<div class='inline'>
|
2052
|
-
<p>if Gandi returns an error.</p>
|
2053
|
-
</div>
|
2054
|
-
|
2055
|
-
</li>
|
2056
|
-
|
2057
|
-
</ul>
|
2058
|
-
|
2059
|
-
</div><table class="source_code">
|
2060
|
-
<tr>
|
2061
|
-
<td>
|
2062
|
-
<pre class="lines">
|
2063
|
-
|
2064
|
-
|
2065
|
-
106
|
2066
|
-
107
|
2067
|
-
108
|
2068
|
-
109
|
2069
|
-
110
|
2070
|
-
111
|
2071
|
-
112
|
2072
|
-
113</pre>
|
2073
|
-
</td>
|
2074
|
-
<td>
|
2075
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 106</span>
|
2076
|
-
|
2077
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_delete_records'>delete_records</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2078
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2079
|
-
|
2080
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
2081
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
2082
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2083
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_delete'><span class='object_link'><a href="../../GandiV5.html#delete-class_method" title="GandiV5.delete (method)">delete</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url_'>url_</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
2084
|
-
<span class='kw'>end</span></pre>
|
2085
|
-
</td>
|
2086
|
-
</tr>
|
2087
|
-
</table>
|
2088
|
-
</div>
|
2089
|
-
|
2090
|
-
<div class="method_details ">
|
2091
|
-
<h3 class="signature " id="fetch_records-instance_method">
|
2092
|
-
|
2093
|
-
|
2094
|
-
<span class="overload">#<strong>fetch_records</strong> ⇒ <tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt> </span>
|
2095
|
-
|
2096
|
-
<span class="overload">#<strong>fetch_records</strong>(name) ⇒ <tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt> </span>
|
2097
|
-
|
2098
|
-
<span class="overload">#<strong>fetch_records</strong>(name, type) ⇒ <tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt> </span>
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
</h3><div class="docstring">
|
2106
|
-
<div class="discussion">
|
2107
|
-
|
2108
|
-
|
2109
|
-
</div>
|
2110
|
-
</div>
|
2111
|
-
<div class="tags">
|
2112
|
-
|
2113
|
-
<p class="tag_title">Overloads:</p>
|
2114
|
-
<ul class="overload">
|
2115
|
-
|
2116
|
-
|
2117
|
-
<li class="overload_item">
|
2118
|
-
<span class="signature">#<strong>fetch_records</strong> ⇒ <tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt> </span>
|
2119
|
-
<div class="docstring">
|
2120
|
-
<div class="discussion">
|
2121
|
-
|
2122
|
-
<p>Fetch all records for this domain.</p>
|
2123
|
-
|
2124
|
-
|
2125
|
-
</div>
|
2126
|
-
</div>
|
2127
|
-
<div class="tags">
|
2128
|
-
|
2129
|
-
|
2130
|
-
</div>
|
2131
|
-
</li>
|
2132
|
-
|
2133
|
-
|
2134
|
-
<li class="overload_item">
|
2135
|
-
<span class="signature">#<strong>fetch_records</strong>(name) ⇒ <tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt> </span>
|
2136
|
-
<div class="docstring">
|
2137
|
-
<div class="discussion">
|
2138
|
-
|
2139
|
-
<p>Fetch records for a name.</p>
|
2140
|
-
|
2141
|
-
|
2142
|
-
</div>
|
2143
|
-
</div>
|
2144
|
-
<div class="tags">
|
2145
|
-
<p class="tag_title">Parameters:</p>
|
2146
|
-
<ul class="param">
|
2147
|
-
|
2148
|
-
<li>
|
2149
|
-
|
2150
|
-
<span class='name'>name</span>
|
2151
|
-
|
2152
|
-
|
2153
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
—
|
2158
|
-
<div class='inline'>
|
2159
|
-
<p>the name to fetch records for.</p>
|
2160
|
-
</div>
|
2161
|
-
|
2162
|
-
</li>
|
2163
|
-
|
2164
|
-
</ul>
|
2165
|
-
|
2166
|
-
|
2167
|
-
</div>
|
2168
|
-
</li>
|
2169
|
-
|
2170
|
-
|
2171
|
-
<li class="overload_item">
|
2172
|
-
<span class="signature">#<strong>fetch_records</strong>(name, type) ⇒ <tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt> </span>
|
2173
|
-
<div class="docstring">
|
2174
|
-
<div class="discussion">
|
2175
|
-
|
2176
|
-
<p>Fetch records of a type for a name.</p>
|
2177
|
-
|
2178
|
-
|
2179
|
-
</div>
|
2180
|
-
</div>
|
2181
|
-
<div class="tags">
|
2182
|
-
<p class="tag_title">Parameters:</p>
|
2183
|
-
<ul class="param">
|
2184
|
-
|
2185
|
-
<li>
|
2186
|
-
|
2187
|
-
<span class='name'>name</span>
|
2188
|
-
|
2189
|
-
|
2190
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2191
|
-
|
2192
|
-
|
2193
|
-
|
2194
|
-
—
|
2195
|
-
<div class='inline'>
|
2196
|
-
<p>the name to fetch records for.</p>
|
2197
|
-
</div>
|
2198
|
-
|
2199
|
-
</li>
|
2200
|
-
|
2201
|
-
<li>
|
2202
|
-
|
2203
|
-
<span class='name'>type</span>
|
2204
|
-
|
2205
|
-
|
2206
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
—
|
2211
|
-
<div class='inline'>
|
2212
|
-
<p>the record type to fetch.</p>
|
2213
|
-
</div>
|
2214
|
-
|
2215
|
-
</li>
|
2216
|
-
|
2217
|
-
</ul>
|
2218
|
-
|
2219
|
-
|
2220
|
-
</div>
|
2221
|
-
</li>
|
2222
|
-
|
2223
|
-
</ul>
|
2224
|
-
|
2225
|
-
<p class="tag_title">Returns:</p>
|
2226
|
-
<ul class="return">
|
2227
|
-
|
2228
|
-
<li>
|
2229
|
-
|
2230
|
-
|
2231
|
-
<span class='type'>(<tt>Array<<span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">GandiV5::LiveDNS::RecordSet</a></span>></tt>)</span>
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
</li>
|
2236
|
-
|
2237
|
-
</ul>
|
2238
|
-
<p class="tag_title">Raises:</p>
|
2239
|
-
<ul class="raise">
|
2240
|
-
|
2241
|
-
<li>
|
2242
|
-
|
2243
|
-
|
2244
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
—
|
2249
|
-
<div class='inline'>
|
2250
|
-
<p>if Gandi returns an error.</p>
|
2251
|
-
</div>
|
2252
|
-
|
2253
|
-
</li>
|
2254
|
-
|
2255
|
-
</ul>
|
2256
|
-
|
2257
|
-
</div><table class="source_code">
|
2258
|
-
<tr>
|
2259
|
-
<td>
|
2260
|
-
<pre class="lines">
|
2261
|
-
|
2262
|
-
|
2263
|
-
40
|
2264
|
-
41
|
2265
|
-
42
|
2266
|
-
43
|
2267
|
-
44
|
2268
|
-
45
|
2269
|
-
46
|
2270
|
-
47
|
2271
|
-
48
|
2272
|
-
49
|
2273
|
-
50</pre>
|
2274
|
-
</td>
|
2275
|
-
<td>
|
2276
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 40</span>
|
2277
|
-
|
2278
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_fetch_records'>fetch_records</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2279
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2280
|
-
|
2281
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
2282
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
2283
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2284
|
-
|
2285
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url_'>url_</span>
|
2286
|
-
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_data'>data</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
2287
|
-
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RecordSet.html" title="GandiV5::LiveDNS::RecordSet (class)">RecordSet</a></span></span><span class='period'>.</span><span class='id identifier rubyid_from_gandi'><span class='object_link'><a href="../Data.html#from_gandi-instance_method" title="GandiV5::Data#from_gandi (method)">from_gandi</a></span></span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
|
2288
|
-
<span class='kw'>end</span></pre>
|
2289
|
-
</td>
|
2290
|
-
</tr>
|
2291
|
-
</table>
|
2292
|
-
</div>
|
2293
|
-
|
2294
|
-
<div class="method_details ">
|
2295
|
-
<h3 class="signature " id="fetch_zone-instance_method">
|
2296
|
-
|
2297
|
-
#<strong>fetch_zone</strong> ⇒ <tt><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">GandiV5::LiveDNS::Zone</a></span></tt>
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
</h3><div class="docstring">
|
2304
|
-
<div class="discussion">
|
2305
|
-
|
2306
|
-
<p>Get the domain's zone from Gandi.</p>
|
2307
|
-
|
2308
|
-
|
2309
|
-
</div>
|
2310
|
-
</div>
|
2311
|
-
<div class="tags">
|
2312
|
-
|
2313
|
-
<p class="tag_title">Returns:</p>
|
2314
|
-
<ul class="return">
|
2315
|
-
|
2316
|
-
<li>
|
2317
|
-
|
2318
|
-
|
2319
|
-
<span class='type'>(<tt><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">GandiV5::LiveDNS::Zone</a></span></tt>)</span>
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
</li>
|
2324
|
-
|
2325
|
-
</ul>
|
2326
|
-
<p class="tag_title">Raises:</p>
|
2327
|
-
<ul class="raise">
|
2328
|
-
|
2329
|
-
<li>
|
2330
|
-
|
2331
|
-
|
2332
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
—
|
2337
|
-
<div class='inline'>
|
2338
|
-
<p>if Gandi returns an error.</p>
|
2339
|
-
</div>
|
2340
|
-
|
2341
|
-
</li>
|
2342
|
-
|
2343
|
-
</ul>
|
2344
|
-
|
2345
|
-
</div><table class="source_code">
|
2346
|
-
<tr>
|
2347
|
-
<td>
|
2348
|
-
<pre class="lines">
|
2349
|
-
|
2350
|
-
|
2351
|
-
187
|
2352
|
-
188
|
2353
|
-
189</pre>
|
2354
|
-
</td>
|
2355
|
-
<td>
|
2356
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 187</span>
|
2357
|
-
|
2358
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_fetch_zone'>fetch_zone</span>
|
2359
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">Zone</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fetch'><span class='object_link'><a href="Zone.html#fetch-class_method" title="GandiV5::LiveDNS::Zone.fetch (method)">fetch</a></span></span> <span class='id identifier rubyid_zone_uuid'>zone_uuid</span>
|
2360
|
-
<span class='kw'>end</span></pre>
|
2361
|
-
</td>
|
2362
|
-
</tr>
|
2363
|
-
</table>
|
2364
|
-
</div>
|
2365
|
-
|
2366
|
-
<div class="method_details ">
|
2367
|
-
<h3 class="signature " id="fetch_zone_lines-instance_method">
|
2368
|
-
|
2369
|
-
|
2370
|
-
<span class="overload">#<strong>fetch_zone_lines</strong> ⇒ <tt>String</tt> </span>
|
2371
|
-
|
2372
|
-
<span class="overload">#<strong>fetch_zone_lines</strong>(name) ⇒ <tt>String</tt> </span>
|
2373
|
-
|
2374
|
-
<span class="overload">#<strong>fetch_zone_lines</strong>(name, type) ⇒ <tt>String</tt> </span>
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
</h3><div class="docstring">
|
2382
|
-
<div class="discussion">
|
2383
|
-
|
2384
|
-
|
2385
|
-
</div>
|
2386
|
-
</div>
|
2387
|
-
<div class="tags">
|
2388
|
-
|
2389
|
-
<p class="tag_title">Overloads:</p>
|
2390
|
-
<ul class="overload">
|
2391
|
-
|
2392
|
-
|
2393
|
-
<li class="overload_item">
|
2394
|
-
<span class="signature">#<strong>fetch_zone_lines</strong> ⇒ <tt>String</tt> </span>
|
2395
|
-
<div class="docstring">
|
2396
|
-
<div class="discussion">
|
2397
|
-
|
2398
|
-
<p>Fetch all records for this domain.</p>
|
2399
|
-
|
2400
|
-
|
2401
|
-
</div>
|
2402
|
-
</div>
|
2403
|
-
<div class="tags">
|
2404
|
-
|
2405
|
-
|
2406
|
-
</div>
|
2407
|
-
</li>
|
2408
|
-
|
2409
|
-
|
2410
|
-
<li class="overload_item">
|
2411
|
-
<span class="signature">#<strong>fetch_zone_lines</strong>(name) ⇒ <tt>String</tt> </span>
|
2412
|
-
<div class="docstring">
|
2413
|
-
<div class="discussion">
|
2414
|
-
|
2415
|
-
<p>Fetch records for a name.</p>
|
2416
|
-
|
2417
|
-
|
2418
|
-
</div>
|
2419
|
-
</div>
|
2420
|
-
<div class="tags">
|
2421
|
-
<p class="tag_title">Parameters:</p>
|
2422
|
-
<ul class="param">
|
2423
|
-
|
2424
|
-
<li>
|
2425
|
-
|
2426
|
-
<span class='name'>name</span>
|
2427
|
-
|
2428
|
-
|
2429
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2430
|
-
|
2431
|
-
|
2432
|
-
|
2433
|
-
—
|
2434
|
-
<div class='inline'>
|
2435
|
-
<p>the name to fetch records for.</p>
|
2436
|
-
</div>
|
2437
|
-
|
2438
|
-
</li>
|
2439
|
-
|
2440
|
-
</ul>
|
2441
|
-
|
2442
|
-
|
2443
|
-
</div>
|
2444
|
-
</li>
|
2445
|
-
|
2446
|
-
|
2447
|
-
<li class="overload_item">
|
2448
|
-
<span class="signature">#<strong>fetch_zone_lines</strong>(name, type) ⇒ <tt>String</tt> </span>
|
2449
|
-
<div class="docstring">
|
2450
|
-
<div class="discussion">
|
2451
|
-
|
2452
|
-
<p>Fetch records of a type for a name.</p>
|
2453
|
-
|
2454
|
-
|
2455
|
-
</div>
|
2456
|
-
</div>
|
2457
|
-
<div class="tags">
|
2458
|
-
<p class="tag_title">Parameters:</p>
|
2459
|
-
<ul class="param">
|
2460
|
-
|
2461
|
-
<li>
|
2462
|
-
|
2463
|
-
<span class='name'>name</span>
|
2464
|
-
|
2465
|
-
|
2466
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2467
|
-
|
2468
|
-
|
2469
|
-
|
2470
|
-
—
|
2471
|
-
<div class='inline'>
|
2472
|
-
<p>the name to fetch records for.</p>
|
2473
|
-
</div>
|
2474
|
-
|
2475
|
-
</li>
|
2476
|
-
|
2477
|
-
<li>
|
2478
|
-
|
2479
|
-
<span class='name'>type</span>
|
2480
|
-
|
2481
|
-
|
2482
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2486
|
-
—
|
2487
|
-
<div class='inline'>
|
2488
|
-
<p>the record type to fetch.</p>
|
2489
|
-
</div>
|
2490
|
-
|
2491
|
-
</li>
|
2492
|
-
|
2493
|
-
</ul>
|
2494
|
-
|
2495
|
-
|
2496
|
-
</div>
|
2497
|
-
</li>
|
2498
|
-
|
2499
|
-
</ul>
|
2500
|
-
|
2501
|
-
<p class="tag_title">Returns:</p>
|
2502
|
-
<ul class="return">
|
2503
|
-
|
2504
|
-
<li>
|
2505
|
-
|
2506
|
-
|
2507
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
</li>
|
2512
|
-
|
2513
|
-
</ul>
|
2514
|
-
<p class="tag_title">Raises:</p>
|
2515
|
-
<ul class="raise">
|
2516
|
-
|
2517
|
-
<li>
|
2518
|
-
|
2519
|
-
|
2520
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2521
|
-
|
2522
|
-
|
2523
|
-
|
2524
|
-
—
|
2525
|
-
<div class='inline'>
|
2526
|
-
<p>if Gandi returns an error.</p>
|
2527
|
-
</div>
|
2528
|
-
|
2529
|
-
</li>
|
2530
|
-
|
2531
|
-
</ul>
|
2532
|
-
|
2533
|
-
</div><table class="source_code">
|
2534
|
-
<tr>
|
2535
|
-
<td>
|
2536
|
-
<pre class="lines">
|
2537
|
-
|
2538
|
-
|
2539
|
-
63
|
2540
|
-
64
|
2541
|
-
65
|
2542
|
-
66
|
2543
|
-
67
|
2544
|
-
68
|
2545
|
-
69
|
2546
|
-
70
|
2547
|
-
71</pre>
|
2548
|
-
</td>
|
2549
|
-
<td>
|
2550
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 63</span>
|
2551
|
-
|
2552
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_fetch_zone_lines'>fetch_zone_lines</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2553
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2554
|
-
|
2555
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span>
|
2556
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span>
|
2557
|
-
<span class='id identifier rubyid_url_'>url_</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span> <span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2558
|
-
|
2559
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url_'>url_</span><span class='comma'>,</span> <span class='label'>accept:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
2560
|
-
<span class='kw'>end</span></pre>
|
2561
|
-
</td>
|
2562
|
-
</tr>
|
2563
|
-
</table>
|
2564
|
-
</div>
|
2565
|
-
|
2566
|
-
<div class="method_details ">
|
2567
|
-
<h3 class="signature " id="refresh-instance_method">
|
2568
|
-
|
2569
|
-
#<strong>refresh</strong> ⇒ <tt><span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">GandiV5::LiveDNS::Domain</a></span></tt>
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2575
|
-
</h3><div class="docstring">
|
2576
|
-
<div class="discussion">
|
2577
|
-
|
2578
|
-
<p>Refetch the information for this domain from Gandi.</p>
|
2579
|
-
|
2580
|
-
|
2581
|
-
</div>
|
2582
|
-
</div>
|
2583
|
-
<div class="tags">
|
2584
|
-
|
2585
|
-
<p class="tag_title">Returns:</p>
|
2586
|
-
<ul class="return">
|
2587
|
-
|
2588
|
-
<li>
|
2589
|
-
|
2590
|
-
|
2591
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="GandiV5::LiveDNS::Domain (class)">GandiV5::LiveDNS::Domain</a></span></tt>)</span>
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
</li>
|
2596
|
-
|
2597
|
-
</ul>
|
2598
|
-
<p class="tag_title">Raises:</p>
|
2599
|
-
<ul class="raise">
|
2600
|
-
|
2601
|
-
<li>
|
2602
|
-
|
2603
|
-
|
2604
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
—
|
2609
|
-
<div class='inline'>
|
2610
|
-
<p>if Gandi returns an error.</p>
|
2611
|
-
</div>
|
2612
|
-
|
2613
|
-
</li>
|
2614
|
-
|
2615
|
-
</ul>
|
2616
|
-
|
2617
|
-
</div><table class="source_code">
|
2618
|
-
<tr>
|
2619
|
-
<td>
|
2620
|
-
<pre class="lines">
|
2621
|
-
|
2622
|
-
|
2623
|
-
24
|
2624
|
-
25
|
2625
|
-
26
|
2626
|
-
27</pre>
|
2627
|
-
</td>
|
2628
|
-
<td>
|
2629
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 24</span>
|
2630
|
-
|
2631
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_refresh'>refresh</span>
|
2632
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get'><span class='object_link'><a href="../../GandiV5.html#get-class_method" title="GandiV5.get (method)">get</a></span></span> <span class='id identifier rubyid_url'>url</span>
|
2633
|
-
<span class='id identifier rubyid_from_gandi'>from_gandi</span> <span class='id identifier rubyid_data'>data</span>
|
2634
|
-
<span class='kw'>end</span></pre>
|
2635
|
-
</td>
|
2636
|
-
</tr>
|
2637
|
-
</table>
|
2638
|
-
</div>
|
2639
|
-
|
2640
|
-
<div class="method_details ">
|
2641
|
-
<h3 class="signature " id="replace_records-instance_method">
|
2642
|
-
|
2643
|
-
#<strong>replace_records</strong>(records: nil, text: nil) ⇒ <tt>String</tt>
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
</h3><div class="docstring">
|
2650
|
-
<div class="discussion">
|
2651
|
-
|
2652
|
-
<p>Replace all records for this domain.</p>
|
2653
|
-
|
2654
|
-
|
2655
|
-
</div>
|
2656
|
-
</div>
|
2657
|
-
<div class="tags">
|
2658
|
-
<p class="tag_title">Parameters:</p>
|
2659
|
-
<ul class="param">
|
2660
|
-
|
2661
|
-
<li>
|
2662
|
-
|
2663
|
-
<span class='name'>records</span>
|
2664
|
-
|
2665
|
-
|
2666
|
-
<span class='type'></span>
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2670
|
-
—
|
2671
|
-
<div class='inline'><dl class="rdoc-list label-list"><dt>Array<Hash<:name, :type => String, :ttl => Integer, :values => Array<String>>>
|
2672
|
-
<dd>
|
2673
|
-
<p>the records to add.</p>
|
2674
|
-
</dd></dl>
|
2675
|
-
</div>
|
2676
|
-
|
2677
|
-
</li>
|
2678
|
-
|
2679
|
-
<li>
|
2680
|
-
|
2681
|
-
<span class='name'>text</span>
|
2682
|
-
|
2683
|
-
|
2684
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
—
|
2689
|
-
<div class='inline'>
|
2690
|
-
<p>zone file lines to replace the records with.</p>
|
2691
|
-
</div>
|
2692
|
-
|
2693
|
-
</li>
|
2694
|
-
|
2695
|
-
</ul>
|
2696
|
-
|
2697
|
-
<p class="tag_title">Returns:</p>
|
2698
|
-
<ul class="return">
|
2699
|
-
|
2700
|
-
<li>
|
2701
|
-
|
2702
|
-
|
2703
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2704
|
-
|
2705
|
-
|
2706
|
-
|
2707
|
-
—
|
2708
|
-
<div class='inline'>
|
2709
|
-
<p>The confirmation message from Gandi.</p>
|
2710
|
-
</div>
|
2711
|
-
|
2712
|
-
</li>
|
2713
|
-
|
2714
|
-
</ul>
|
2715
|
-
<p class="tag_title">Raises:</p>
|
2716
|
-
<ul class="raise">
|
2717
|
-
|
2718
|
-
<li>
|
2719
|
-
|
2720
|
-
|
2721
|
-
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
2722
|
-
|
2723
|
-
|
2724
|
-
|
2725
|
-
—
|
2726
|
-
<div class='inline'>
|
2727
|
-
<p>if neither/both of records & test are passed.</p>
|
2728
|
-
</div>
|
2729
|
-
|
2730
|
-
</li>
|
2731
|
-
|
2732
|
-
<li>
|
2733
|
-
|
2734
|
-
|
2735
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
—
|
2740
|
-
<div class='inline'>
|
2741
|
-
<p>if Gandi returns an error.</p>
|
2742
|
-
</div>
|
2743
|
-
|
2744
|
-
</li>
|
2745
|
-
|
2746
|
-
</ul>
|
2747
|
-
|
2748
|
-
</div><table class="source_code">
|
2749
|
-
<tr>
|
2750
|
-
<td>
|
2751
|
-
<pre class="lines">
|
2752
|
-
|
2753
|
-
|
2754
|
-
123
|
2755
|
-
124
|
2756
|
-
125
|
2757
|
-
126
|
2758
|
-
127
|
2759
|
-
128
|
2760
|
-
129
|
2761
|
-
130
|
2762
|
-
131
|
2763
|
-
132
|
2764
|
-
133
|
2765
|
-
134
|
2766
|
-
135
|
2767
|
-
136
|
2768
|
-
137</pre>
|
2769
|
-
</td>
|
2770
|
-
<td>
|
2771
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 123</span>
|
2772
|
-
|
2773
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_replace_records'>replace_records</span><span class='lparen'>(</span><span class='label'>records:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>text:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2774
|
-
<span class='kw'>unless</span> <span class='lbracket'>[</span><span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:nil?</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_eql?'>eql?</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
|
2775
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>you must pass ONE of records: or text:</span><span class='tstring_end'>'</span></span>
|
2776
|
-
<span class='kw'>end</span>
|
2777
|
-
|
2778
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_records'>records</span>
|
2779
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
2780
|
-
<span class='label'>items:</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rrset_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
2781
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
2782
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span>
|
2783
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_text'>text</span>
|
2784
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>content-type</span><span class='label_end'>':</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>'</span></span>
|
2785
|
-
<span class='kw'>end</span>
|
2786
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
2787
|
-
<span class='kw'>end</span></pre>
|
2788
|
-
</td>
|
2789
|
-
</tr>
|
2790
|
-
</table>
|
2791
|
-
</div>
|
2792
|
-
|
2793
|
-
<div class="method_details ">
|
2794
|
-
<h3 class="signature " id="replace_records_for-instance_method">
|
2795
|
-
|
2796
|
-
#<strong>replace_records_for</strong>(name, records, type: nil, ttl: nil) ⇒ <tt>String</tt>
|
2797
|
-
|
2798
|
-
|
2799
|
-
|
2800
|
-
|
2801
|
-
|
2802
|
-
</h3><div class="docstring">
|
2803
|
-
<div class="discussion">
|
2804
|
-
|
2805
|
-
<p>Returns The confirmation message from Gandi.</p>
|
2806
|
-
|
2807
|
-
|
2808
|
-
</div>
|
2809
|
-
</div>
|
2810
|
-
<div class="tags">
|
2811
|
-
|
2812
|
-
<p class="tag_title">Returns:</p>
|
2813
|
-
<ul class="return">
|
2814
|
-
|
2815
|
-
<li>
|
2816
|
-
|
2817
|
-
|
2818
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
—
|
2823
|
-
<div class='inline'>
|
2824
|
-
<p>The confirmation message from Gandi.</p>
|
2825
|
-
</div>
|
2826
|
-
|
2827
|
-
</li>
|
2828
|
-
|
2829
|
-
</ul>
|
2830
|
-
<p class="tag_title">Raises:</p>
|
2831
|
-
<ul class="raise">
|
2832
|
-
|
2833
|
-
<li>
|
2834
|
-
|
2835
|
-
|
2836
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
—
|
2841
|
-
<div class='inline'>
|
2842
|
-
<p>if Gandi returns an error.</p>
|
2843
|
-
</div>
|
2844
|
-
|
2845
|
-
</li>
|
2846
|
-
|
2847
|
-
</ul>
|
2848
|
-
|
2849
|
-
</div><table class="source_code">
|
2850
|
-
<tr>
|
2851
|
-
<td>
|
2852
|
-
<pre class="lines">
|
2853
|
-
|
2854
|
-
|
2855
|
-
154
|
2856
|
-
155
|
2857
|
-
156
|
2858
|
-
157
|
2859
|
-
158
|
2860
|
-
159
|
2861
|
-
160
|
2862
|
-
161
|
2863
|
-
162
|
2864
|
-
163
|
2865
|
-
164
|
2866
|
-
165
|
2867
|
-
166
|
2868
|
-
167
|
2869
|
-
168
|
2870
|
-
169
|
2871
|
-
170
|
2872
|
-
171</pre>
|
2873
|
-
</td>
|
2874
|
-
<td>
|
2875
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 154</span>
|
2876
|
-
|
2877
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_replace_records_for'>replace_records_for</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>ttl:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2878
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>missing keyword: type</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='op'>&&</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2879
|
-
|
2880
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
2881
|
-
<span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../LiveDNS.html" title="GandiV5::LiveDNS (class)">LiveDNS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_require_valid_record_type'><span class='object_link'><a href="../LiveDNS.html#require_valid_record_type-class_method" title="GandiV5::LiveDNS.require_valid_record_type (method)">require_valid_record_type</a></span></span> <span class='id identifier rubyid_type'>type</span>
|
2882
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>rrset_values:</span> <span class='id identifier rubyid_records'>records</span><span class='comma'>,</span> <span class='label'>rrset_ttl:</span> <span class='id identifier rubyid_ttl'>ttl</span> <span class='rbrace'>}</span>
|
2883
|
-
<span class='comment'># body[:rrset_ttl] = ttl if ttl
|
2884
|
-
</span> <span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
2885
|
-
|
2886
|
-
<span class='kw'>else</span>
|
2887
|
-
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
2888
|
-
<span class='label'>items:</span> <span class='id identifier rubyid_records'>records</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_r'>r</span><span class='op'>|</span> <span class='id identifier rubyid_r'>r</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rrset_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_k'>k</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
2889
|
-
<span class='rbrace'>}</span>
|
2890
|
-
<span class='id identifier rubyid__response'>_response</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../GandiV5.html" title="GandiV5 (class)">GandiV5</a></span></span><span class='period'>.</span><span class='id identifier rubyid_put'><span class='object_link'><a href="../../GandiV5.html#put-class_method" title="GandiV5.put (method)">put</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/records/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
|
2891
|
-
<span class='kw'>end</span>
|
2892
|
-
|
2893
|
-
<span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>message</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
2894
|
-
<span class='kw'>end</span></pre>
|
2895
|
-
</td>
|
2896
|
-
</tr>
|
2897
|
-
</table>
|
2898
|
-
</div>
|
2899
|
-
|
2900
|
-
<div class="method_details ">
|
2901
|
-
<h3 class="signature " id="zone-instance_method">
|
2902
|
-
|
2903
|
-
#<strong>zone</strong> ⇒ <tt><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">GandiV5::LiveDNS::Zone</a></span></tt>
|
2904
|
-
|
2905
|
-
|
2906
|
-
|
2907
|
-
|
2908
|
-
|
2909
|
-
</h3><div class="docstring">
|
2910
|
-
<div class="discussion">
|
2911
|
-
|
2912
|
-
<p>The domain's zone (fetching from Gandi if required).</p>
|
2913
|
-
|
2914
|
-
|
2915
|
-
</div>
|
2916
|
-
</div>
|
2917
|
-
<div class="tags">
|
2918
|
-
|
2919
|
-
<p class="tag_title">Returns:</p>
|
2920
|
-
<ul class="return">
|
2921
|
-
|
2922
|
-
<li>
|
2923
|
-
|
2924
|
-
|
2925
|
-
<span class='type'>(<tt><span class='object_link'><a href="Zone.html" title="GandiV5::LiveDNS::Zone (class)">GandiV5::LiveDNS::Zone</a></span></tt>)</span>
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
</li>
|
2930
|
-
|
2931
|
-
</ul>
|
2932
|
-
<p class="tag_title">Raises:</p>
|
2933
|
-
<ul class="raise">
|
2934
|
-
|
2935
|
-
<li>
|
2936
|
-
|
2937
|
-
|
2938
|
-
<span class='type'>(<tt><span class='object_link'><a href="../Error/GandiError.html" title="GandiV5::Error::GandiError (class)">GandiV5::Error::GandiError</a></span></tt>)</span>
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2942
|
-
—
|
2943
|
-
<div class='inline'>
|
2944
|
-
<p>if Gandi returns an error.</p>
|
2945
|
-
</div>
|
2946
|
-
|
2947
|
-
</li>
|
2948
|
-
|
2949
|
-
</ul>
|
2950
|
-
|
2951
|
-
</div><table class="source_code">
|
2952
|
-
<tr>
|
2953
|
-
<td>
|
2954
|
-
<pre class="lines">
|
2955
|
-
|
2956
|
-
|
2957
|
-
194
|
2958
|
-
195
|
2959
|
-
196</pre>
|
2960
|
-
</td>
|
2961
|
-
<td>
|
2962
|
-
<pre class="code"><span class="info file"># File 'lib/gandi_v5/live_dns/domain.rb', line 194</span>
|
2963
|
-
|
2964
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_zone'>zone</span>
|
2965
|
-
<span class='ivar'>@zone</span> <span class='op'>||=</span> <span class='id identifier rubyid_fetch_zone'>fetch_zone</span>
|
2966
|
-
<span class='kw'>end</span></pre>
|
2967
|
-
</td>
|
2968
|
-
</tr>
|
2969
|
-
</table>
|
2970
|
-
</div>
|
2971
|
-
|
2972
|
-
</div>
|
2973
|
-
|
2974
|
-
</div>
|
2975
|
-
|
2976
|
-
<div id="footer">
|
2977
|
-
Generated on Mon Jul 22 16:44:33 2019 by
|
2978
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2979
|
-
0.9.19 (ruby-2.6.3).
|
2980
|
-
</div>
|
2981
|
-
|
2982
|
-
</div>
|
2983
|
-
</body>
|
2984
|
-
</html>
|