Method: Dnsimple::Client::TemplatesRecords#records
- Defined in:
- lib/dnsimple/client/templates_records.rb
#records(account_id, template_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::TemplateRecord> Also known as: list_records
Lists the records in the template.
29 30 31 32 33 34 |
# File 'lib/dnsimple/client/templates_records.rb', line 29 def records(account_id, template_id, = {}) endpoint = Client.versioned("/%s/templates/%s/records" % [account_id, template_id]) response = client.get(endpoint, Options::ListOptions.new()) Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::TemplateRecord.new(r) }) end |