Class: GandiV5::LiveDNS
- Inherits:
-
Object
show all
- Defined in:
- lib/gandi_v5/live_dns.rb,
lib/gandi_v5/live_dns/zone.rb,
lib/gandi_v5/live_dns/domain.rb,
lib/gandi_v5/live_dns/record_set.rb,
lib/gandi_v5/live_dns/zone/snapshot.rb,
lib/gandi_v5/live_dns/has_zone_records.rb
Overview
Gandi LiveDNS Management API.
Defined Under Namespace
Modules: HasZoneRecords
Classes: Domain, RecordSet, Zone
Constant Summary
collapse
- BASE =
'https://dns.api.gandi.net/api/v5/'
- RECORD_TYPES =
%w[
A AAAA CNAME MX NS TXT ALIAS
WKS SRV LOC SPF CAA DS SSHFP PTR KEY DNAME TLSA OPENPGPKEY CDS
].freeze
Class Method Summary
collapse
Class Method Details
.domain(fqdn) ⇒ Object
15
16
17
|
# File 'lib/gandi_v5/live_dns.rb', line 15
def self.domain(fqdn)
GandiV5::LiveDNS::Domain.fetch(fqdn)
end
|
.domains ⇒ Object
20
21
22
|
# File 'lib/gandi_v5/live_dns.rb', line 20
def self.domains
GandiV5::LiveDNS::Domain.list
end
|
.require_valid_record_type(type) ⇒ nil
Raise an error if passed type is invalid. rubocop:disable Style/GuardClause
39
40
41
42
43
|
# File 'lib/gandi_v5/live_dns.rb', line 39
def self.require_valid_record_type(type)
unless RECORD_TYPES.include?(type)
fail ArgumentError, "type must be one of #{RECORD_TYPES.join(', ')}"
end
end
|
.zone(uuid) ⇒ Object
25
26
27
|
# File 'lib/gandi_v5/live_dns.rb', line 25
def self.zone(uuid)
GandiV5::LiveDNS::Zone.fetch(uuid)
end
|
.zones ⇒ Object
30
31
32
|
# File 'lib/gandi_v5/live_dns.rb', line 30
def self.zones
GandiV5::LiveDNS::Zone.list
end
|