class Bitly::API::ClickMetric::List
Attributes
facet[R]
unit[R]
unit_reference[R]
units[R]
Public Class Methods
new(items:, response:, units:, unit_reference:, unit:, facet:)
click to toggle source
Calls superclass method
Bitly::API::List::new
# File lib/bitly/api/click_metric.rb, line 13 def initialize(items:, response:, units:, unit_reference:, unit:, facet:) super(items: items, response: response) @units = units # It looks like the API for referrers_by_domain returns the # unit_reference in seconds, not a string, like every other endpoint. begin @unit_reference = Time.parse(unit_reference) if unit_reference rescue TypeError @unit_reference = Time.at(unit_reference) end @unit = unit @facet = facet end