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.
56 57 58 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 56 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.
78 79 80 81 82 83 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 78 def create_delegation_signer_record(account_id, domain_id, attributes, = {}) Extra.validate_mandatory_attributes(attributes, [:algorithm]) 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.
97 98 99 100 101 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 97 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.
30 31 32 33 34 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 30 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.
117 118 119 120 121 |
# File 'lib/dnsimple/client/domains_delegation_signer_records.rb', line 117 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 |