class RDStation::Analytics
Public Class Methods
new(authorization:)
click to toggle source
# File lib/rdstation/analytics.rb, line 8 def initialize(authorization:) @authorization = authorization end
Public Instance Methods
conversions(query_params={})
click to toggle source
# File lib/rdstation/analytics.rb, line 19 def conversions(query_params={}) retryable_request(@authorization) do |authorization| response = self.class.get(base_url('conversions'), headers: authorization.headers, query: query_params) ApiResponse.build(response) end end
email_marketing(query_params={})
click to toggle source
# File lib/rdstation/analytics.rb, line 12 def email_marketing(query_params={}) retryable_request(@authorization) do |authorization| response = self.class.get(base_url('emails'), headers: authorization.headers, query: query_params) ApiResponse.build(response) end end
Private Instance Methods
base_url(path='')
click to toggle source
# File lib/rdstation/analytics.rb, line 28 def base_url(path='') "#{RDStation.host}/platform/analytics/#{path}" end