Class: Google::Apis::UrlshortenerV1::AnalyticsSnapshot

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/urlshortener_v1/classes.rb,
generated/google/apis/urlshortener_v1/representations.rb,
generated/google/apis/urlshortener_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AnalyticsSnapshot

Returns a new instance of AnalyticsSnapshot



63
64
65
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 63

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#browsersArray<Google::Apis::UrlshortenerV1::StringCount>

Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available. Corresponds to the JSON property browsers



33
34
35
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 33

def browsers
  @browsers
end

#countriesArray<Google::Apis::UrlshortenerV1::StringCount>

Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by ( descending) click counts. Only present if this data is available. Corresponds to the JSON property countries



39
40
41
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 39

def countries
  @countries
end

#long_url_clicksFixnum

Number of clicks on all goo.gl short URLs pointing to this long URL. Corresponds to the JSON property longUrlClicks

Returns:

  • (Fixnum)


44
45
46
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 44

def long_url_clicks
  @long_url_clicks
end

#platformsArray<Google::Apis::UrlshortenerV1::StringCount>

Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available. Corresponds to the JSON property platforms



50
51
52
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 50

def platforms
  @platforms
end

#referrersArray<Google::Apis::UrlshortenerV1::StringCount>

Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available. Corresponds to the JSON property referrers



56
57
58
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 56

def referrers
  @referrers
end

#short_url_clicksFixnum

Number of clicks on this short URL. Corresponds to the JSON property shortUrlClicks

Returns:

  • (Fixnum)


61
62
63
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 61

def short_url_clicks
  @short_url_clicks
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



68
69
70
71
72
73
74
75
# File 'generated/google/apis/urlshortener_v1/classes.rb', line 68

def update!(**args)
  @browsers = args[:browsers] if args.key?(:browsers)
  @countries = args[:countries] if args.key?(:countries)
  @long_url_clicks = args[:long_url_clicks] if args.key?(:long_url_clicks)
  @platforms = args[:platforms] if args.key?(:platforms)
  @referrers = args[:referrers] if args.key?(:referrers)
  @short_url_clicks = args[:short_url_clicks] if args.key?(:short_url_clicks)
end