Module: Dnsimple::Client::DnsAnalytics

Included in:
DnsAnalyticsService
Defined in:
lib/dnsimple/client/dns_analytics.rb

Instance Method Summary collapse

Instance Method Details

#query(account_id, options = {}) ⇒ Dnsimple::PaginatedResponseWithQuery<Dnsimple::Struct::DnsAnalytics>

Queries DNS Analytics data for the provided account

Parameters:

  • account_id (Integer)

    the account ID

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

    the filtering, sorting, and grouping options

Options Hash (options):

  • :page (Integer)

    current page (pagination)

  • :per_page (Integer)

    number of entries to return (pagination)

  • :sort (String)

    sorting policy

  • :filter (Hash)

    filtering policy

  • :groupings (String)

    groupings policy

Returns:

Raises:

See Also:



21
22
23
24
25
26
# File 'lib/dnsimple/client/dns_analytics.rb', line 21

def query(, options = {})
  list_options = Options::ListOptions.new(options)
  response = client.get(Client.versioned("/%s/dns_analytics" % []), list_options)

  Dnsimple::PaginatedResponseWithQuery.new(response, response["data"]["rows"].map { |row| Struct::DnsAnalytics.new(response["data"]["headers"].zip(row)) })
end