Module: Dnsimple::Client::ZonesDistributions

Included in:
ZonesService
Defined in:
lib/dnsimple/client/zones_distributions.rb

Instance Method Summary collapse

Instance Method Details

#zone_distribution(account_id, zone_id, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::ZoneDistribution>

Checks if a zone change is fully distributed to all DNSimple name servers across the globe.

Parameters:

  • account_id (Integer)

    the account ID

  • zone_id (#to_s)

    the zone name

  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:


19
20
21
22
23
# File 'lib/dnsimple/client/zones_distributions.rb', line 19

def zone_distribution(, zone_id, options = {})
  response = client.get(Client.versioned("/%s/zones/%s/distribution" % [, zone_id]), options)

  Dnsimple::Response.new(response, Struct::ZoneDistribution.new(response["data"]))
end

#zone_record_distribution(account_id, zone_id, record_id, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::ZoneDistribution>

Checks if a zone record is fully distributed to all DNSimple name servers across the globe.

Examples:

Get record 123 in zone “example.com”

client.zones.zone_record_distribution(1010, "example.com", 123)

Parameters:

  • account_id (Integer)

    the account ID

  • zone_id (String)

    the zone name

  • record_id (Integer)

    the record ID

  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:


41
42
43
44
45
# File 'lib/dnsimple/client/zones_distributions.rb', line 41

def zone_record_distribution(, zone_id, record_id, options = {})
  response = client.get(Client.versioned("/%s/zones/%s/records/%s/distribution" % [, zone_id, record_id]), options)

  Dnsimple::Response.new(response, Struct::ZoneDistribution.new(response["data"]))
end