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.
14487 14488 14489 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14487 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
14429 14430 14431 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14429 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
14441 14442 14443 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14441 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
14447 14448 14449 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14447 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
14453 14454 14455 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14453 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
14459 14460 14461 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14459 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
14465 14466 14467 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14465 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
14471 14472 14473 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14471 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
14478 14479 14480 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14478 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
14485 14486 14487 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14485 def topic @topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14492 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 |