Module: Dnsimple::Client::DnsAnalytics
- Included in:
- DnsAnalyticsService
- Defined in:
- lib/dnsimple/client/dns_analytics.rb
Instance Method Summary collapse
-
#query(account_id, options = {}) ⇒ Dnsimple::PaginatedResponseWithQuery<Dnsimple::Struct::DnsAnalytics>
Queries DNS Analytics data for the provided account.
Instance Method Details
#query(account_id, options = {}) ⇒ Dnsimple::PaginatedResponseWithQuery<Dnsimple::Struct::DnsAnalytics>
Queries DNS Analytics data for the provided account
21 22 23 24 25 26 |
# File 'lib/dnsimple/client/dns_analytics.rb', line 21 def query(account_id, = {}) = Options::ListOptions.new() response = client.get(Client.versioned("/%s/dns_analytics" % [account_id]), ) Dnsimple::PaginatedResponseWithQuery.new(response, response["data"]["rows"].map { |row| Struct::DnsAnalytics.new(response["data"]["headers"].zip(row)) }) end |