Class: SearchApi::Resources::GoogleTrends
Instance Method Summary
collapse
#initialize
Instance Method Details
#interest_by_region(query, **params) ⇒ Object
14
15
16
|
# File 'lib/searchapi/resources/google_trends.rb', line 14
def interest_by_region(query, **params)
search(query, data_type: "GEO_MAP", **params)
end
|
#interest_over_time(query, **params) ⇒ Object
10
11
12
|
# File 'lib/searchapi/resources/google_trends.rb', line 10
def interest_over_time(query, **params)
search(query, data_type: "TIMESERIES", **params)
end
|
18
19
20
|
# File 'lib/searchapi/resources/google_trends.rb', line 18
def related_queries(query, **params)
search(query, data_type: "RELATED_QUERIES", **params)
end
|
22
23
24
|
# File 'lib/searchapi/resources/google_trends.rb', line 22
def related_topics(query, **params)
search(query, data_type: "RELATED_TOPICS", **params)
end
|
#search(query, data_type:, **params) ⇒ Object
6
7
8
|
# File 'lib/searchapi/resources/google_trends.rb', line 6
def search(query, data_type:, **params)
get(q: query, data_type: data_type, **params)
end
|