Module: Dnsimple::Client::DomainsDelegationSignerRecords
- Included in:
- DomainsService
- Defined in:
- lib/dnsimple/client/domains_delegation_signer_records.rb
Instance Method Summary collapse
-
#all_delegation_signer_records(account_id, domain_id, options = {}) ⇒ Dnsimple::CollectionResponse<Dnsimple::Struct::DelegationSignerRecord>
Lists ALL the delegation signer records for the domain.
-
#create_delegation_signer_record(account_id, domain_id, attributes, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::DelegationSignerRecord>
Creates a delegation signer record for the domain.
-
#delegation_signer_record(account_id, domain_id, ds_record_id, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::DelegationSignerRecord>
Gets a delegation signer record for the domain.
-
#delegation_signer_records(account_id, domain_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::DelegationSignerRecord>
Lists the delegation signer records for the domain.
-
#delete_delegation_signer_record(account_id, domain_id, ds_record_id, options = {}) ⇒ Dnsimple::Response<nil>
Deletes a delegation signer record for the domain.
Instance Method Details
#all_delegation_signer_records(account_id, domain_id, options = {}) ⇒ Dnsimple::CollectionResponse<Dnsimple::Struct::DelegationSignerRecord>
Lists ALL the delegation signer records for the domain.
This method is similar to #delegation_signer_records, but instead of returning the results of a specific page it iterates all the pages and returns the entire collection.
Please use this method carefully, as fetching the entire collection will increase the number of requests you send to the API server and you may eventually risk to hit the throttle limit.
54 55 56 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 54 def all_delegation_signer_records(account_id, domain_id, = {}) paginate(:delegation_signer_records, account_id, domain_id, ) end |
#create_delegation_signer_record(account_id, domain_id, attributes, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::DelegationSignerRecord>
Creates a delegation signer record for the domain.
75 76 77 78 79 80 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 75 def create_delegation_signer_record(account_id, domain_id, attributes, = {}) Extra.validate_mandatory_attributes(attributes, [:algorithm, :digest, :digest_type, :keytag]) response = client.post(Client.versioned("/%s/domains/%s/ds_records" % [account_id, domain_id]), attributes, ) Dnsimple::Response.new(response, Struct::DelegationSignerRecord.new(response["data"])) end |
#delegation_signer_record(account_id, domain_id, ds_record_id, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::DelegationSignerRecord>
Gets a delegation signer record for the domain.
94 95 96 97 98 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 94 def delegation_signer_record(account_id, domain_id, ds_record_id, = {}) response = client.get(Client.versioned("/%s/domains/%s/ds_records/%s" % [account_id, domain_id, ds_record_id]), ) Dnsimple::Response.new(response, Struct::DelegationSignerRecord.new(response["data"])) end |
#delegation_signer_records(account_id, domain_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::DelegationSignerRecord>
Lists the delegation signer records for the domain.
28 29 30 31 32 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 28 def delegation_signer_records(account_id, domain_id, = {}) response = client.get(Client.versioned("/%s/domains/%s/ds_records" % [account_id, domain_id]), Options::ListOptions.new()) Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::DelegationSignerRecord.new(r) }) end |
#delete_delegation_signer_record(account_id, domain_id, ds_record_id, options = {}) ⇒ Dnsimple::Response<nil>
Deletes a delegation signer record for the domain.
WARNING: this cannot be undone.
114 115 116 117 118 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 114 def delete_delegation_signer_record(account_id, domain_id, ds_record_id, = {}) response = client.delete(Client.versioned("/%s/domains/%s/ds_records/%s" % [account_id, domain_id, ds_record_id]), nil, ) Dnsimple::Response.new(response, nil) end |