Class: Google::Apis::ContentV2_1::TopicTrends
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::TopicTrends
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Overview
Topic trends fields requested by the merchant in the query. Field values are
only set if the merchant queries TopicTrendsView. Forecast data can be
queried up to 13 weeks by passing a future date in the date field.
Historical data is measured daily, and forecasted data is projected weekly.
All data points are normalized based on the highest data points returned in
the response. If you make separate queries with different date ranges, you
might see different values for the same date in each response. The recommended
way to get a trend score of a topic is last7_days_search_interest / last$day
_days_search_interest - 1. You can view trends for up to eight topics at a
time.
Instance Attribute Summary collapse
-
#customer_country_code ⇒ String
Country trends are calculated for.
-
#date ⇒ Google::Apis::ContentV2_1::Date
Represents a whole or partial calendar date, such as a birthday.
-
#last120_days_search_interest ⇒ Float
Search interest in the last 120 days, with the same normalization as search_interest.
-
#last30_days_search_interest ⇒ Float
Search interest in the last 30 days, with the same normalization as search_interest.
-
#last7_days_search_interest ⇒ Float
Search interest in the last 7 days, with the same normalization as search_interest.
-
#last90_days_search_interest ⇒ Float
Search interest in the last 90 days, with the same normalization as search_interest.
-
#next7_days_search_interest ⇒ Float
Estimated search interest in the next 7 days, with the same normalization as search_interest.
-
#search_interest ⇒ Float
Daily search interest, normalized to the time and country to make comparisons easier, with 100 representing peak popularity (from 0 to 100) for the requested time period and location.
-
#topic ⇒ String
Google-provided topic trends are calculated for.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TopicTrends
constructor
A new instance of TopicTrends.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TopicTrends
Returns a new instance of TopicTrends.
13746 13747 13748 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13746 def initialize(**args) update!(**args) end |
Instance Attribute Details
#customer_country_code ⇒ String
Country trends are calculated for. Must be a two-letter country code (ISO 3166-
1-alpha-2 code), for example, “US”.
Corresponds to the JSON property customerCountryCode
13688 13689 13690 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13688 def customer_country_code @customer_country_code end |
#date ⇒ Google::Apis::ContentV2_1::Date
Represents a whole or partial calendar date, such as a birthday. The time of
day and time zone are either specified elsewhere or are insignificant. The
date is relative to the Gregorian Calendar. This can represent one of the
following: * A full date, with non-zero year, month, and day values. * A month
and day, with a zero year (for example, an anniversary). * A year on its own,
with a zero month and a zero day. * A year and month, with a zero day (for
example, a credit card expiration date). Related types: * google.type.
TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
Corresponds to the JSON property date
13700 13701 13702 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13700 def date @date end |
#last120_days_search_interest ⇒ Float
Search interest in the last 120 days, with the same normalization as
search_interest. This field is only present for a past date.
Corresponds to the JSON property last120DaysSearchInterest
13706 13707 13708 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13706 def last120_days_search_interest @last120_days_search_interest end |
#last30_days_search_interest ⇒ Float
Search interest in the last 30 days, with the same normalization as
search_interest. This field is only present for a past date.
Corresponds to the JSON property last30DaysSearchInterest
13712 13713 13714 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13712 def last30_days_search_interest @last30_days_search_interest end |
#last7_days_search_interest ⇒ Float
Search interest in the last 7 days, with the same normalization as
search_interest. This field is only present for a past date.
Corresponds to the JSON property last7DaysSearchInterest
13718 13719 13720 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13718 def last7_days_search_interest @last7_days_search_interest end |
#last90_days_search_interest ⇒ Float
Search interest in the last 90 days, with the same normalization as
search_interest. This field is only present for a past date.
Corresponds to the JSON property last90DaysSearchInterest
13724 13725 13726 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13724 def last90_days_search_interest @last90_days_search_interest end |
#next7_days_search_interest ⇒ Float
Estimated search interest in the next 7 days, with the same normalization as
search_interest. This field is only present for a future date.
Corresponds to the JSON property next7DaysSearchInterest
13730 13731 13732 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13730 def next7_days_search_interest @next7_days_search_interest end |
#search_interest ⇒ Float
Daily search interest, normalized to the time and country to make comparisons
easier, with 100 representing peak popularity (from 0 to 100) for the
requested time period and location.
Corresponds to the JSON property searchInterest
13737 13738 13739 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13737 def search_interest @search_interest end |
#topic ⇒ String
Google-provided topic trends are calculated for. Only top eight topics are
returned. Topic is what shoppers are searching for on Google, grouped by the
same concept.
Corresponds to the JSON property topic
13744 13745 13746 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13744 def topic @topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 13751 def update!(**args) @customer_country_code = args[:customer_country_code] if args.key?(:customer_country_code) @date = args[:date] if args.key?(:date) @last120_days_search_interest = args[:last120_days_search_interest] if args.key?(:last120_days_search_interest) @last30_days_search_interest = args[:last30_days_search_interest] if args.key?(:last30_days_search_interest) @last7_days_search_interest = args[:last7_days_search_interest] if args.key?(:last7_days_search_interest) @last90_days_search_interest = args[:last90_days_search_interest] if args.key?(:last90_days_search_interest) @next7_days_search_interest = args[:next7_days_search_interest] if args.key?(:next7_days_search_interest) @search_interest = args[:search_interest] if args.key?(:search_interest) @topic = args[:topic] if args.key?(:topic) end |