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.
14149 14150 14151 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14149 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
14091 14092 14093 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14091 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
14103 14104 14105 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14103 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
14109 14110 14111 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14109 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
14115 14116 14117 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14115 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
14121 14122 14123 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14121 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
14127 14128 14129 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14127 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
14133 14134 14135 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14133 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
14140 14141 14142 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14140 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
14147 14148 14149 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14147 def topic @topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 14154 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 |