Method: Dnsimple::Client::Templates#all_templates

Defined in:
lib/dnsimple/client/templates.rb

#all_templates(account_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::Template>

Lists ALL the templates in the account.

This method is similar to #templates, 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.

Examples:

List all the templates for account 1010:

client.templates.all_templates(1010)

Parameters:

  • account_id (Integer)

    the account ID

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

    the filtering and sorting options

Options Hash (options):

  • :page (Integer)

    current page (pagination)

  • :per_page (Integer)

    number of entries to return (pagination)

  • :sort (String)

    sorting policy

Returns:

Raises:

See Also:



58
59
60
# File 'lib/dnsimple/client/templates.rb', line 58

def all_templates(, options = {})
  paginate(:templates, , options)
end