scrapebadger 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
|
@@ -0,0 +1,3191 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ScrapeBadger API
|
|
3
|
+
|
|
4
|
+
#Unified credit-based scraping API. https://docs.scrapebadger.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module ScrapeBadger
|
|
16
|
+
class GoogleApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get author citations-per-year chart
|
|
23
|
+
# Return the citations-per-year chart for a Google Scholar author.
|
|
24
|
+
# @param author_id [String] Scholar user ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
27
|
+
# @return [Object]
|
|
28
|
+
def google_get_author_citations_per_year_chart(author_id, opts = {})
|
|
29
|
+
data, _status_code, _headers = google_get_author_citations_per_year_chart_with_http_info(author_id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get author citations-per-year chart
|
|
34
|
+
# Return the citations-per-year chart for a Google Scholar author.
|
|
35
|
+
# @param author_id [String] Scholar user ID
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
38
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
39
|
+
def google_get_author_citations_per_year_chart_with_http_info(author_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_author_citations_per_year_chart ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'author_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && author_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'author_id' when calling GoogleApi.google_get_author_citations_per_year_chart"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/v1/google/scholar/author/citation'
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
query_params[:'author_id'] = author_id
|
|
53
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:debug_body]
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:operation => :"GoogleApi.google_get_author_citations_per_year_chart",
|
|
74
|
+
:header_params => header_params,
|
|
75
|
+
:query_params => query_params,
|
|
76
|
+
:form_params => form_params,
|
|
77
|
+
:body => post_body,
|
|
78
|
+
:auth_names => auth_names,
|
|
79
|
+
:return_type => return_type
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
83
|
+
if @api_client.config.debugging
|
|
84
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_author_citations_per_year_chart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
85
|
+
end
|
|
86
|
+
return data, status_code, headers
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Get business posts
|
|
90
|
+
# @param data_id [String] Maps data ID
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [String] :next_page_token
|
|
93
|
+
# @return [Object]
|
|
94
|
+
def google_get_business_posts(data_id, opts = {})
|
|
95
|
+
data, _status_code, _headers = google_get_business_posts_with_http_info(data_id, opts)
|
|
96
|
+
data
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Get business posts
|
|
100
|
+
# @param data_id [String] Maps data ID
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @option opts [String] :next_page_token
|
|
103
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
104
|
+
def google_get_business_posts_with_http_info(data_id, opts = {})
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_business_posts ...'
|
|
107
|
+
end
|
|
108
|
+
# verify the required parameter 'data_id' is set
|
|
109
|
+
if @api_client.config.client_side_validation && data_id.nil?
|
|
110
|
+
fail ArgumentError, "Missing the required parameter 'data_id' when calling GoogleApi.google_get_business_posts"
|
|
111
|
+
end
|
|
112
|
+
# resource path
|
|
113
|
+
local_var_path = '/v1/google/maps/posts'
|
|
114
|
+
|
|
115
|
+
# query parameters
|
|
116
|
+
query_params = opts[:query_params] || {}
|
|
117
|
+
query_params[:'data_id'] = data_id
|
|
118
|
+
query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
|
|
119
|
+
|
|
120
|
+
# header parameters
|
|
121
|
+
header_params = opts[:header_params] || {}
|
|
122
|
+
# HTTP header 'Accept' (if needed)
|
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:debug_body]
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:operation => :"GoogleApi.google_get_business_posts",
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_business_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Get citation formats for a Scholar paper
|
|
155
|
+
# Return MLA, APA, Chicago, Harvard, and Vancouver citation formats for a paper.
|
|
156
|
+
# @param q [String] Cluster ID from a search result
|
|
157
|
+
# @param [Hash] opts the optional parameters
|
|
158
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
159
|
+
# @return [Object]
|
|
160
|
+
def google_get_citation_formats_for_a_scholar_paper(q, opts = {})
|
|
161
|
+
data, _status_code, _headers = google_get_citation_formats_for_a_scholar_paper_with_http_info(q, opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Get citation formats for a Scholar paper
|
|
166
|
+
# Return MLA, APA, Chicago, Harvard, and Vancouver citation formats for a paper.
|
|
167
|
+
# @param q [String] Cluster ID from a search result
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
170
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
171
|
+
def google_get_citation_formats_for_a_scholar_paper_with_http_info(q, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_citation_formats_for_a_scholar_paper ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'q' is set
|
|
176
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_get_citation_formats_for_a_scholar_paper"
|
|
178
|
+
end
|
|
179
|
+
# resource path
|
|
180
|
+
local_var_path = '/v1/google/scholar/cite'
|
|
181
|
+
|
|
182
|
+
# query parameters
|
|
183
|
+
query_params = opts[:query_params] || {}
|
|
184
|
+
query_params[:'q'] = q
|
|
185
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
186
|
+
|
|
187
|
+
# header parameters
|
|
188
|
+
header_params = opts[:header_params] || {}
|
|
189
|
+
# HTTP header 'Accept' (if needed)
|
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
|
|
192
|
+
# form parameters
|
|
193
|
+
form_params = opts[:form_params] || {}
|
|
194
|
+
|
|
195
|
+
# http body (model)
|
|
196
|
+
post_body = opts[:debug_body]
|
|
197
|
+
|
|
198
|
+
# return_type
|
|
199
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
200
|
+
|
|
201
|
+
# auth_names
|
|
202
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
203
|
+
|
|
204
|
+
new_options = opts.merge(
|
|
205
|
+
:operation => :"GoogleApi.google_get_citation_formats_for_a_scholar_paper",
|
|
206
|
+
:header_params => header_params,
|
|
207
|
+
:query_params => query_params,
|
|
208
|
+
:form_params => form_params,
|
|
209
|
+
:body => post_body,
|
|
210
|
+
:auth_names => auth_names,
|
|
211
|
+
:return_type => return_type
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_citation_formats_for_a_scholar_paper\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
217
|
+
end
|
|
218
|
+
return data, status_code, headers
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Get place details
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @option opts [String] :place_id
|
|
224
|
+
# @option opts [String] :data_id
|
|
225
|
+
# @option opts [String] :hl (default to 'en')
|
|
226
|
+
# @option opts [String] :gl (default to 'us')
|
|
227
|
+
# @return [Object]
|
|
228
|
+
def google_get_place_details(opts = {})
|
|
229
|
+
data, _status_code, _headers = google_get_place_details_with_http_info(opts)
|
|
230
|
+
data
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Get place details
|
|
234
|
+
# @param [Hash] opts the optional parameters
|
|
235
|
+
# @option opts [String] :place_id
|
|
236
|
+
# @option opts [String] :data_id
|
|
237
|
+
# @option opts [String] :hl (default to 'en')
|
|
238
|
+
# @option opts [String] :gl (default to 'us')
|
|
239
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
240
|
+
def google_get_place_details_with_http_info(opts = {})
|
|
241
|
+
if @api_client.config.debugging
|
|
242
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_place_details ...'
|
|
243
|
+
end
|
|
244
|
+
# resource path
|
|
245
|
+
local_var_path = '/v1/google/maps/place'
|
|
246
|
+
|
|
247
|
+
# query parameters
|
|
248
|
+
query_params = opts[:query_params] || {}
|
|
249
|
+
query_params[:'place_id'] = opts[:'place_id'] if !opts[:'place_id'].nil?
|
|
250
|
+
query_params[:'data_id'] = opts[:'data_id'] if !opts[:'data_id'].nil?
|
|
251
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
252
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
253
|
+
|
|
254
|
+
# header parameters
|
|
255
|
+
header_params = opts[:header_params] || {}
|
|
256
|
+
# HTTP header 'Accept' (if needed)
|
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
258
|
+
|
|
259
|
+
# form parameters
|
|
260
|
+
form_params = opts[:form_params] || {}
|
|
261
|
+
|
|
262
|
+
# http body (model)
|
|
263
|
+
post_body = opts[:debug_body]
|
|
264
|
+
|
|
265
|
+
# return_type
|
|
266
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
267
|
+
|
|
268
|
+
# auth_names
|
|
269
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
270
|
+
|
|
271
|
+
new_options = opts.merge(
|
|
272
|
+
:operation => :"GoogleApi.google_get_place_details",
|
|
273
|
+
:header_params => header_params,
|
|
274
|
+
:query_params => query_params,
|
|
275
|
+
:form_params => form_params,
|
|
276
|
+
:body => post_body,
|
|
277
|
+
:auth_names => auth_names,
|
|
278
|
+
:return_type => return_type
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
282
|
+
if @api_client.config.debugging
|
|
283
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_place_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
284
|
+
end
|
|
285
|
+
return data, status_code, headers
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Get place photos
|
|
289
|
+
# @param data_id [String] Maps data ID
|
|
290
|
+
# @param [Hash] opts the optional parameters
|
|
291
|
+
# @option opts [String] :hl (default to 'en')
|
|
292
|
+
# @option opts [String] :next_page_token
|
|
293
|
+
# @return [Object]
|
|
294
|
+
def google_get_place_photos(data_id, opts = {})
|
|
295
|
+
data, _status_code, _headers = google_get_place_photos_with_http_info(data_id, opts)
|
|
296
|
+
data
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Get place photos
|
|
300
|
+
# @param data_id [String] Maps data ID
|
|
301
|
+
# @param [Hash] opts the optional parameters
|
|
302
|
+
# @option opts [String] :hl (default to 'en')
|
|
303
|
+
# @option opts [String] :next_page_token
|
|
304
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
305
|
+
def google_get_place_photos_with_http_info(data_id, opts = {})
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_place_photos ...'
|
|
308
|
+
end
|
|
309
|
+
# verify the required parameter 'data_id' is set
|
|
310
|
+
if @api_client.config.client_side_validation && data_id.nil?
|
|
311
|
+
fail ArgumentError, "Missing the required parameter 'data_id' when calling GoogleApi.google_get_place_photos"
|
|
312
|
+
end
|
|
313
|
+
# resource path
|
|
314
|
+
local_var_path = '/v1/google/maps/photos'
|
|
315
|
+
|
|
316
|
+
# query parameters
|
|
317
|
+
query_params = opts[:query_params] || {}
|
|
318
|
+
query_params[:'data_id'] = data_id
|
|
319
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
320
|
+
query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
|
|
321
|
+
|
|
322
|
+
# header parameters
|
|
323
|
+
header_params = opts[:header_params] || {}
|
|
324
|
+
# HTTP header 'Accept' (if needed)
|
|
325
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
326
|
+
|
|
327
|
+
# form parameters
|
|
328
|
+
form_params = opts[:form_params] || {}
|
|
329
|
+
|
|
330
|
+
# http body (model)
|
|
331
|
+
post_body = opts[:debug_body]
|
|
332
|
+
|
|
333
|
+
# return_type
|
|
334
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
335
|
+
|
|
336
|
+
# auth_names
|
|
337
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
338
|
+
|
|
339
|
+
new_options = opts.merge(
|
|
340
|
+
:operation => :"GoogleApi.google_get_place_photos",
|
|
341
|
+
:header_params => header_params,
|
|
342
|
+
:query_params => query_params,
|
|
343
|
+
:form_params => form_params,
|
|
344
|
+
:body => post_body,
|
|
345
|
+
:auth_names => auth_names,
|
|
346
|
+
:return_type => return_type
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
350
|
+
if @api_client.config.debugging
|
|
351
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_place_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
352
|
+
end
|
|
353
|
+
return data, status_code, headers
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Get place reviews
|
|
357
|
+
# @param data_id [String] Maps data ID
|
|
358
|
+
# @param [Hash] opts the optional parameters
|
|
359
|
+
# @option opts [String] :sort_by (default to 'qualityScore')
|
|
360
|
+
# @option opts [String] :hl (default to 'en')
|
|
361
|
+
# @option opts [String] :next_page_token
|
|
362
|
+
# @option opts [Integer] :results (default to 10)
|
|
363
|
+
# @return [Object]
|
|
364
|
+
def google_get_place_reviews(data_id, opts = {})
|
|
365
|
+
data, _status_code, _headers = google_get_place_reviews_with_http_info(data_id, opts)
|
|
366
|
+
data
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# Get place reviews
|
|
370
|
+
# @param data_id [String] Maps data ID
|
|
371
|
+
# @param [Hash] opts the optional parameters
|
|
372
|
+
# @option opts [String] :sort_by (default to 'qualityScore')
|
|
373
|
+
# @option opts [String] :hl (default to 'en')
|
|
374
|
+
# @option opts [String] :next_page_token
|
|
375
|
+
# @option opts [Integer] :results (default to 10)
|
|
376
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
377
|
+
def google_get_place_reviews_with_http_info(data_id, opts = {})
|
|
378
|
+
if @api_client.config.debugging
|
|
379
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_place_reviews ...'
|
|
380
|
+
end
|
|
381
|
+
# verify the required parameter 'data_id' is set
|
|
382
|
+
if @api_client.config.client_side_validation && data_id.nil?
|
|
383
|
+
fail ArgumentError, "Missing the required parameter 'data_id' when calling GoogleApi.google_get_place_reviews"
|
|
384
|
+
end
|
|
385
|
+
if @api_client.config.client_side_validation && !opts[:'results'].nil? && opts[:'results'] > 20
|
|
386
|
+
fail ArgumentError, 'invalid value for "opts[:"results"]" when calling GoogleApi.google_get_place_reviews, must be smaller than or equal to 20.'
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
if @api_client.config.client_side_validation && !opts[:'results'].nil? && opts[:'results'] < 1
|
|
390
|
+
fail ArgumentError, 'invalid value for "opts[:"results"]" when calling GoogleApi.google_get_place_reviews, must be greater than or equal to 1.'
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# resource path
|
|
394
|
+
local_var_path = '/v1/google/maps/reviews'
|
|
395
|
+
|
|
396
|
+
# query parameters
|
|
397
|
+
query_params = opts[:query_params] || {}
|
|
398
|
+
query_params[:'data_id'] = data_id
|
|
399
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
400
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
401
|
+
query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
|
|
402
|
+
query_params[:'results'] = opts[:'results'] if !opts[:'results'].nil?
|
|
403
|
+
|
|
404
|
+
# header parameters
|
|
405
|
+
header_params = opts[:header_params] || {}
|
|
406
|
+
# HTTP header 'Accept' (if needed)
|
|
407
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
408
|
+
|
|
409
|
+
# form parameters
|
|
410
|
+
form_params = opts[:form_params] || {}
|
|
411
|
+
|
|
412
|
+
# http body (model)
|
|
413
|
+
post_body = opts[:debug_body]
|
|
414
|
+
|
|
415
|
+
# return_type
|
|
416
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
417
|
+
|
|
418
|
+
# auth_names
|
|
419
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
420
|
+
|
|
421
|
+
new_options = opts.merge(
|
|
422
|
+
:operation => :"GoogleApi.google_get_place_reviews",
|
|
423
|
+
:header_params => header_params,
|
|
424
|
+
:query_params => query_params,
|
|
425
|
+
:form_params => form_params,
|
|
426
|
+
:body => post_body,
|
|
427
|
+
:auth_names => auth_names,
|
|
428
|
+
:return_type => return_type
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
432
|
+
if @api_client.config.debugging
|
|
433
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_place_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
434
|
+
end
|
|
435
|
+
return data, status_code, headers
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# Get Scholar author profile
|
|
439
|
+
# Get detailed Google Scholar author profile including articles, stats, co-authors.
|
|
440
|
+
# @param author_id [String] Scholar user ID (the `user` query parameter)
|
|
441
|
+
# @param [Hash] opts the optional parameters
|
|
442
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
443
|
+
# @option opts [Integer] :cstart Articles pagination offset (default to 0)
|
|
444
|
+
# @option opts [Integer] :pagesize Articles per page (default to 20)
|
|
445
|
+
# @return [Object]
|
|
446
|
+
def google_get_scholar_author_profile(author_id, opts = {})
|
|
447
|
+
data, _status_code, _headers = google_get_scholar_author_profile_with_http_info(author_id, opts)
|
|
448
|
+
data
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# Get Scholar author profile
|
|
452
|
+
# Get detailed Google Scholar author profile including articles, stats, co-authors.
|
|
453
|
+
# @param author_id [String] Scholar user ID (the `user` query parameter)
|
|
454
|
+
# @param [Hash] opts the optional parameters
|
|
455
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
456
|
+
# @option opts [Integer] :cstart Articles pagination offset (default to 0)
|
|
457
|
+
# @option opts [Integer] :pagesize Articles per page (default to 20)
|
|
458
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
459
|
+
def google_get_scholar_author_profile_with_http_info(author_id, opts = {})
|
|
460
|
+
if @api_client.config.debugging
|
|
461
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_scholar_author_profile ...'
|
|
462
|
+
end
|
|
463
|
+
# verify the required parameter 'author_id' is set
|
|
464
|
+
if @api_client.config.client_side_validation && author_id.nil?
|
|
465
|
+
fail ArgumentError, "Missing the required parameter 'author_id' when calling GoogleApi.google_get_scholar_author_profile"
|
|
466
|
+
end
|
|
467
|
+
if @api_client.config.client_side_validation && !opts[:'cstart'].nil? && opts[:'cstart'] < 0
|
|
468
|
+
fail ArgumentError, 'invalid value for "opts[:"cstart"]" when calling GoogleApi.google_get_scholar_author_profile, must be greater than or equal to 0.'
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
if @api_client.config.client_side_validation && !opts[:'pagesize'].nil? && opts[:'pagesize'] > 100
|
|
472
|
+
fail ArgumentError, 'invalid value for "opts[:"pagesize"]" when calling GoogleApi.google_get_scholar_author_profile, must be smaller than or equal to 100.'
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
if @api_client.config.client_side_validation && !opts[:'pagesize'].nil? && opts[:'pagesize'] < 1
|
|
476
|
+
fail ArgumentError, 'invalid value for "opts[:"pagesize"]" when calling GoogleApi.google_get_scholar_author_profile, must be greater than or equal to 1.'
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
# resource path
|
|
480
|
+
local_var_path = '/v1/google/scholar/author'
|
|
481
|
+
|
|
482
|
+
# query parameters
|
|
483
|
+
query_params = opts[:query_params] || {}
|
|
484
|
+
query_params[:'author_id'] = author_id
|
|
485
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
486
|
+
query_params[:'cstart'] = opts[:'cstart'] if !opts[:'cstart'].nil?
|
|
487
|
+
query_params[:'pagesize'] = opts[:'pagesize'] if !opts[:'pagesize'].nil?
|
|
488
|
+
|
|
489
|
+
# header parameters
|
|
490
|
+
header_params = opts[:header_params] || {}
|
|
491
|
+
# HTTP header 'Accept' (if needed)
|
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
493
|
+
|
|
494
|
+
# form parameters
|
|
495
|
+
form_params = opts[:form_params] || {}
|
|
496
|
+
|
|
497
|
+
# http body (model)
|
|
498
|
+
post_body = opts[:debug_body]
|
|
499
|
+
|
|
500
|
+
# return_type
|
|
501
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
502
|
+
|
|
503
|
+
# auth_names
|
|
504
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
505
|
+
|
|
506
|
+
new_options = opts.merge(
|
|
507
|
+
:operation => :"GoogleApi.google_get_scholar_author_profile",
|
|
508
|
+
:header_params => header_params,
|
|
509
|
+
:query_params => query_params,
|
|
510
|
+
:form_params => form_params,
|
|
511
|
+
:body => post_body,
|
|
512
|
+
:auth_names => auth_names,
|
|
513
|
+
:return_type => return_type
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
517
|
+
if @api_client.config.debugging
|
|
518
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_scholar_author_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
519
|
+
end
|
|
520
|
+
return data, status_code, headers
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# Get stock/index quote
|
|
524
|
+
# Get a stock or index quote from Google Finance.
|
|
525
|
+
# @param q [String] Ticker and exchange (e.g. \"AAPL:NASDAQ\", \"BTC-USD\")
|
|
526
|
+
# @param [Hash] opts the optional parameters
|
|
527
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
528
|
+
# @return [Object]
|
|
529
|
+
def google_get_stock_index_quote(q, opts = {})
|
|
530
|
+
data, _status_code, _headers = google_get_stock_index_quote_with_http_info(q, opts)
|
|
531
|
+
data
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Get stock/index quote
|
|
535
|
+
# Get a stock or index quote from Google Finance.
|
|
536
|
+
# @param q [String] Ticker and exchange (e.g. \"AAPL:NASDAQ\", \"BTC-USD\")
|
|
537
|
+
# @param [Hash] opts the optional parameters
|
|
538
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
539
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
540
|
+
def google_get_stock_index_quote_with_http_info(q, opts = {})
|
|
541
|
+
if @api_client.config.debugging
|
|
542
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_get_stock_index_quote ...'
|
|
543
|
+
end
|
|
544
|
+
# verify the required parameter 'q' is set
|
|
545
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
546
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_get_stock_index_quote"
|
|
547
|
+
end
|
|
548
|
+
# resource path
|
|
549
|
+
local_var_path = '/v1/google/finance/quote'
|
|
550
|
+
|
|
551
|
+
# query parameters
|
|
552
|
+
query_params = opts[:query_params] || {}
|
|
553
|
+
query_params[:'q'] = q
|
|
554
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
555
|
+
|
|
556
|
+
# header parameters
|
|
557
|
+
header_params = opts[:header_params] || {}
|
|
558
|
+
# HTTP header 'Accept' (if needed)
|
|
559
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
560
|
+
|
|
561
|
+
# form parameters
|
|
562
|
+
form_params = opts[:form_params] || {}
|
|
563
|
+
|
|
564
|
+
# http body (model)
|
|
565
|
+
post_body = opts[:debug_body]
|
|
566
|
+
|
|
567
|
+
# return_type
|
|
568
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
569
|
+
|
|
570
|
+
# auth_names
|
|
571
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
572
|
+
|
|
573
|
+
new_options = opts.merge(
|
|
574
|
+
:operation => :"GoogleApi.google_get_stock_index_quote",
|
|
575
|
+
:header_params => header_params,
|
|
576
|
+
:query_params => query_params,
|
|
577
|
+
:form_params => form_params,
|
|
578
|
+
:body => post_body,
|
|
579
|
+
:auth_names => auth_names,
|
|
580
|
+
:return_type => return_type
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
584
|
+
if @api_client.config.debugging
|
|
585
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_get_stock_index_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
586
|
+
end
|
|
587
|
+
return data, status_code, headers
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
# Google AI Mode search
|
|
591
|
+
# Get AI-generated search results from Google AI Mode. Returns the structured `text_blocks` (paragraphs, headings, comparison `table` blocks and lists), a flat `references` source list, a compact `markdown` rendering of the whole answer and — unless `include_html` is false — the raw `answer_html` body.
|
|
592
|
+
# @param q [String] Search query for AI-generated response
|
|
593
|
+
# @param [Hash] opts the optional parameters
|
|
594
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
595
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
596
|
+
# @option opts [Boolean] :include_html Include the raw `answer_html` (full answer body HTML) in the response for maximum parity. It can be 100s of KB — set false when you only need the structured `text_blocks` + `markdown`. (default to true)
|
|
597
|
+
# @return [Object]
|
|
598
|
+
def google_google_ai_mode_search(q, opts = {})
|
|
599
|
+
data, _status_code, _headers = google_google_ai_mode_search_with_http_info(q, opts)
|
|
600
|
+
data
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# Google AI Mode search
|
|
604
|
+
# Get AI-generated search results from Google AI Mode. Returns the structured `text_blocks` (paragraphs, headings, comparison `table` blocks and lists), a flat `references` source list, a compact `markdown` rendering of the whole answer and — unless `include_html` is false — the raw `answer_html` body.
|
|
605
|
+
# @param q [String] Search query for AI-generated response
|
|
606
|
+
# @param [Hash] opts the optional parameters
|
|
607
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
608
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
609
|
+
# @option opts [Boolean] :include_html Include the raw `answer_html` (full answer body HTML) in the response for maximum parity. It can be 100s of KB — set false when you only need the structured `text_blocks` + `markdown`. (default to true)
|
|
610
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
611
|
+
def google_google_ai_mode_search_with_http_info(q, opts = {})
|
|
612
|
+
if @api_client.config.debugging
|
|
613
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_ai_mode_search ...'
|
|
614
|
+
end
|
|
615
|
+
# verify the required parameter 'q' is set
|
|
616
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
617
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_google_ai_mode_search"
|
|
618
|
+
end
|
|
619
|
+
# resource path
|
|
620
|
+
local_var_path = '/v1/google/ai-mode/search'
|
|
621
|
+
|
|
622
|
+
# query parameters
|
|
623
|
+
query_params = opts[:query_params] || {}
|
|
624
|
+
query_params[:'q'] = q
|
|
625
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
626
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
627
|
+
query_params[:'include_html'] = opts[:'include_html'] if !opts[:'include_html'].nil?
|
|
628
|
+
|
|
629
|
+
# header parameters
|
|
630
|
+
header_params = opts[:header_params] || {}
|
|
631
|
+
# HTTP header 'Accept' (if needed)
|
|
632
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
633
|
+
|
|
634
|
+
# form parameters
|
|
635
|
+
form_params = opts[:form_params] || {}
|
|
636
|
+
|
|
637
|
+
# http body (model)
|
|
638
|
+
post_body = opts[:debug_body]
|
|
639
|
+
|
|
640
|
+
# return_type
|
|
641
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
642
|
+
|
|
643
|
+
# auth_names
|
|
644
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
645
|
+
|
|
646
|
+
new_options = opts.merge(
|
|
647
|
+
:operation => :"GoogleApi.google_google_ai_mode_search",
|
|
648
|
+
:header_params => header_params,
|
|
649
|
+
:query_params => query_params,
|
|
650
|
+
:form_params => form_params,
|
|
651
|
+
:body => post_body,
|
|
652
|
+
:auth_names => auth_names,
|
|
653
|
+
:return_type => return_type
|
|
654
|
+
)
|
|
655
|
+
|
|
656
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
657
|
+
if @api_client.config.debugging
|
|
658
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_ai_mode_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
659
|
+
end
|
|
660
|
+
return data, status_code, headers
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
# Google AI Overview (inline SERP block)
|
|
664
|
+
# Get the AI Overview block Google renders inline at the top of a SERP. Deferred overviews (where Google lazy-loads the block via a follow-up ``page_token``) are chased automatically.
|
|
665
|
+
# @param q [String] Search query — same shape as a Google Search query
|
|
666
|
+
# @param [Hash] opts the optional parameters
|
|
667
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
668
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
669
|
+
# @return [Object]
|
|
670
|
+
def google_google_ai_overview_inline_serp_block(q, opts = {})
|
|
671
|
+
data, _status_code, _headers = google_google_ai_overview_inline_serp_block_with_http_info(q, opts)
|
|
672
|
+
data
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
# Google AI Overview (inline SERP block)
|
|
676
|
+
# Get the AI Overview block Google renders inline at the top of a SERP. Deferred overviews (where Google lazy-loads the block via a follow-up ``page_token``) are chased automatically.
|
|
677
|
+
# @param q [String] Search query — same shape as a Google Search query
|
|
678
|
+
# @param [Hash] opts the optional parameters
|
|
679
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
680
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
681
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
682
|
+
def google_google_ai_overview_inline_serp_block_with_http_info(q, opts = {})
|
|
683
|
+
if @api_client.config.debugging
|
|
684
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_ai_overview_inline_serp_block ...'
|
|
685
|
+
end
|
|
686
|
+
# verify the required parameter 'q' is set
|
|
687
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
688
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_google_ai_overview_inline_serp_block"
|
|
689
|
+
end
|
|
690
|
+
# resource path
|
|
691
|
+
local_var_path = '/v1/google/ai-overview'
|
|
692
|
+
|
|
693
|
+
# query parameters
|
|
694
|
+
query_params = opts[:query_params] || {}
|
|
695
|
+
query_params[:'q'] = q
|
|
696
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
697
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
698
|
+
|
|
699
|
+
# header parameters
|
|
700
|
+
header_params = opts[:header_params] || {}
|
|
701
|
+
# HTTP header 'Accept' (if needed)
|
|
702
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
703
|
+
|
|
704
|
+
# form parameters
|
|
705
|
+
form_params = opts[:form_params] || {}
|
|
706
|
+
|
|
707
|
+
# http body (model)
|
|
708
|
+
post_body = opts[:debug_body]
|
|
709
|
+
|
|
710
|
+
# return_type
|
|
711
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
712
|
+
|
|
713
|
+
# auth_names
|
|
714
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
715
|
+
|
|
716
|
+
new_options = opts.merge(
|
|
717
|
+
:operation => :"GoogleApi.google_google_ai_overview_inline_serp_block",
|
|
718
|
+
:header_params => header_params,
|
|
719
|
+
:query_params => query_params,
|
|
720
|
+
:form_params => form_params,
|
|
721
|
+
:body => post_body,
|
|
722
|
+
:auth_names => auth_names,
|
|
723
|
+
:return_type => return_type
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
727
|
+
if @api_client.config.debugging
|
|
728
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_ai_overview_inline_serp_block\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
729
|
+
end
|
|
730
|
+
return data, status_code, headers
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Google Flights calendar — cheapest fare per date
|
|
734
|
+
# Price a whole range of dates in one call — up to 200 dates per request. Google Flights' own price graph / date grid: the cheapest fare per departure date instead of one search per date. Prices match `/flights/search` exactly.
|
|
735
|
+
# @param departure_id [String] Departure airport IATA code or location ID
|
|
736
|
+
# @param arrival_id [String] Arrival airport IATA code or location ID
|
|
737
|
+
# @param outbound_date_from [String] First outbound date to price (YYYY-MM-DD)
|
|
738
|
+
# @param outbound_date_to [String] Last outbound date to price (YYYY-MM-DD). At most 200 days from outbound_date_from, or 14 in date-grid mode.
|
|
739
|
+
# @param [Hash] opts the optional parameters
|
|
740
|
+
# @option opts [String] :trip_type one_way | round_trip (default to 'one_way')
|
|
741
|
+
# @option opts [Integer] :trip_length_days Round-trip stay length in nights (price-graph mode). Defaults to 7.
|
|
742
|
+
# @option opts [String] :return_date_from Date-grid mode: first return date. With return_date_to, returns the full outbound x return matrix (each range at most 14 days). Round-trip only.
|
|
743
|
+
# @option opts [String] :return_date_to Date-grid mode: last return date
|
|
744
|
+
# @option opts [Integer] :adults (default to 1)
|
|
745
|
+
# @option opts [Integer] :children (default to 0)
|
|
746
|
+
# @option opts [Integer] :infants_in_seat (default to 0)
|
|
747
|
+
# @option opts [Integer] :infants_on_lap (default to 0)
|
|
748
|
+
# @option opts [String] :travel_class (default to 'economy')
|
|
749
|
+
# @option opts [String] :currency ISO-4217 currency (default to 'USD')
|
|
750
|
+
# @option opts [String] :gl (default to 'us')
|
|
751
|
+
# @option opts [String] :hl (default to 'en')
|
|
752
|
+
# @return [Object]
|
|
753
|
+
def google_google_flights_calendar_cheapest_fare_per_date(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts = {})
|
|
754
|
+
data, _status_code, _headers = google_google_flights_calendar_cheapest_fare_per_date_with_http_info(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts)
|
|
755
|
+
data
|
|
756
|
+
end
|
|
757
|
+
|
|
758
|
+
# Google Flights calendar — cheapest fare per date
|
|
759
|
+
# Price a whole range of dates in one call — up to 200 dates per request. Google Flights' own price graph / date grid: the cheapest fare per departure date instead of one search per date. Prices match `/flights/search` exactly.
|
|
760
|
+
# @param departure_id [String] Departure airport IATA code or location ID
|
|
761
|
+
# @param arrival_id [String] Arrival airport IATA code or location ID
|
|
762
|
+
# @param outbound_date_from [String] First outbound date to price (YYYY-MM-DD)
|
|
763
|
+
# @param outbound_date_to [String] Last outbound date to price (YYYY-MM-DD). At most 200 days from outbound_date_from, or 14 in date-grid mode.
|
|
764
|
+
# @param [Hash] opts the optional parameters
|
|
765
|
+
# @option opts [String] :trip_type one_way | round_trip (default to 'one_way')
|
|
766
|
+
# @option opts [Integer] :trip_length_days Round-trip stay length in nights (price-graph mode). Defaults to 7.
|
|
767
|
+
# @option opts [String] :return_date_from Date-grid mode: first return date. With return_date_to, returns the full outbound x return matrix (each range at most 14 days). Round-trip only.
|
|
768
|
+
# @option opts [String] :return_date_to Date-grid mode: last return date
|
|
769
|
+
# @option opts [Integer] :adults (default to 1)
|
|
770
|
+
# @option opts [Integer] :children (default to 0)
|
|
771
|
+
# @option opts [Integer] :infants_in_seat (default to 0)
|
|
772
|
+
# @option opts [Integer] :infants_on_lap (default to 0)
|
|
773
|
+
# @option opts [String] :travel_class (default to 'economy')
|
|
774
|
+
# @option opts [String] :currency ISO-4217 currency (default to 'USD')
|
|
775
|
+
# @option opts [String] :gl (default to 'us')
|
|
776
|
+
# @option opts [String] :hl (default to 'en')
|
|
777
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
778
|
+
def google_google_flights_calendar_cheapest_fare_per_date_with_http_info(departure_id, arrival_id, outbound_date_from, outbound_date_to, opts = {})
|
|
779
|
+
if @api_client.config.debugging
|
|
780
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_flights_calendar_cheapest_fare_per_date ...'
|
|
781
|
+
end
|
|
782
|
+
# verify the required parameter 'departure_id' is set
|
|
783
|
+
if @api_client.config.client_side_validation && departure_id.nil?
|
|
784
|
+
fail ArgumentError, "Missing the required parameter 'departure_id' when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date"
|
|
785
|
+
end
|
|
786
|
+
# verify the required parameter 'arrival_id' is set
|
|
787
|
+
if @api_client.config.client_side_validation && arrival_id.nil?
|
|
788
|
+
fail ArgumentError, "Missing the required parameter 'arrival_id' when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date"
|
|
789
|
+
end
|
|
790
|
+
# verify the required parameter 'outbound_date_from' is set
|
|
791
|
+
if @api_client.config.client_side_validation && outbound_date_from.nil?
|
|
792
|
+
fail ArgumentError, "Missing the required parameter 'outbound_date_from' when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date"
|
|
793
|
+
end
|
|
794
|
+
# verify the required parameter 'outbound_date_to' is set
|
|
795
|
+
if @api_client.config.client_side_validation && outbound_date_to.nil?
|
|
796
|
+
fail ArgumentError, "Missing the required parameter 'outbound_date_to' when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date"
|
|
797
|
+
end
|
|
798
|
+
if @api_client.config.client_side_validation && !opts[:'trip_length_days'].nil? && opts[:'trip_length_days'] > 60
|
|
799
|
+
fail ArgumentError, 'invalid value for "opts[:"trip_length_days"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be smaller than or equal to 60.'
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
if @api_client.config.client_side_validation && !opts[:'trip_length_days'].nil? && opts[:'trip_length_days'] < 0
|
|
803
|
+
fail ArgumentError, 'invalid value for "opts[:"trip_length_days"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be greater than or equal to 0.'
|
|
804
|
+
end
|
|
805
|
+
|
|
806
|
+
if @api_client.config.client_side_validation && !opts[:'adults'].nil? && opts[:'adults'] > 9
|
|
807
|
+
fail ArgumentError, 'invalid value for "opts[:"adults"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be smaller than or equal to 9.'
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
if @api_client.config.client_side_validation && !opts[:'adults'].nil? && opts[:'adults'] < 1
|
|
811
|
+
fail ArgumentError, 'invalid value for "opts[:"adults"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be greater than or equal to 1.'
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
if @api_client.config.client_side_validation && !opts[:'children'].nil? && opts[:'children'] > 8
|
|
815
|
+
fail ArgumentError, 'invalid value for "opts[:"children"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be smaller than or equal to 8.'
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
if @api_client.config.client_side_validation && !opts[:'children'].nil? && opts[:'children'] < 0
|
|
819
|
+
fail ArgumentError, 'invalid value for "opts[:"children"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be greater than or equal to 0.'
|
|
820
|
+
end
|
|
821
|
+
|
|
822
|
+
if @api_client.config.client_side_validation && !opts[:'infants_in_seat'].nil? && opts[:'infants_in_seat'] > 4
|
|
823
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_in_seat"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be smaller than or equal to 4.'
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
if @api_client.config.client_side_validation && !opts[:'infants_in_seat'].nil? && opts[:'infants_in_seat'] < 0
|
|
827
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_in_seat"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be greater than or equal to 0.'
|
|
828
|
+
end
|
|
829
|
+
|
|
830
|
+
if @api_client.config.client_side_validation && !opts[:'infants_on_lap'].nil? && opts[:'infants_on_lap'] > 4
|
|
831
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_on_lap"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be smaller than or equal to 4.'
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
if @api_client.config.client_side_validation && !opts[:'infants_on_lap'].nil? && opts[:'infants_on_lap'] < 0
|
|
835
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_on_lap"]" when calling GoogleApi.google_google_flights_calendar_cheapest_fare_per_date, must be greater than or equal to 0.'
|
|
836
|
+
end
|
|
837
|
+
|
|
838
|
+
# resource path
|
|
839
|
+
local_var_path = '/v1/google/flights/calendar'
|
|
840
|
+
|
|
841
|
+
# query parameters
|
|
842
|
+
query_params = opts[:query_params] || {}
|
|
843
|
+
query_params[:'departure_id'] = departure_id
|
|
844
|
+
query_params[:'arrival_id'] = arrival_id
|
|
845
|
+
query_params[:'outbound_date_from'] = outbound_date_from
|
|
846
|
+
query_params[:'outbound_date_to'] = outbound_date_to
|
|
847
|
+
query_params[:'trip_type'] = opts[:'trip_type'] if !opts[:'trip_type'].nil?
|
|
848
|
+
query_params[:'trip_length_days'] = opts[:'trip_length_days'] if !opts[:'trip_length_days'].nil?
|
|
849
|
+
query_params[:'return_date_from'] = opts[:'return_date_from'] if !opts[:'return_date_from'].nil?
|
|
850
|
+
query_params[:'return_date_to'] = opts[:'return_date_to'] if !opts[:'return_date_to'].nil?
|
|
851
|
+
query_params[:'adults'] = opts[:'adults'] if !opts[:'adults'].nil?
|
|
852
|
+
query_params[:'children'] = opts[:'children'] if !opts[:'children'].nil?
|
|
853
|
+
query_params[:'infants_in_seat'] = opts[:'infants_in_seat'] if !opts[:'infants_in_seat'].nil?
|
|
854
|
+
query_params[:'infants_on_lap'] = opts[:'infants_on_lap'] if !opts[:'infants_on_lap'].nil?
|
|
855
|
+
query_params[:'travel_class'] = opts[:'travel_class'] if !opts[:'travel_class'].nil?
|
|
856
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
|
857
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
858
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
859
|
+
|
|
860
|
+
# header parameters
|
|
861
|
+
header_params = opts[:header_params] || {}
|
|
862
|
+
# HTTP header 'Accept' (if needed)
|
|
863
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
864
|
+
|
|
865
|
+
# form parameters
|
|
866
|
+
form_params = opts[:form_params] || {}
|
|
867
|
+
|
|
868
|
+
# http body (model)
|
|
869
|
+
post_body = opts[:debug_body]
|
|
870
|
+
|
|
871
|
+
# return_type
|
|
872
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
873
|
+
|
|
874
|
+
# auth_names
|
|
875
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
876
|
+
|
|
877
|
+
new_options = opts.merge(
|
|
878
|
+
:operation => :"GoogleApi.google_google_flights_calendar_cheapest_fare_per_date",
|
|
879
|
+
:header_params => header_params,
|
|
880
|
+
:query_params => query_params,
|
|
881
|
+
:form_params => form_params,
|
|
882
|
+
:body => post_body,
|
|
883
|
+
:auth_names => auth_names,
|
|
884
|
+
:return_type => return_type
|
|
885
|
+
)
|
|
886
|
+
|
|
887
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
888
|
+
if @api_client.config.debugging
|
|
889
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_flights_calendar_cheapest_fare_per_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
890
|
+
end
|
|
891
|
+
return data, status_code, headers
|
|
892
|
+
end
|
|
893
|
+
|
|
894
|
+
# Google Flights search
|
|
895
|
+
# Search Google Flights for available itineraries.
|
|
896
|
+
# @param departure_id [String] Departure airport IATA code or location ID
|
|
897
|
+
# @param arrival_id [String] Arrival airport IATA code or location ID
|
|
898
|
+
# @param outbound_date [String] Outbound date (YYYY-MM-DD)
|
|
899
|
+
# @param [Hash] opts the optional parameters
|
|
900
|
+
# @option opts [String] :return_date Return date (round-trip only)
|
|
901
|
+
# @option opts [String] :trip_type round_trip | one_way | multi_city (default to 'round_trip')
|
|
902
|
+
# @option opts [Integer] :adults (default to 1)
|
|
903
|
+
# @option opts [Integer] :children (default to 0)
|
|
904
|
+
# @option opts [Integer] :infants_in_seat (default to 0)
|
|
905
|
+
# @option opts [Integer] :infants_on_lap (default to 0)
|
|
906
|
+
# @option opts [String] :travel_class (default to 'economy')
|
|
907
|
+
# @option opts [String] :currency ISO-4217 currency (default to 'USD')
|
|
908
|
+
# @option opts [String] :gl (default to 'us')
|
|
909
|
+
# @option opts [String] :hl (default to 'en')
|
|
910
|
+
# @option opts [String] :stops (default to 'any')
|
|
911
|
+
# @option opts [Integer] :max_price
|
|
912
|
+
# @option opts [String] :departure_token A round-trip offer's departure_token; returns the return-leg flights for that selected outbound (round-trip only).
|
|
913
|
+
# @return [Object]
|
|
914
|
+
def google_google_flights_search(departure_id, arrival_id, outbound_date, opts = {})
|
|
915
|
+
data, _status_code, _headers = google_google_flights_search_with_http_info(departure_id, arrival_id, outbound_date, opts)
|
|
916
|
+
data
|
|
917
|
+
end
|
|
918
|
+
|
|
919
|
+
# Google Flights search
|
|
920
|
+
# Search Google Flights for available itineraries.
|
|
921
|
+
# @param departure_id [String] Departure airport IATA code or location ID
|
|
922
|
+
# @param arrival_id [String] Arrival airport IATA code or location ID
|
|
923
|
+
# @param outbound_date [String] Outbound date (YYYY-MM-DD)
|
|
924
|
+
# @param [Hash] opts the optional parameters
|
|
925
|
+
# @option opts [String] :return_date Return date (round-trip only)
|
|
926
|
+
# @option opts [String] :trip_type round_trip | one_way | multi_city (default to 'round_trip')
|
|
927
|
+
# @option opts [Integer] :adults (default to 1)
|
|
928
|
+
# @option opts [Integer] :children (default to 0)
|
|
929
|
+
# @option opts [Integer] :infants_in_seat (default to 0)
|
|
930
|
+
# @option opts [Integer] :infants_on_lap (default to 0)
|
|
931
|
+
# @option opts [String] :travel_class (default to 'economy')
|
|
932
|
+
# @option opts [String] :currency ISO-4217 currency (default to 'USD')
|
|
933
|
+
# @option opts [String] :gl (default to 'us')
|
|
934
|
+
# @option opts [String] :hl (default to 'en')
|
|
935
|
+
# @option opts [String] :stops (default to 'any')
|
|
936
|
+
# @option opts [Integer] :max_price
|
|
937
|
+
# @option opts [String] :departure_token A round-trip offer's departure_token; returns the return-leg flights for that selected outbound (round-trip only).
|
|
938
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
939
|
+
def google_google_flights_search_with_http_info(departure_id, arrival_id, outbound_date, opts = {})
|
|
940
|
+
if @api_client.config.debugging
|
|
941
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_flights_search ...'
|
|
942
|
+
end
|
|
943
|
+
# verify the required parameter 'departure_id' is set
|
|
944
|
+
if @api_client.config.client_side_validation && departure_id.nil?
|
|
945
|
+
fail ArgumentError, "Missing the required parameter 'departure_id' when calling GoogleApi.google_google_flights_search"
|
|
946
|
+
end
|
|
947
|
+
# verify the required parameter 'arrival_id' is set
|
|
948
|
+
if @api_client.config.client_side_validation && arrival_id.nil?
|
|
949
|
+
fail ArgumentError, "Missing the required parameter 'arrival_id' when calling GoogleApi.google_google_flights_search"
|
|
950
|
+
end
|
|
951
|
+
# verify the required parameter 'outbound_date' is set
|
|
952
|
+
if @api_client.config.client_side_validation && outbound_date.nil?
|
|
953
|
+
fail ArgumentError, "Missing the required parameter 'outbound_date' when calling GoogleApi.google_google_flights_search"
|
|
954
|
+
end
|
|
955
|
+
if @api_client.config.client_side_validation && !opts[:'adults'].nil? && opts[:'adults'] > 9
|
|
956
|
+
fail ArgumentError, 'invalid value for "opts[:"adults"]" when calling GoogleApi.google_google_flights_search, must be smaller than or equal to 9.'
|
|
957
|
+
end
|
|
958
|
+
|
|
959
|
+
if @api_client.config.client_side_validation && !opts[:'adults'].nil? && opts[:'adults'] < 1
|
|
960
|
+
fail ArgumentError, 'invalid value for "opts[:"adults"]" when calling GoogleApi.google_google_flights_search, must be greater than or equal to 1.'
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
if @api_client.config.client_side_validation && !opts[:'children'].nil? && opts[:'children'] > 8
|
|
964
|
+
fail ArgumentError, 'invalid value for "opts[:"children"]" when calling GoogleApi.google_google_flights_search, must be smaller than or equal to 8.'
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
if @api_client.config.client_side_validation && !opts[:'children'].nil? && opts[:'children'] < 0
|
|
968
|
+
fail ArgumentError, 'invalid value for "opts[:"children"]" when calling GoogleApi.google_google_flights_search, must be greater than or equal to 0.'
|
|
969
|
+
end
|
|
970
|
+
|
|
971
|
+
if @api_client.config.client_side_validation && !opts[:'infants_in_seat'].nil? && opts[:'infants_in_seat'] > 4
|
|
972
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_in_seat"]" when calling GoogleApi.google_google_flights_search, must be smaller than or equal to 4.'
|
|
973
|
+
end
|
|
974
|
+
|
|
975
|
+
if @api_client.config.client_side_validation && !opts[:'infants_in_seat'].nil? && opts[:'infants_in_seat'] < 0
|
|
976
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_in_seat"]" when calling GoogleApi.google_google_flights_search, must be greater than or equal to 0.'
|
|
977
|
+
end
|
|
978
|
+
|
|
979
|
+
if @api_client.config.client_side_validation && !opts[:'infants_on_lap'].nil? && opts[:'infants_on_lap'] > 4
|
|
980
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_on_lap"]" when calling GoogleApi.google_google_flights_search, must be smaller than or equal to 4.'
|
|
981
|
+
end
|
|
982
|
+
|
|
983
|
+
if @api_client.config.client_side_validation && !opts[:'infants_on_lap'].nil? && opts[:'infants_on_lap'] < 0
|
|
984
|
+
fail ArgumentError, 'invalid value for "opts[:"infants_on_lap"]" when calling GoogleApi.google_google_flights_search, must be greater than or equal to 0.'
|
|
985
|
+
end
|
|
986
|
+
|
|
987
|
+
if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 1
|
|
988
|
+
fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling GoogleApi.google_google_flights_search, must be greater than or equal to 1.'
|
|
989
|
+
end
|
|
990
|
+
|
|
991
|
+
# resource path
|
|
992
|
+
local_var_path = '/v1/google/flights/search'
|
|
993
|
+
|
|
994
|
+
# query parameters
|
|
995
|
+
query_params = opts[:query_params] || {}
|
|
996
|
+
query_params[:'departure_id'] = departure_id
|
|
997
|
+
query_params[:'arrival_id'] = arrival_id
|
|
998
|
+
query_params[:'outbound_date'] = outbound_date
|
|
999
|
+
query_params[:'return_date'] = opts[:'return_date'] if !opts[:'return_date'].nil?
|
|
1000
|
+
query_params[:'trip_type'] = opts[:'trip_type'] if !opts[:'trip_type'].nil?
|
|
1001
|
+
query_params[:'adults'] = opts[:'adults'] if !opts[:'adults'].nil?
|
|
1002
|
+
query_params[:'children'] = opts[:'children'] if !opts[:'children'].nil?
|
|
1003
|
+
query_params[:'infants_in_seat'] = opts[:'infants_in_seat'] if !opts[:'infants_in_seat'].nil?
|
|
1004
|
+
query_params[:'infants_on_lap'] = opts[:'infants_on_lap'] if !opts[:'infants_on_lap'].nil?
|
|
1005
|
+
query_params[:'travel_class'] = opts[:'travel_class'] if !opts[:'travel_class'].nil?
|
|
1006
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
|
1007
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1008
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1009
|
+
query_params[:'stops'] = opts[:'stops'] if !opts[:'stops'].nil?
|
|
1010
|
+
query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
|
|
1011
|
+
query_params[:'departure_token'] = opts[:'departure_token'] if !opts[:'departure_token'].nil?
|
|
1012
|
+
|
|
1013
|
+
# header parameters
|
|
1014
|
+
header_params = opts[:header_params] || {}
|
|
1015
|
+
# HTTP header 'Accept' (if needed)
|
|
1016
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1017
|
+
|
|
1018
|
+
# form parameters
|
|
1019
|
+
form_params = opts[:form_params] || {}
|
|
1020
|
+
|
|
1021
|
+
# http body (model)
|
|
1022
|
+
post_body = opts[:debug_body]
|
|
1023
|
+
|
|
1024
|
+
# return_type
|
|
1025
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1026
|
+
|
|
1027
|
+
# auth_names
|
|
1028
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1029
|
+
|
|
1030
|
+
new_options = opts.merge(
|
|
1031
|
+
:operation => :"GoogleApi.google_google_flights_search",
|
|
1032
|
+
:header_params => header_params,
|
|
1033
|
+
:query_params => query_params,
|
|
1034
|
+
:form_params => form_params,
|
|
1035
|
+
:body => post_body,
|
|
1036
|
+
:auth_names => auth_names,
|
|
1037
|
+
:return_type => return_type
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1041
|
+
if @api_client.config.debugging
|
|
1042
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_flights_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1043
|
+
end
|
|
1044
|
+
return data, status_code, headers
|
|
1045
|
+
end
|
|
1046
|
+
|
|
1047
|
+
# Google Lens visual search
|
|
1048
|
+
# Google Lens visual search. Response carries ``lens_results`` (Scrapingdog parity alias) with ``title`` / ``source`` / ``source_favicon`` / ``thumbnail`` / ``original_thumbnail`` / ``rating`` / ``reviews`` / ``in_stock``, plus ``price`` (``{value, currency, extracted}``) and the raw ``tag`` chip it is parsed from, on shoppable matches. ``related_searches`` chips come alongside. Legacy ``results`` alias kept for backwards compat.
|
|
1049
|
+
# @param url [String] Public URL of the image to search visually
|
|
1050
|
+
# @param [Hash] opts the optional parameters
|
|
1051
|
+
# @option opts [String] :query Optional text refinement (e.g. 'pizza')
|
|
1052
|
+
# @option opts [String] :country ISO country code (alias for gl)
|
|
1053
|
+
# @option opts [String] :language Language code (alias for hl)
|
|
1054
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1055
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1056
|
+
# @option opts [Boolean] :product Bias towards shoppable product matches (default to false)
|
|
1057
|
+
# @option opts [Boolean] :visual_matches Include the visual-matches carousel (default to true)
|
|
1058
|
+
# @option opts [Boolean] :exact_matches Restrict to exact-match results (default to false)
|
|
1059
|
+
# @return [Object]
|
|
1060
|
+
def google_google_lens_visual_search(url, opts = {})
|
|
1061
|
+
data, _status_code, _headers = google_google_lens_visual_search_with_http_info(url, opts)
|
|
1062
|
+
data
|
|
1063
|
+
end
|
|
1064
|
+
|
|
1065
|
+
# Google Lens visual search
|
|
1066
|
+
# Google Lens visual search. Response carries ``lens_results`` (Scrapingdog parity alias) with ``title`` / ``source`` / ``source_favicon`` / ``thumbnail`` / ``original_thumbnail`` / ``rating`` / ``reviews`` / ``in_stock``, plus ``price`` (``{value, currency, extracted}``) and the raw ``tag`` chip it is parsed from, on shoppable matches. ``related_searches`` chips come alongside. Legacy ``results`` alias kept for backwards compat.
|
|
1067
|
+
# @param url [String] Public URL of the image to search visually
|
|
1068
|
+
# @param [Hash] opts the optional parameters
|
|
1069
|
+
# @option opts [String] :query Optional text refinement (e.g. 'pizza')
|
|
1070
|
+
# @option opts [String] :country ISO country code (alias for gl)
|
|
1071
|
+
# @option opts [String] :language Language code (alias for hl)
|
|
1072
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1073
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1074
|
+
# @option opts [Boolean] :product Bias towards shoppable product matches (default to false)
|
|
1075
|
+
# @option opts [Boolean] :visual_matches Include the visual-matches carousel (default to true)
|
|
1076
|
+
# @option opts [Boolean] :exact_matches Restrict to exact-match results (default to false)
|
|
1077
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1078
|
+
def google_google_lens_visual_search_with_http_info(url, opts = {})
|
|
1079
|
+
if @api_client.config.debugging
|
|
1080
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_lens_visual_search ...'
|
|
1081
|
+
end
|
|
1082
|
+
# verify the required parameter 'url' is set
|
|
1083
|
+
if @api_client.config.client_side_validation && url.nil?
|
|
1084
|
+
fail ArgumentError, "Missing the required parameter 'url' when calling GoogleApi.google_google_lens_visual_search"
|
|
1085
|
+
end
|
|
1086
|
+
# resource path
|
|
1087
|
+
local_var_path = '/v1/google/lens/search'
|
|
1088
|
+
|
|
1089
|
+
# query parameters
|
|
1090
|
+
query_params = opts[:query_params] || {}
|
|
1091
|
+
query_params[:'url'] = url
|
|
1092
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
1093
|
+
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
1094
|
+
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
|
1095
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1096
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1097
|
+
query_params[:'product'] = opts[:'product'] if !opts[:'product'].nil?
|
|
1098
|
+
query_params[:'visual_matches'] = opts[:'visual_matches'] if !opts[:'visual_matches'].nil?
|
|
1099
|
+
query_params[:'exact_matches'] = opts[:'exact_matches'] if !opts[:'exact_matches'].nil?
|
|
1100
|
+
|
|
1101
|
+
# header parameters
|
|
1102
|
+
header_params = opts[:header_params] || {}
|
|
1103
|
+
# HTTP header 'Accept' (if needed)
|
|
1104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1105
|
+
|
|
1106
|
+
# form parameters
|
|
1107
|
+
form_params = opts[:form_params] || {}
|
|
1108
|
+
|
|
1109
|
+
# http body (model)
|
|
1110
|
+
post_body = opts[:debug_body]
|
|
1111
|
+
|
|
1112
|
+
# return_type
|
|
1113
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1114
|
+
|
|
1115
|
+
# auth_names
|
|
1116
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1117
|
+
|
|
1118
|
+
new_options = opts.merge(
|
|
1119
|
+
:operation => :"GoogleApi.google_google_lens_visual_search",
|
|
1120
|
+
:header_params => header_params,
|
|
1121
|
+
:query_params => query_params,
|
|
1122
|
+
:form_params => form_params,
|
|
1123
|
+
:body => post_body,
|
|
1124
|
+
:auth_names => auth_names,
|
|
1125
|
+
:return_type => return_type
|
|
1126
|
+
)
|
|
1127
|
+
|
|
1128
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1129
|
+
if @api_client.config.debugging
|
|
1130
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_lens_visual_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1131
|
+
end
|
|
1132
|
+
return data, status_code, headers
|
|
1133
|
+
end
|
|
1134
|
+
|
|
1135
|
+
# Google scraper health check
|
|
1136
|
+
# Check health of the Google scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
1137
|
+
# @param [Hash] opts the optional parameters
|
|
1138
|
+
# @return [Object]
|
|
1139
|
+
def google_google_scraper_health_check(opts = {})
|
|
1140
|
+
data, _status_code, _headers = google_google_scraper_health_check_with_http_info(opts)
|
|
1141
|
+
data
|
|
1142
|
+
end
|
|
1143
|
+
|
|
1144
|
+
# Google scraper health check
|
|
1145
|
+
# Check health of the Google scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
1146
|
+
# @param [Hash] opts the optional parameters
|
|
1147
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1148
|
+
def google_google_scraper_health_check_with_http_info(opts = {})
|
|
1149
|
+
if @api_client.config.debugging
|
|
1150
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_scraper_health_check ...'
|
|
1151
|
+
end
|
|
1152
|
+
# resource path
|
|
1153
|
+
local_var_path = '/v1/google/health'
|
|
1154
|
+
|
|
1155
|
+
# query parameters
|
|
1156
|
+
query_params = opts[:query_params] || {}
|
|
1157
|
+
|
|
1158
|
+
# header parameters
|
|
1159
|
+
header_params = opts[:header_params] || {}
|
|
1160
|
+
# HTTP header 'Accept' (if needed)
|
|
1161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1162
|
+
|
|
1163
|
+
# form parameters
|
|
1164
|
+
form_params = opts[:form_params] || {}
|
|
1165
|
+
|
|
1166
|
+
# http body (model)
|
|
1167
|
+
post_body = opts[:debug_body]
|
|
1168
|
+
|
|
1169
|
+
# return_type
|
|
1170
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1171
|
+
|
|
1172
|
+
# auth_names
|
|
1173
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1174
|
+
|
|
1175
|
+
new_options = opts.merge(
|
|
1176
|
+
:operation => :"GoogleApi.google_google_scraper_health_check",
|
|
1177
|
+
:header_params => header_params,
|
|
1178
|
+
:query_params => query_params,
|
|
1179
|
+
:form_params => form_params,
|
|
1180
|
+
:body => post_body,
|
|
1181
|
+
:auth_names => auth_names,
|
|
1182
|
+
:return_type => return_type
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1186
|
+
if @api_client.config.debugging
|
|
1187
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1188
|
+
end
|
|
1189
|
+
return data, status_code, headers
|
|
1190
|
+
end
|
|
1191
|
+
|
|
1192
|
+
# Google scraper health check
|
|
1193
|
+
# Check health of the Google scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
1194
|
+
# @param [Hash] opts the optional parameters
|
|
1195
|
+
# @return [Object]
|
|
1196
|
+
def google_google_scraper_health_check_head(opts = {})
|
|
1197
|
+
data, _status_code, _headers = google_google_scraper_health_check_head_with_http_info(opts)
|
|
1198
|
+
data
|
|
1199
|
+
end
|
|
1200
|
+
|
|
1201
|
+
# Google scraper health check
|
|
1202
|
+
# Check health of the Google scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
|
|
1203
|
+
# @param [Hash] opts the optional parameters
|
|
1204
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1205
|
+
def google_google_scraper_health_check_head_with_http_info(opts = {})
|
|
1206
|
+
if @api_client.config.debugging
|
|
1207
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_scraper_health_check_head ...'
|
|
1208
|
+
end
|
|
1209
|
+
# resource path
|
|
1210
|
+
local_var_path = '/v1/google/health'
|
|
1211
|
+
|
|
1212
|
+
# query parameters
|
|
1213
|
+
query_params = opts[:query_params] || {}
|
|
1214
|
+
|
|
1215
|
+
# header parameters
|
|
1216
|
+
header_params = opts[:header_params] || {}
|
|
1217
|
+
# HTTP header 'Accept' (if needed)
|
|
1218
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1219
|
+
|
|
1220
|
+
# form parameters
|
|
1221
|
+
form_params = opts[:form_params] || {}
|
|
1222
|
+
|
|
1223
|
+
# http body (model)
|
|
1224
|
+
post_body = opts[:debug_body]
|
|
1225
|
+
|
|
1226
|
+
# return_type
|
|
1227
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1228
|
+
|
|
1229
|
+
# auth_names
|
|
1230
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1231
|
+
|
|
1232
|
+
new_options = opts.merge(
|
|
1233
|
+
:operation => :"GoogleApi.google_google_scraper_health_check_head",
|
|
1234
|
+
:header_params => header_params,
|
|
1235
|
+
:query_params => query_params,
|
|
1236
|
+
:form_params => form_params,
|
|
1237
|
+
:body => post_body,
|
|
1238
|
+
:auth_names => auth_names,
|
|
1239
|
+
:return_type => return_type
|
|
1240
|
+
)
|
|
1241
|
+
|
|
1242
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
1243
|
+
if @api_client.config.debugging
|
|
1244
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1245
|
+
end
|
|
1246
|
+
return data, status_code, headers
|
|
1247
|
+
end
|
|
1248
|
+
|
|
1249
|
+
# Google search suggestions
|
|
1250
|
+
# Get Google search autocomplete suggestions.
|
|
1251
|
+
# @param q [String] Search query to get suggestions for
|
|
1252
|
+
# @param [Hash] opts the optional parameters
|
|
1253
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1254
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1255
|
+
# @return [Object]
|
|
1256
|
+
def google_google_search_suggestions(q, opts = {})
|
|
1257
|
+
data, _status_code, _headers = google_google_search_suggestions_with_http_info(q, opts)
|
|
1258
|
+
data
|
|
1259
|
+
end
|
|
1260
|
+
|
|
1261
|
+
# Google search suggestions
|
|
1262
|
+
# Get Google search autocomplete suggestions.
|
|
1263
|
+
# @param q [String] Search query to get suggestions for
|
|
1264
|
+
# @param [Hash] opts the optional parameters
|
|
1265
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1266
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1267
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1268
|
+
def google_google_search_suggestions_with_http_info(q, opts = {})
|
|
1269
|
+
if @api_client.config.debugging
|
|
1270
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_search_suggestions ...'
|
|
1271
|
+
end
|
|
1272
|
+
# verify the required parameter 'q' is set
|
|
1273
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
1274
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_google_search_suggestions"
|
|
1275
|
+
end
|
|
1276
|
+
# resource path
|
|
1277
|
+
local_var_path = '/v1/google/autocomplete'
|
|
1278
|
+
|
|
1279
|
+
# query parameters
|
|
1280
|
+
query_params = opts[:query_params] || {}
|
|
1281
|
+
query_params[:'q'] = q
|
|
1282
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1283
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1284
|
+
|
|
1285
|
+
# header parameters
|
|
1286
|
+
header_params = opts[:header_params] || {}
|
|
1287
|
+
# HTTP header 'Accept' (if needed)
|
|
1288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1289
|
+
|
|
1290
|
+
# form parameters
|
|
1291
|
+
form_params = opts[:form_params] || {}
|
|
1292
|
+
|
|
1293
|
+
# http body (model)
|
|
1294
|
+
post_body = opts[:debug_body]
|
|
1295
|
+
|
|
1296
|
+
# return_type
|
|
1297
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1298
|
+
|
|
1299
|
+
# auth_names
|
|
1300
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1301
|
+
|
|
1302
|
+
new_options = opts.merge(
|
|
1303
|
+
:operation => :"GoogleApi.google_google_search_suggestions",
|
|
1304
|
+
:header_params => header_params,
|
|
1305
|
+
:query_params => query_params,
|
|
1306
|
+
:form_params => form_params,
|
|
1307
|
+
:body => post_body,
|
|
1308
|
+
:auth_names => auth_names,
|
|
1309
|
+
:return_type => return_type
|
|
1310
|
+
)
|
|
1311
|
+
|
|
1312
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1313
|
+
if @api_client.config.debugging
|
|
1314
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_search_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1315
|
+
end
|
|
1316
|
+
return data, status_code, headers
|
|
1317
|
+
end
|
|
1318
|
+
|
|
1319
|
+
# Google Shorts search
|
|
1320
|
+
# Return short-form video results (YouTube Shorts, TikToks) from Google Shorts mode.
|
|
1321
|
+
# @param q [String] Search query
|
|
1322
|
+
# @param [Hash] opts the optional parameters
|
|
1323
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1324
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1325
|
+
# @option opts [String] :domain Google domain (default to 'google.com')
|
|
1326
|
+
# @option opts [Integer] :num Results per page (default to 20)
|
|
1327
|
+
# @option opts [Integer] :start Pagination offset (default to 0)
|
|
1328
|
+
# @return [Object]
|
|
1329
|
+
def google_google_shorts_search(q, opts = {})
|
|
1330
|
+
data, _status_code, _headers = google_google_shorts_search_with_http_info(q, opts)
|
|
1331
|
+
data
|
|
1332
|
+
end
|
|
1333
|
+
|
|
1334
|
+
# Google Shorts search
|
|
1335
|
+
# Return short-form video results (YouTube Shorts, TikToks) from Google Shorts mode.
|
|
1336
|
+
# @param q [String] Search query
|
|
1337
|
+
# @param [Hash] opts the optional parameters
|
|
1338
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1339
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1340
|
+
# @option opts [String] :domain Google domain (default to 'google.com')
|
|
1341
|
+
# @option opts [Integer] :num Results per page (default to 20)
|
|
1342
|
+
# @option opts [Integer] :start Pagination offset (default to 0)
|
|
1343
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1344
|
+
def google_google_shorts_search_with_http_info(q, opts = {})
|
|
1345
|
+
if @api_client.config.debugging
|
|
1346
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_shorts_search ...'
|
|
1347
|
+
end
|
|
1348
|
+
# verify the required parameter 'q' is set
|
|
1349
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
1350
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_google_shorts_search"
|
|
1351
|
+
end
|
|
1352
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] > 50
|
|
1353
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_google_shorts_search, must be smaller than or equal to 50.'
|
|
1354
|
+
end
|
|
1355
|
+
|
|
1356
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] < 1
|
|
1357
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_google_shorts_search, must be greater than or equal to 1.'
|
|
1358
|
+
end
|
|
1359
|
+
|
|
1360
|
+
if @api_client.config.client_side_validation && !opts[:'start'].nil? && opts[:'start'] < 0
|
|
1361
|
+
fail ArgumentError, 'invalid value for "opts[:"start"]" when calling GoogleApi.google_google_shorts_search, must be greater than or equal to 0.'
|
|
1362
|
+
end
|
|
1363
|
+
|
|
1364
|
+
# resource path
|
|
1365
|
+
local_var_path = '/v1/google/shorts/search'
|
|
1366
|
+
|
|
1367
|
+
# query parameters
|
|
1368
|
+
query_params = opts[:query_params] || {}
|
|
1369
|
+
query_params[:'q'] = q
|
|
1370
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1371
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1372
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
1373
|
+
query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
|
|
1374
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
|
1375
|
+
|
|
1376
|
+
# header parameters
|
|
1377
|
+
header_params = opts[:header_params] || {}
|
|
1378
|
+
# HTTP header 'Accept' (if needed)
|
|
1379
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1380
|
+
|
|
1381
|
+
# form parameters
|
|
1382
|
+
form_params = opts[:form_params] || {}
|
|
1383
|
+
|
|
1384
|
+
# http body (model)
|
|
1385
|
+
post_body = opts[:debug_body]
|
|
1386
|
+
|
|
1387
|
+
# return_type
|
|
1388
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1389
|
+
|
|
1390
|
+
# auth_names
|
|
1391
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1392
|
+
|
|
1393
|
+
new_options = opts.merge(
|
|
1394
|
+
:operation => :"GoogleApi.google_google_shorts_search",
|
|
1395
|
+
:header_params => header_params,
|
|
1396
|
+
:query_params => query_params,
|
|
1397
|
+
:form_params => form_params,
|
|
1398
|
+
:body => post_body,
|
|
1399
|
+
:auth_names => auth_names,
|
|
1400
|
+
:return_type => return_type
|
|
1401
|
+
)
|
|
1402
|
+
|
|
1403
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1404
|
+
if @api_client.config.debugging
|
|
1405
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_shorts_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1406
|
+
end
|
|
1407
|
+
return data, status_code, headers
|
|
1408
|
+
end
|
|
1409
|
+
|
|
1410
|
+
# Google web search
|
|
1411
|
+
# Search Google and get structured results (organic, ads, KG, AI overview, PAA).
|
|
1412
|
+
# @param q [String] Search query (supports Google operators)
|
|
1413
|
+
# @param [Hash] opts the optional parameters
|
|
1414
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1415
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1416
|
+
# @option opts [Integer] :num (default to 10)
|
|
1417
|
+
# @option opts [Integer] :start Page offset (0, 10, 20...) (default to 0)
|
|
1418
|
+
# @option opts [String] :domain Google domain (default to 'google.com')
|
|
1419
|
+
# @option opts [String] :device Device target: desktop, mobile, iphone, android, tablet (default to 'desktop')
|
|
1420
|
+
# @option opts [String] :user_agent Custom User-Agent (overrides device)
|
|
1421
|
+
# @option opts [String] :output Response format: json (parsed) or html (raw SERP) (default to 'json')
|
|
1422
|
+
# @option opts [String] :location City-level geo-targeting
|
|
1423
|
+
# @option opts [String] :lr Language restrict (e.g. lang_en)
|
|
1424
|
+
# @option opts [String] :tbs Time filter (e.g. qdr:d)
|
|
1425
|
+
# @option opts [String] :safe (default to 'off')
|
|
1426
|
+
# @option opts [String] :uule UULE encoded location
|
|
1427
|
+
# @option opts [Integer] :filter Show omitted results
|
|
1428
|
+
# @option opts [Integer] :nfpr Disable auto-correction (default to 0)
|
|
1429
|
+
# @option opts [String] :cr Country restrict
|
|
1430
|
+
# @option opts [String] :ludocid Google Place CID
|
|
1431
|
+
# @option opts [String] :lsig Knowledge Graph map ID
|
|
1432
|
+
# @option opts [String] :kgmid Knowledge Graph entity ID
|
|
1433
|
+
# @option opts [String] :si Cached search params
|
|
1434
|
+
# @option opts [String] :ibp Layout control
|
|
1435
|
+
# @option opts [String] :uds Google filter string
|
|
1436
|
+
# @option opts [Boolean] :ai_overview Chase deferred AI Overview page_token with a follow-up fetch and merge the result. Adds ~1s and 1 credit when the SERP defers the overview. (default to false)
|
|
1437
|
+
# @return [Object]
|
|
1438
|
+
def google_google_web_search(q, opts = {})
|
|
1439
|
+
data, _status_code, _headers = google_google_web_search_with_http_info(q, opts)
|
|
1440
|
+
data
|
|
1441
|
+
end
|
|
1442
|
+
|
|
1443
|
+
# Google web search
|
|
1444
|
+
# Search Google and get structured results (organic, ads, KG, AI overview, PAA).
|
|
1445
|
+
# @param q [String] Search query (supports Google operators)
|
|
1446
|
+
# @param [Hash] opts the optional parameters
|
|
1447
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
1448
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1449
|
+
# @option opts [Integer] :num (default to 10)
|
|
1450
|
+
# @option opts [Integer] :start Page offset (0, 10, 20...) (default to 0)
|
|
1451
|
+
# @option opts [String] :domain Google domain (default to 'google.com')
|
|
1452
|
+
# @option opts [String] :device Device target: desktop, mobile, iphone, android, tablet (default to 'desktop')
|
|
1453
|
+
# @option opts [String] :user_agent Custom User-Agent (overrides device)
|
|
1454
|
+
# @option opts [String] :output Response format: json (parsed) or html (raw SERP) (default to 'json')
|
|
1455
|
+
# @option opts [String] :location City-level geo-targeting
|
|
1456
|
+
# @option opts [String] :lr Language restrict (e.g. lang_en)
|
|
1457
|
+
# @option opts [String] :tbs Time filter (e.g. qdr:d)
|
|
1458
|
+
# @option opts [String] :safe (default to 'off')
|
|
1459
|
+
# @option opts [String] :uule UULE encoded location
|
|
1460
|
+
# @option opts [Integer] :filter Show omitted results
|
|
1461
|
+
# @option opts [Integer] :nfpr Disable auto-correction (default to 0)
|
|
1462
|
+
# @option opts [String] :cr Country restrict
|
|
1463
|
+
# @option opts [String] :ludocid Google Place CID
|
|
1464
|
+
# @option opts [String] :lsig Knowledge Graph map ID
|
|
1465
|
+
# @option opts [String] :kgmid Knowledge Graph entity ID
|
|
1466
|
+
# @option opts [String] :si Cached search params
|
|
1467
|
+
# @option opts [String] :ibp Layout control
|
|
1468
|
+
# @option opts [String] :uds Google filter string
|
|
1469
|
+
# @option opts [Boolean] :ai_overview Chase deferred AI Overview page_token with a follow-up fetch and merge the result. Adds ~1s and 1 credit when the SERP defers the overview. (default to false)
|
|
1470
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1471
|
+
def google_google_web_search_with_http_info(q, opts = {})
|
|
1472
|
+
if @api_client.config.debugging
|
|
1473
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_google_web_search ...'
|
|
1474
|
+
end
|
|
1475
|
+
# verify the required parameter 'q' is set
|
|
1476
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
1477
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_google_web_search"
|
|
1478
|
+
end
|
|
1479
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] > 100
|
|
1480
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_google_web_search, must be smaller than or equal to 100.'
|
|
1481
|
+
end
|
|
1482
|
+
|
|
1483
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] < 1
|
|
1484
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_google_web_search, must be greater than or equal to 1.'
|
|
1485
|
+
end
|
|
1486
|
+
|
|
1487
|
+
if @api_client.config.client_side_validation && !opts[:'start'].nil? && opts[:'start'] < 0
|
|
1488
|
+
fail ArgumentError, 'invalid value for "opts[:"start"]" when calling GoogleApi.google_google_web_search, must be greater than or equal to 0.'
|
|
1489
|
+
end
|
|
1490
|
+
|
|
1491
|
+
allowable_values = ["desktop", "mobile", "iphone", "android", "tablet"]
|
|
1492
|
+
if @api_client.config.client_side_validation && opts[:'device'] && !allowable_values.include?(opts[:'device'])
|
|
1493
|
+
fail ArgumentError, "invalid value for \"device\", must be one of #{allowable_values}"
|
|
1494
|
+
end
|
|
1495
|
+
if @api_client.config.client_side_validation && !opts[:'user_agent'].nil? && opts[:'user_agent'].to_s.length > 512
|
|
1496
|
+
fail ArgumentError, 'invalid value for "opts[:"user_agent"]" when calling GoogleApi.google_google_web_search, the character length must be smaller than or equal to 512.'
|
|
1497
|
+
end
|
|
1498
|
+
|
|
1499
|
+
pattern = Regexp.new(/^[^\r\n]*$/)
|
|
1500
|
+
if @api_client.config.client_side_validation && !opts[:'user_agent'].nil? && opts[:'user_agent'] !~ pattern
|
|
1501
|
+
fail ArgumentError, "invalid value for 'opts[:\"user_agent\"]' when calling GoogleApi.google_google_web_search, must conform to the pattern #{pattern}."
|
|
1502
|
+
end
|
|
1503
|
+
|
|
1504
|
+
allowable_values = ["json", "html"]
|
|
1505
|
+
if @api_client.config.client_side_validation && opts[:'output'] && !allowable_values.include?(opts[:'output'])
|
|
1506
|
+
fail ArgumentError, "invalid value for \"output\", must be one of #{allowable_values}"
|
|
1507
|
+
end
|
|
1508
|
+
# resource path
|
|
1509
|
+
local_var_path = '/v1/google/search'
|
|
1510
|
+
|
|
1511
|
+
# query parameters
|
|
1512
|
+
query_params = opts[:query_params] || {}
|
|
1513
|
+
query_params[:'q'] = q
|
|
1514
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1515
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1516
|
+
query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
|
|
1517
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
|
1518
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
1519
|
+
query_params[:'device'] = opts[:'device'] if !opts[:'device'].nil?
|
|
1520
|
+
query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
|
1521
|
+
query_params[:'output'] = opts[:'output'] if !opts[:'output'].nil?
|
|
1522
|
+
query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
|
|
1523
|
+
query_params[:'lr'] = opts[:'lr'] if !opts[:'lr'].nil?
|
|
1524
|
+
query_params[:'tbs'] = opts[:'tbs'] if !opts[:'tbs'].nil?
|
|
1525
|
+
query_params[:'safe'] = opts[:'safe'] if !opts[:'safe'].nil?
|
|
1526
|
+
query_params[:'uule'] = opts[:'uule'] if !opts[:'uule'].nil?
|
|
1527
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
1528
|
+
query_params[:'nfpr'] = opts[:'nfpr'] if !opts[:'nfpr'].nil?
|
|
1529
|
+
query_params[:'cr'] = opts[:'cr'] if !opts[:'cr'].nil?
|
|
1530
|
+
query_params[:'ludocid'] = opts[:'ludocid'] if !opts[:'ludocid'].nil?
|
|
1531
|
+
query_params[:'lsig'] = opts[:'lsig'] if !opts[:'lsig'].nil?
|
|
1532
|
+
query_params[:'kgmid'] = opts[:'kgmid'] if !opts[:'kgmid'].nil?
|
|
1533
|
+
query_params[:'si'] = opts[:'si'] if !opts[:'si'].nil?
|
|
1534
|
+
query_params[:'ibp'] = opts[:'ibp'] if !opts[:'ibp'].nil?
|
|
1535
|
+
query_params[:'uds'] = opts[:'uds'] if !opts[:'uds'].nil?
|
|
1536
|
+
query_params[:'ai_overview'] = opts[:'ai_overview'] if !opts[:'ai_overview'].nil?
|
|
1537
|
+
|
|
1538
|
+
# header parameters
|
|
1539
|
+
header_params = opts[:header_params] || {}
|
|
1540
|
+
# HTTP header 'Accept' (if needed)
|
|
1541
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1542
|
+
|
|
1543
|
+
# form parameters
|
|
1544
|
+
form_params = opts[:form_params] || {}
|
|
1545
|
+
|
|
1546
|
+
# http body (model)
|
|
1547
|
+
post_body = opts[:debug_body]
|
|
1548
|
+
|
|
1549
|
+
# return_type
|
|
1550
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1551
|
+
|
|
1552
|
+
# auth_names
|
|
1553
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1554
|
+
|
|
1555
|
+
new_options = opts.merge(
|
|
1556
|
+
:operation => :"GoogleApi.google_google_web_search",
|
|
1557
|
+
:header_params => header_params,
|
|
1558
|
+
:query_params => query_params,
|
|
1559
|
+
:form_params => form_params,
|
|
1560
|
+
:body => post_body,
|
|
1561
|
+
:auth_names => auth_names,
|
|
1562
|
+
:return_type => return_type
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1566
|
+
if @api_client.config.debugging
|
|
1567
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_google_web_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1568
|
+
end
|
|
1569
|
+
return data, status_code, headers
|
|
1570
|
+
end
|
|
1571
|
+
|
|
1572
|
+
# Hotel details
|
|
1573
|
+
# @param property_token [String] Property token
|
|
1574
|
+
# @param check_in [String] YYYY-MM-DD
|
|
1575
|
+
# @param check_out [String] YYYY-MM-DD
|
|
1576
|
+
# @param [Hash] opts the optional parameters
|
|
1577
|
+
# @return [Object]
|
|
1578
|
+
def google_hotel_details(property_token, check_in, check_out, opts = {})
|
|
1579
|
+
data, _status_code, _headers = google_hotel_details_with_http_info(property_token, check_in, check_out, opts)
|
|
1580
|
+
data
|
|
1581
|
+
end
|
|
1582
|
+
|
|
1583
|
+
# Hotel details
|
|
1584
|
+
# @param property_token [String] Property token
|
|
1585
|
+
# @param check_in [String] YYYY-MM-DD
|
|
1586
|
+
# @param check_out [String] YYYY-MM-DD
|
|
1587
|
+
# @param [Hash] opts the optional parameters
|
|
1588
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1589
|
+
def google_hotel_details_with_http_info(property_token, check_in, check_out, opts = {})
|
|
1590
|
+
if @api_client.config.debugging
|
|
1591
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_hotel_details ...'
|
|
1592
|
+
end
|
|
1593
|
+
# verify the required parameter 'property_token' is set
|
|
1594
|
+
if @api_client.config.client_side_validation && property_token.nil?
|
|
1595
|
+
fail ArgumentError, "Missing the required parameter 'property_token' when calling GoogleApi.google_hotel_details"
|
|
1596
|
+
end
|
|
1597
|
+
# verify the required parameter 'check_in' is set
|
|
1598
|
+
if @api_client.config.client_side_validation && check_in.nil?
|
|
1599
|
+
fail ArgumentError, "Missing the required parameter 'check_in' when calling GoogleApi.google_hotel_details"
|
|
1600
|
+
end
|
|
1601
|
+
# verify the required parameter 'check_out' is set
|
|
1602
|
+
if @api_client.config.client_side_validation && check_out.nil?
|
|
1603
|
+
fail ArgumentError, "Missing the required parameter 'check_out' when calling GoogleApi.google_hotel_details"
|
|
1604
|
+
end
|
|
1605
|
+
# resource path
|
|
1606
|
+
local_var_path = '/v1/google/hotels/details'
|
|
1607
|
+
|
|
1608
|
+
# query parameters
|
|
1609
|
+
query_params = opts[:query_params] || {}
|
|
1610
|
+
query_params[:'property_token'] = property_token
|
|
1611
|
+
query_params[:'check_in'] = check_in
|
|
1612
|
+
query_params[:'check_out'] = check_out
|
|
1613
|
+
|
|
1614
|
+
# header parameters
|
|
1615
|
+
header_params = opts[:header_params] || {}
|
|
1616
|
+
# HTTP header 'Accept' (if needed)
|
|
1617
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1618
|
+
|
|
1619
|
+
# form parameters
|
|
1620
|
+
form_params = opts[:form_params] || {}
|
|
1621
|
+
|
|
1622
|
+
# http body (model)
|
|
1623
|
+
post_body = opts[:debug_body]
|
|
1624
|
+
|
|
1625
|
+
# return_type
|
|
1626
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1627
|
+
|
|
1628
|
+
# auth_names
|
|
1629
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1630
|
+
|
|
1631
|
+
new_options = opts.merge(
|
|
1632
|
+
:operation => :"GoogleApi.google_hotel_details",
|
|
1633
|
+
:header_params => header_params,
|
|
1634
|
+
:query_params => query_params,
|
|
1635
|
+
:form_params => form_params,
|
|
1636
|
+
:body => post_body,
|
|
1637
|
+
:auth_names => auth_names,
|
|
1638
|
+
:return_type => return_type
|
|
1639
|
+
)
|
|
1640
|
+
|
|
1641
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1642
|
+
if @api_client.config.debugging
|
|
1643
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_hotel_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1644
|
+
end
|
|
1645
|
+
return data, status_code, headers
|
|
1646
|
+
end
|
|
1647
|
+
|
|
1648
|
+
# Immersive product detail
|
|
1649
|
+
# Get deep product details from Google's immersive product page.
|
|
1650
|
+
# @param product_id [String] Google Shopping ``gpcid`` — the product_id returned on ``/shopping/search`` tiles. Scrapingdog-compatible.
|
|
1651
|
+
# @param q [String] Original search query that surfaced the product. Required by Google's ``/async/oapv`` RPC.
|
|
1652
|
+
# @param [Hash] opts the optional parameters
|
|
1653
|
+
# @option opts [String] :gl Country code (ISO 3166 alpha-2) (default to 'us')
|
|
1654
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1655
|
+
# @option opts [String] :catalog_id Optional ``catalogid`` from the Shopping tile (improves parity).
|
|
1656
|
+
# @option opts [String] :image_docid Optional ``imageDocid`` for higher-fidelity images.
|
|
1657
|
+
# @option opts [String] :headline_offer_docid Optional ``headlineOfferDocid`` to pin the featured seller.
|
|
1658
|
+
# @option opts [String] :mid Optional Google Knowledge-Graph ``mid``.
|
|
1659
|
+
# @option opts [Boolean] :include_offers When true, fetch the full merchant-offer list via a secondary RPC (``/async/piu_ps``). Adds ~1 s. (default to false)
|
|
1660
|
+
# @option opts [Boolean] :include_variants When true, fetch size/colour variants via a secondary RPC (``/async/toy_v``). Adds ~1 s. (default to false)
|
|
1661
|
+
# @return [Object]
|
|
1662
|
+
def google_immersive_product_detail(product_id, q, opts = {})
|
|
1663
|
+
data, _status_code, _headers = google_immersive_product_detail_with_http_info(product_id, q, opts)
|
|
1664
|
+
data
|
|
1665
|
+
end
|
|
1666
|
+
|
|
1667
|
+
# Immersive product detail
|
|
1668
|
+
# Get deep product details from Google's immersive product page.
|
|
1669
|
+
# @param product_id [String] Google Shopping ``gpcid`` — the product_id returned on ``/shopping/search`` tiles. Scrapingdog-compatible.
|
|
1670
|
+
# @param q [String] Original search query that surfaced the product. Required by Google's ``/async/oapv`` RPC.
|
|
1671
|
+
# @param [Hash] opts the optional parameters
|
|
1672
|
+
# @option opts [String] :gl Country code (ISO 3166 alpha-2) (default to 'us')
|
|
1673
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1674
|
+
# @option opts [String] :catalog_id Optional ``catalogid`` from the Shopping tile (improves parity).
|
|
1675
|
+
# @option opts [String] :image_docid Optional ``imageDocid`` for higher-fidelity images.
|
|
1676
|
+
# @option opts [String] :headline_offer_docid Optional ``headlineOfferDocid`` to pin the featured seller.
|
|
1677
|
+
# @option opts [String] :mid Optional Google Knowledge-Graph ``mid``.
|
|
1678
|
+
# @option opts [Boolean] :include_offers When true, fetch the full merchant-offer list via a secondary RPC (``/async/piu_ps``). Adds ~1 s. (default to false)
|
|
1679
|
+
# @option opts [Boolean] :include_variants When true, fetch size/colour variants via a secondary RPC (``/async/toy_v``). Adds ~1 s. (default to false)
|
|
1680
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1681
|
+
def google_immersive_product_detail_with_http_info(product_id, q, opts = {})
|
|
1682
|
+
if @api_client.config.debugging
|
|
1683
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_immersive_product_detail ...'
|
|
1684
|
+
end
|
|
1685
|
+
# verify the required parameter 'product_id' is set
|
|
1686
|
+
if @api_client.config.client_side_validation && product_id.nil?
|
|
1687
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling GoogleApi.google_immersive_product_detail"
|
|
1688
|
+
end
|
|
1689
|
+
# verify the required parameter 'q' is set
|
|
1690
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
1691
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_immersive_product_detail"
|
|
1692
|
+
end
|
|
1693
|
+
# resource path
|
|
1694
|
+
local_var_path = '/v1/google/products/detail'
|
|
1695
|
+
|
|
1696
|
+
# query parameters
|
|
1697
|
+
query_params = opts[:query_params] || {}
|
|
1698
|
+
query_params[:'product_id'] = product_id
|
|
1699
|
+
query_params[:'q'] = q
|
|
1700
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1701
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1702
|
+
query_params[:'catalog_id'] = opts[:'catalog_id'] if !opts[:'catalog_id'].nil?
|
|
1703
|
+
query_params[:'image_docid'] = opts[:'image_docid'] if !opts[:'image_docid'].nil?
|
|
1704
|
+
query_params[:'headline_offer_docid'] = opts[:'headline_offer_docid'] if !opts[:'headline_offer_docid'].nil?
|
|
1705
|
+
query_params[:'mid'] = opts[:'mid'] if !opts[:'mid'].nil?
|
|
1706
|
+
query_params[:'include_offers'] = opts[:'include_offers'] if !opts[:'include_offers'].nil?
|
|
1707
|
+
query_params[:'include_variants'] = opts[:'include_variants'] if !opts[:'include_variants'].nil?
|
|
1708
|
+
|
|
1709
|
+
# header parameters
|
|
1710
|
+
header_params = opts[:header_params] || {}
|
|
1711
|
+
# HTTP header 'Accept' (if needed)
|
|
1712
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1713
|
+
|
|
1714
|
+
# form parameters
|
|
1715
|
+
form_params = opts[:form_params] || {}
|
|
1716
|
+
|
|
1717
|
+
# http body (model)
|
|
1718
|
+
post_body = opts[:debug_body]
|
|
1719
|
+
|
|
1720
|
+
# return_type
|
|
1721
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1722
|
+
|
|
1723
|
+
# auth_names
|
|
1724
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1725
|
+
|
|
1726
|
+
new_options = opts.merge(
|
|
1727
|
+
:operation => :"GoogleApi.google_immersive_product_detail",
|
|
1728
|
+
:header_params => header_params,
|
|
1729
|
+
:query_params => query_params,
|
|
1730
|
+
:form_params => form_params,
|
|
1731
|
+
:body => post_body,
|
|
1732
|
+
:auth_names => auth_names,
|
|
1733
|
+
:return_type => return_type
|
|
1734
|
+
)
|
|
1735
|
+
|
|
1736
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1737
|
+
if @api_client.config.debugging
|
|
1738
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_immersive_product_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1739
|
+
end
|
|
1740
|
+
return data, status_code, headers
|
|
1741
|
+
end
|
|
1742
|
+
|
|
1743
|
+
# Interest by region
|
|
1744
|
+
# @param q [String] Search term
|
|
1745
|
+
# @param [Hash] opts the optional parameters
|
|
1746
|
+
# @option opts [String] :geo (default to '')
|
|
1747
|
+
# @return [Object]
|
|
1748
|
+
def google_interest_by_region(q, opts = {})
|
|
1749
|
+
data, _status_code, _headers = google_interest_by_region_with_http_info(q, opts)
|
|
1750
|
+
data
|
|
1751
|
+
end
|
|
1752
|
+
|
|
1753
|
+
# Interest by region
|
|
1754
|
+
# @param q [String] Search term
|
|
1755
|
+
# @param [Hash] opts the optional parameters
|
|
1756
|
+
# @option opts [String] :geo (default to '')
|
|
1757
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1758
|
+
def google_interest_by_region_with_http_info(q, opts = {})
|
|
1759
|
+
if @api_client.config.debugging
|
|
1760
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_interest_by_region ...'
|
|
1761
|
+
end
|
|
1762
|
+
# verify the required parameter 'q' is set
|
|
1763
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
1764
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_interest_by_region"
|
|
1765
|
+
end
|
|
1766
|
+
# resource path
|
|
1767
|
+
local_var_path = '/v1/google/trends/regions'
|
|
1768
|
+
|
|
1769
|
+
# query parameters
|
|
1770
|
+
query_params = opts[:query_params] || {}
|
|
1771
|
+
query_params[:'q'] = q
|
|
1772
|
+
query_params[:'geo'] = opts[:'geo'] if !opts[:'geo'].nil?
|
|
1773
|
+
|
|
1774
|
+
# header parameters
|
|
1775
|
+
header_params = opts[:header_params] || {}
|
|
1776
|
+
# HTTP header 'Accept' (if needed)
|
|
1777
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1778
|
+
|
|
1779
|
+
# form parameters
|
|
1780
|
+
form_params = opts[:form_params] || {}
|
|
1781
|
+
|
|
1782
|
+
# http body (model)
|
|
1783
|
+
post_body = opts[:debug_body]
|
|
1784
|
+
|
|
1785
|
+
# return_type
|
|
1786
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1787
|
+
|
|
1788
|
+
# auth_names
|
|
1789
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1790
|
+
|
|
1791
|
+
new_options = opts.merge(
|
|
1792
|
+
:operation => :"GoogleApi.google_interest_by_region",
|
|
1793
|
+
:header_params => header_params,
|
|
1794
|
+
:query_params => query_params,
|
|
1795
|
+
:form_params => form_params,
|
|
1796
|
+
:body => post_body,
|
|
1797
|
+
:auth_names => auth_names,
|
|
1798
|
+
:return_type => return_type
|
|
1799
|
+
)
|
|
1800
|
+
|
|
1801
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1802
|
+
if @api_client.config.debugging
|
|
1803
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_interest_by_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1804
|
+
end
|
|
1805
|
+
return data, status_code, headers
|
|
1806
|
+
end
|
|
1807
|
+
|
|
1808
|
+
# Interest over time
|
|
1809
|
+
# @param q [String] Search terms
|
|
1810
|
+
# @param [Hash] opts the optional parameters
|
|
1811
|
+
# @option opts [String] :geo (default to '')
|
|
1812
|
+
# @option opts [String] :date (default to 'today 12-m')
|
|
1813
|
+
# @return [Object]
|
|
1814
|
+
def google_interest_over_time(q, opts = {})
|
|
1815
|
+
data, _status_code, _headers = google_interest_over_time_with_http_info(q, opts)
|
|
1816
|
+
data
|
|
1817
|
+
end
|
|
1818
|
+
|
|
1819
|
+
# Interest over time
|
|
1820
|
+
# @param q [String] Search terms
|
|
1821
|
+
# @param [Hash] opts the optional parameters
|
|
1822
|
+
# @option opts [String] :geo (default to '')
|
|
1823
|
+
# @option opts [String] :date (default to 'today 12-m')
|
|
1824
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1825
|
+
def google_interest_over_time_with_http_info(q, opts = {})
|
|
1826
|
+
if @api_client.config.debugging
|
|
1827
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_interest_over_time ...'
|
|
1828
|
+
end
|
|
1829
|
+
# verify the required parameter 'q' is set
|
|
1830
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
1831
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_interest_over_time"
|
|
1832
|
+
end
|
|
1833
|
+
# resource path
|
|
1834
|
+
local_var_path = '/v1/google/trends/interest'
|
|
1835
|
+
|
|
1836
|
+
# query parameters
|
|
1837
|
+
query_params = opts[:query_params] || {}
|
|
1838
|
+
query_params[:'q'] = q
|
|
1839
|
+
query_params[:'geo'] = opts[:'geo'] if !opts[:'geo'].nil?
|
|
1840
|
+
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
|
1841
|
+
|
|
1842
|
+
# header parameters
|
|
1843
|
+
header_params = opts[:header_params] || {}
|
|
1844
|
+
# HTTP header 'Accept' (if needed)
|
|
1845
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1846
|
+
|
|
1847
|
+
# form parameters
|
|
1848
|
+
form_params = opts[:form_params] || {}
|
|
1849
|
+
|
|
1850
|
+
# http body (model)
|
|
1851
|
+
post_body = opts[:debug_body]
|
|
1852
|
+
|
|
1853
|
+
# return_type
|
|
1854
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1855
|
+
|
|
1856
|
+
# auth_names
|
|
1857
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1858
|
+
|
|
1859
|
+
new_options = opts.merge(
|
|
1860
|
+
:operation => :"GoogleApi.google_interest_over_time",
|
|
1861
|
+
:header_params => header_params,
|
|
1862
|
+
:query_params => query_params,
|
|
1863
|
+
:form_params => form_params,
|
|
1864
|
+
:body => post_body,
|
|
1865
|
+
:auth_names => auth_names,
|
|
1866
|
+
:return_type => return_type
|
|
1867
|
+
)
|
|
1868
|
+
|
|
1869
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1870
|
+
if @api_client.config.debugging
|
|
1871
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_interest_over_time\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1872
|
+
end
|
|
1873
|
+
return data, status_code, headers
|
|
1874
|
+
end
|
|
1875
|
+
|
|
1876
|
+
# Multi-seller offers by barcode
|
|
1877
|
+
# Resolve a barcode to a product via Google web search, then return its Google Shopping seller offers (source + price per merchant).
|
|
1878
|
+
# @param barcode [String] Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
|
|
1879
|
+
# @param [Hash] opts the optional parameters
|
|
1880
|
+
# @option opts [String] :gl Country code (ISO 3166 alpha-2)
|
|
1881
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1882
|
+
# @return [Object]
|
|
1883
|
+
def google_multi_seller_offers_by_barcode(barcode, opts = {})
|
|
1884
|
+
data, _status_code, _headers = google_multi_seller_offers_by_barcode_with_http_info(barcode, opts)
|
|
1885
|
+
data
|
|
1886
|
+
end
|
|
1887
|
+
|
|
1888
|
+
# Multi-seller offers by barcode
|
|
1889
|
+
# Resolve a barcode to a product via Google web search, then return its Google Shopping seller offers (source + price per merchant).
|
|
1890
|
+
# @param barcode [String] Product barcode — GTIN-8 / UPC-A / EAN-13 / GTIN-14
|
|
1891
|
+
# @param [Hash] opts the optional parameters
|
|
1892
|
+
# @option opts [String] :gl Country code (ISO 3166 alpha-2)
|
|
1893
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
1894
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1895
|
+
def google_multi_seller_offers_by_barcode_with_http_info(barcode, opts = {})
|
|
1896
|
+
if @api_client.config.debugging
|
|
1897
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_multi_seller_offers_by_barcode ...'
|
|
1898
|
+
end
|
|
1899
|
+
# verify the required parameter 'barcode' is set
|
|
1900
|
+
if @api_client.config.client_side_validation && barcode.nil?
|
|
1901
|
+
fail ArgumentError, "Missing the required parameter 'barcode' when calling GoogleApi.google_multi_seller_offers_by_barcode"
|
|
1902
|
+
end
|
|
1903
|
+
# resource path
|
|
1904
|
+
local_var_path = '/v1/google/shopping/offers'
|
|
1905
|
+
|
|
1906
|
+
# query parameters
|
|
1907
|
+
query_params = opts[:query_params] || {}
|
|
1908
|
+
query_params[:'barcode'] = barcode
|
|
1909
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1910
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1911
|
+
|
|
1912
|
+
# header parameters
|
|
1913
|
+
header_params = opts[:header_params] || {}
|
|
1914
|
+
# HTTP header 'Accept' (if needed)
|
|
1915
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1916
|
+
|
|
1917
|
+
# form parameters
|
|
1918
|
+
form_params = opts[:form_params] || {}
|
|
1919
|
+
|
|
1920
|
+
# http body (model)
|
|
1921
|
+
post_body = opts[:debug_body]
|
|
1922
|
+
|
|
1923
|
+
# return_type
|
|
1924
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1925
|
+
|
|
1926
|
+
# auth_names
|
|
1927
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1928
|
+
|
|
1929
|
+
new_options = opts.merge(
|
|
1930
|
+
:operation => :"GoogleApi.google_multi_seller_offers_by_barcode",
|
|
1931
|
+
:header_params => header_params,
|
|
1932
|
+
:query_params => query_params,
|
|
1933
|
+
:form_params => form_params,
|
|
1934
|
+
:body => post_body,
|
|
1935
|
+
:auth_names => auth_names,
|
|
1936
|
+
:return_type => return_type
|
|
1937
|
+
)
|
|
1938
|
+
|
|
1939
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1940
|
+
if @api_client.config.debugging
|
|
1941
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_multi_seller_offers_by_barcode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1942
|
+
end
|
|
1943
|
+
return data, status_code, headers
|
|
1944
|
+
end
|
|
1945
|
+
|
|
1946
|
+
# News by topic
|
|
1947
|
+
# @param topic [String] Topic name
|
|
1948
|
+
# @param [Hash] opts the optional parameters
|
|
1949
|
+
# @option opts [String] :hl (default to 'en')
|
|
1950
|
+
# @option opts [String] :gl (default to 'US')
|
|
1951
|
+
# @option opts [Integer] :max_results (default to 10)
|
|
1952
|
+
# @return [Object]
|
|
1953
|
+
def google_news_by_topic(topic, opts = {})
|
|
1954
|
+
data, _status_code, _headers = google_news_by_topic_with_http_info(topic, opts)
|
|
1955
|
+
data
|
|
1956
|
+
end
|
|
1957
|
+
|
|
1958
|
+
# News by topic
|
|
1959
|
+
# @param topic [String] Topic name
|
|
1960
|
+
# @param [Hash] opts the optional parameters
|
|
1961
|
+
# @option opts [String] :hl (default to 'en')
|
|
1962
|
+
# @option opts [String] :gl (default to 'US')
|
|
1963
|
+
# @option opts [Integer] :max_results (default to 10)
|
|
1964
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1965
|
+
def google_news_by_topic_with_http_info(topic, opts = {})
|
|
1966
|
+
if @api_client.config.debugging
|
|
1967
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_news_by_topic ...'
|
|
1968
|
+
end
|
|
1969
|
+
# verify the required parameter 'topic' is set
|
|
1970
|
+
if @api_client.config.client_side_validation && topic.nil?
|
|
1971
|
+
fail ArgumentError, "Missing the required parameter 'topic' when calling GoogleApi.google_news_by_topic"
|
|
1972
|
+
end
|
|
1973
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] > 100
|
|
1974
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling GoogleApi.google_news_by_topic, must be smaller than or equal to 100.'
|
|
1975
|
+
end
|
|
1976
|
+
|
|
1977
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] < 1
|
|
1978
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling GoogleApi.google_news_by_topic, must be greater than or equal to 1.'
|
|
1979
|
+
end
|
|
1980
|
+
|
|
1981
|
+
# resource path
|
|
1982
|
+
local_var_path = '/v1/google/news/topics'
|
|
1983
|
+
|
|
1984
|
+
# query parameters
|
|
1985
|
+
query_params = opts[:query_params] || {}
|
|
1986
|
+
query_params[:'topic'] = topic
|
|
1987
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
1988
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
1989
|
+
query_params[:'max_results'] = opts[:'max_results'] if !opts[:'max_results'].nil?
|
|
1990
|
+
|
|
1991
|
+
# header parameters
|
|
1992
|
+
header_params = opts[:header_params] || {}
|
|
1993
|
+
# HTTP header 'Accept' (if needed)
|
|
1994
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1995
|
+
|
|
1996
|
+
# form parameters
|
|
1997
|
+
form_params = opts[:form_params] || {}
|
|
1998
|
+
|
|
1999
|
+
# http body (model)
|
|
2000
|
+
post_body = opts[:debug_body]
|
|
2001
|
+
|
|
2002
|
+
# return_type
|
|
2003
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2004
|
+
|
|
2005
|
+
# auth_names
|
|
2006
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2007
|
+
|
|
2008
|
+
new_options = opts.merge(
|
|
2009
|
+
:operation => :"GoogleApi.google_news_by_topic",
|
|
2010
|
+
:header_params => header_params,
|
|
2011
|
+
:query_params => query_params,
|
|
2012
|
+
:form_params => form_params,
|
|
2013
|
+
:body => post_body,
|
|
2014
|
+
:auth_names => auth_names,
|
|
2015
|
+
:return_type => return_type
|
|
2016
|
+
)
|
|
2017
|
+
|
|
2018
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2019
|
+
if @api_client.config.debugging
|
|
2020
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_news_by_topic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2021
|
+
end
|
|
2022
|
+
return data, status_code, headers
|
|
2023
|
+
end
|
|
2024
|
+
|
|
2025
|
+
# Patent details
|
|
2026
|
+
# @param patent_id [String] Patent number
|
|
2027
|
+
# @param [Hash] opts the optional parameters
|
|
2028
|
+
# @return [Object]
|
|
2029
|
+
def google_patent_details(patent_id, opts = {})
|
|
2030
|
+
data, _status_code, _headers = google_patent_details_with_http_info(patent_id, opts)
|
|
2031
|
+
data
|
|
2032
|
+
end
|
|
2033
|
+
|
|
2034
|
+
# Patent details
|
|
2035
|
+
# @param patent_id [String] Patent number
|
|
2036
|
+
# @param [Hash] opts the optional parameters
|
|
2037
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2038
|
+
def google_patent_details_with_http_info(patent_id, opts = {})
|
|
2039
|
+
if @api_client.config.debugging
|
|
2040
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_patent_details ...'
|
|
2041
|
+
end
|
|
2042
|
+
# verify the required parameter 'patent_id' is set
|
|
2043
|
+
if @api_client.config.client_side_validation && patent_id.nil?
|
|
2044
|
+
fail ArgumentError, "Missing the required parameter 'patent_id' when calling GoogleApi.google_patent_details"
|
|
2045
|
+
end
|
|
2046
|
+
# resource path
|
|
2047
|
+
local_var_path = '/v1/google/patents/detail'
|
|
2048
|
+
|
|
2049
|
+
# query parameters
|
|
2050
|
+
query_params = opts[:query_params] || {}
|
|
2051
|
+
query_params[:'patent_id'] = patent_id
|
|
2052
|
+
|
|
2053
|
+
# header parameters
|
|
2054
|
+
header_params = opts[:header_params] || {}
|
|
2055
|
+
# HTTP header 'Accept' (if needed)
|
|
2056
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2057
|
+
|
|
2058
|
+
# form parameters
|
|
2059
|
+
form_params = opts[:form_params] || {}
|
|
2060
|
+
|
|
2061
|
+
# http body (model)
|
|
2062
|
+
post_body = opts[:debug_body]
|
|
2063
|
+
|
|
2064
|
+
# return_type
|
|
2065
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2066
|
+
|
|
2067
|
+
# auth_names
|
|
2068
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2069
|
+
|
|
2070
|
+
new_options = opts.merge(
|
|
2071
|
+
:operation => :"GoogleApi.google_patent_details",
|
|
2072
|
+
:header_params => header_params,
|
|
2073
|
+
:query_params => query_params,
|
|
2074
|
+
:form_params => form_params,
|
|
2075
|
+
:body => post_body,
|
|
2076
|
+
:auth_names => auth_names,
|
|
2077
|
+
:return_type => return_type
|
|
2078
|
+
)
|
|
2079
|
+
|
|
2080
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2081
|
+
if @api_client.config.debugging
|
|
2082
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_patent_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2083
|
+
end
|
|
2084
|
+
return data, status_code, headers
|
|
2085
|
+
end
|
|
2086
|
+
|
|
2087
|
+
# Related topics & queries
|
|
2088
|
+
# @param q [String] Search term
|
|
2089
|
+
# @param [Hash] opts the optional parameters
|
|
2090
|
+
# @option opts [String] :geo (default to '')
|
|
2091
|
+
# @return [Object]
|
|
2092
|
+
def google_related_topics_queries(q, opts = {})
|
|
2093
|
+
data, _status_code, _headers = google_related_topics_queries_with_http_info(q, opts)
|
|
2094
|
+
data
|
|
2095
|
+
end
|
|
2096
|
+
|
|
2097
|
+
# Related topics & queries
|
|
2098
|
+
# @param q [String] Search term
|
|
2099
|
+
# @param [Hash] opts the optional parameters
|
|
2100
|
+
# @option opts [String] :geo (default to '')
|
|
2101
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2102
|
+
def google_related_topics_queries_with_http_info(q, opts = {})
|
|
2103
|
+
if @api_client.config.debugging
|
|
2104
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_related_topics_queries ...'
|
|
2105
|
+
end
|
|
2106
|
+
# verify the required parameter 'q' is set
|
|
2107
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2108
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_related_topics_queries"
|
|
2109
|
+
end
|
|
2110
|
+
# resource path
|
|
2111
|
+
local_var_path = '/v1/google/trends/related'
|
|
2112
|
+
|
|
2113
|
+
# query parameters
|
|
2114
|
+
query_params = opts[:query_params] || {}
|
|
2115
|
+
query_params[:'q'] = q
|
|
2116
|
+
query_params[:'geo'] = opts[:'geo'] if !opts[:'geo'].nil?
|
|
2117
|
+
|
|
2118
|
+
# header parameters
|
|
2119
|
+
header_params = opts[:header_params] || {}
|
|
2120
|
+
# HTTP header 'Accept' (if needed)
|
|
2121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2122
|
+
|
|
2123
|
+
# form parameters
|
|
2124
|
+
form_params = opts[:form_params] || {}
|
|
2125
|
+
|
|
2126
|
+
# http body (model)
|
|
2127
|
+
post_body = opts[:debug_body]
|
|
2128
|
+
|
|
2129
|
+
# return_type
|
|
2130
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2131
|
+
|
|
2132
|
+
# auth_names
|
|
2133
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2134
|
+
|
|
2135
|
+
new_options = opts.merge(
|
|
2136
|
+
:operation => :"GoogleApi.google_related_topics_queries",
|
|
2137
|
+
:header_params => header_params,
|
|
2138
|
+
:query_params => query_params,
|
|
2139
|
+
:form_params => form_params,
|
|
2140
|
+
:body => post_body,
|
|
2141
|
+
:auth_names => auth_names,
|
|
2142
|
+
:return_type => return_type
|
|
2143
|
+
)
|
|
2144
|
+
|
|
2145
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2146
|
+
if @api_client.config.debugging
|
|
2147
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_related_topics_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2148
|
+
end
|
|
2149
|
+
return data, status_code, headers
|
|
2150
|
+
end
|
|
2151
|
+
|
|
2152
|
+
# Search Google Images
|
|
2153
|
+
# Search Google Images for visual content.
|
|
2154
|
+
# @param q [String] Image search query
|
|
2155
|
+
# @param [Hash] opts the optional parameters
|
|
2156
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
2157
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2158
|
+
# @option opts [String] :tbs Time/filter string (e.g. qdr:d)
|
|
2159
|
+
# @option opts [String] :imgsz Image size: l, m, i, xXl
|
|
2160
|
+
# @option opts [String] :imgcolor Image color filter
|
|
2161
|
+
# @option opts [String] :imgtype Image type: face, photo, clipart
|
|
2162
|
+
# @option opts [String] :safe Safe search (default to 'off')
|
|
2163
|
+
# @option opts [Integer] :page Page number (default to 0)
|
|
2164
|
+
# @return [Object]
|
|
2165
|
+
def google_search_google_images(q, opts = {})
|
|
2166
|
+
data, _status_code, _headers = google_search_google_images_with_http_info(q, opts)
|
|
2167
|
+
data
|
|
2168
|
+
end
|
|
2169
|
+
|
|
2170
|
+
# Search Google Images
|
|
2171
|
+
# Search Google Images for visual content.
|
|
2172
|
+
# @param q [String] Image search query
|
|
2173
|
+
# @param [Hash] opts the optional parameters
|
|
2174
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
2175
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2176
|
+
# @option opts [String] :tbs Time/filter string (e.g. qdr:d)
|
|
2177
|
+
# @option opts [String] :imgsz Image size: l, m, i, xXl
|
|
2178
|
+
# @option opts [String] :imgcolor Image color filter
|
|
2179
|
+
# @option opts [String] :imgtype Image type: face, photo, clipart
|
|
2180
|
+
# @option opts [String] :safe Safe search (default to 'off')
|
|
2181
|
+
# @option opts [Integer] :page Page number (default to 0)
|
|
2182
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2183
|
+
def google_search_google_images_with_http_info(q, opts = {})
|
|
2184
|
+
if @api_client.config.debugging
|
|
2185
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_google_images ...'
|
|
2186
|
+
end
|
|
2187
|
+
# verify the required parameter 'q' is set
|
|
2188
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2189
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_google_images"
|
|
2190
|
+
end
|
|
2191
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
|
|
2192
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GoogleApi.google_search_google_images, must be greater than or equal to 0.'
|
|
2193
|
+
end
|
|
2194
|
+
|
|
2195
|
+
# resource path
|
|
2196
|
+
local_var_path = '/v1/google/images/search'
|
|
2197
|
+
|
|
2198
|
+
# query parameters
|
|
2199
|
+
query_params = opts[:query_params] || {}
|
|
2200
|
+
query_params[:'q'] = q
|
|
2201
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2202
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
2203
|
+
query_params[:'tbs'] = opts[:'tbs'] if !opts[:'tbs'].nil?
|
|
2204
|
+
query_params[:'imgsz'] = opts[:'imgsz'] if !opts[:'imgsz'].nil?
|
|
2205
|
+
query_params[:'imgcolor'] = opts[:'imgcolor'] if !opts[:'imgcolor'].nil?
|
|
2206
|
+
query_params[:'imgtype'] = opts[:'imgtype'] if !opts[:'imgtype'].nil?
|
|
2207
|
+
query_params[:'safe'] = opts[:'safe'] if !opts[:'safe'].nil?
|
|
2208
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2209
|
+
|
|
2210
|
+
# header parameters
|
|
2211
|
+
header_params = opts[:header_params] || {}
|
|
2212
|
+
# HTTP header 'Accept' (if needed)
|
|
2213
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2214
|
+
|
|
2215
|
+
# form parameters
|
|
2216
|
+
form_params = opts[:form_params] || {}
|
|
2217
|
+
|
|
2218
|
+
# http body (model)
|
|
2219
|
+
post_body = opts[:debug_body]
|
|
2220
|
+
|
|
2221
|
+
# return_type
|
|
2222
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2223
|
+
|
|
2224
|
+
# auth_names
|
|
2225
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2226
|
+
|
|
2227
|
+
new_options = opts.merge(
|
|
2228
|
+
:operation => :"GoogleApi.google_search_google_images",
|
|
2229
|
+
:header_params => header_params,
|
|
2230
|
+
:query_params => query_params,
|
|
2231
|
+
:form_params => form_params,
|
|
2232
|
+
:body => post_body,
|
|
2233
|
+
:auth_names => auth_names,
|
|
2234
|
+
:return_type => return_type
|
|
2235
|
+
)
|
|
2236
|
+
|
|
2237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2238
|
+
if @api_client.config.debugging
|
|
2239
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_google_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2240
|
+
end
|
|
2241
|
+
return data, status_code, headers
|
|
2242
|
+
end
|
|
2243
|
+
|
|
2244
|
+
# Search Google Jobs
|
|
2245
|
+
# @param q [String] Job title, keywords
|
|
2246
|
+
# @param [Hash] opts the optional parameters
|
|
2247
|
+
# @option opts [String] :location
|
|
2248
|
+
# @option opts [String] :gl (default to 'us')
|
|
2249
|
+
# @option opts [String] :job_type
|
|
2250
|
+
# @option opts [String] :date_posted
|
|
2251
|
+
# @return [Object]
|
|
2252
|
+
def google_search_google_jobs(q, opts = {})
|
|
2253
|
+
data, _status_code, _headers = google_search_google_jobs_with_http_info(q, opts)
|
|
2254
|
+
data
|
|
2255
|
+
end
|
|
2256
|
+
|
|
2257
|
+
# Search Google Jobs
|
|
2258
|
+
# @param q [String] Job title, keywords
|
|
2259
|
+
# @param [Hash] opts the optional parameters
|
|
2260
|
+
# @option opts [String] :location
|
|
2261
|
+
# @option opts [String] :gl (default to 'us')
|
|
2262
|
+
# @option opts [String] :job_type
|
|
2263
|
+
# @option opts [String] :date_posted
|
|
2264
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2265
|
+
def google_search_google_jobs_with_http_info(q, opts = {})
|
|
2266
|
+
if @api_client.config.debugging
|
|
2267
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_google_jobs ...'
|
|
2268
|
+
end
|
|
2269
|
+
# verify the required parameter 'q' is set
|
|
2270
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2271
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_google_jobs"
|
|
2272
|
+
end
|
|
2273
|
+
# resource path
|
|
2274
|
+
local_var_path = '/v1/google/jobs/search'
|
|
2275
|
+
|
|
2276
|
+
# query parameters
|
|
2277
|
+
query_params = opts[:query_params] || {}
|
|
2278
|
+
query_params[:'q'] = q
|
|
2279
|
+
query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
|
|
2280
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2281
|
+
query_params[:'job_type'] = opts[:'job_type'] if !opts[:'job_type'].nil?
|
|
2282
|
+
query_params[:'date_posted'] = opts[:'date_posted'] if !opts[:'date_posted'].nil?
|
|
2283
|
+
|
|
2284
|
+
# header parameters
|
|
2285
|
+
header_params = opts[:header_params] || {}
|
|
2286
|
+
# HTTP header 'Accept' (if needed)
|
|
2287
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2288
|
+
|
|
2289
|
+
# form parameters
|
|
2290
|
+
form_params = opts[:form_params] || {}
|
|
2291
|
+
|
|
2292
|
+
# http body (model)
|
|
2293
|
+
post_body = opts[:debug_body]
|
|
2294
|
+
|
|
2295
|
+
# return_type
|
|
2296
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2297
|
+
|
|
2298
|
+
# auth_names
|
|
2299
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2300
|
+
|
|
2301
|
+
new_options = opts.merge(
|
|
2302
|
+
:operation => :"GoogleApi.google_search_google_jobs",
|
|
2303
|
+
:header_params => header_params,
|
|
2304
|
+
:query_params => query_params,
|
|
2305
|
+
:form_params => form_params,
|
|
2306
|
+
:body => post_body,
|
|
2307
|
+
:auth_names => auth_names,
|
|
2308
|
+
:return_type => return_type
|
|
2309
|
+
)
|
|
2310
|
+
|
|
2311
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2312
|
+
if @api_client.config.debugging
|
|
2313
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_google_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2314
|
+
end
|
|
2315
|
+
return data, status_code, headers
|
|
2316
|
+
end
|
|
2317
|
+
|
|
2318
|
+
# Search Google Maps places
|
|
2319
|
+
# @param q [String] Search query
|
|
2320
|
+
# @param [Hash] opts the optional parameters
|
|
2321
|
+
# @option opts [String] :ll
|
|
2322
|
+
# @option opts [String] :gl (default to 'us')
|
|
2323
|
+
# @option opts [String] :hl (default to 'en')
|
|
2324
|
+
# @option opts [Integer] :start (default to 0)
|
|
2325
|
+
# @return [Object]
|
|
2326
|
+
def google_search_google_maps_places(q, opts = {})
|
|
2327
|
+
data, _status_code, _headers = google_search_google_maps_places_with_http_info(q, opts)
|
|
2328
|
+
data
|
|
2329
|
+
end
|
|
2330
|
+
|
|
2331
|
+
# Search Google Maps places
|
|
2332
|
+
# @param q [String] Search query
|
|
2333
|
+
# @param [Hash] opts the optional parameters
|
|
2334
|
+
# @option opts [String] :ll
|
|
2335
|
+
# @option opts [String] :gl (default to 'us')
|
|
2336
|
+
# @option opts [String] :hl (default to 'en')
|
|
2337
|
+
# @option opts [Integer] :start (default to 0)
|
|
2338
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2339
|
+
def google_search_google_maps_places_with_http_info(q, opts = {})
|
|
2340
|
+
if @api_client.config.debugging
|
|
2341
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_google_maps_places ...'
|
|
2342
|
+
end
|
|
2343
|
+
# verify the required parameter 'q' is set
|
|
2344
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2345
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_google_maps_places"
|
|
2346
|
+
end
|
|
2347
|
+
if @api_client.config.client_side_validation && !opts[:'start'].nil? && opts[:'start'] < 0
|
|
2348
|
+
fail ArgumentError, 'invalid value for "opts[:"start"]" when calling GoogleApi.google_search_google_maps_places, must be greater than or equal to 0.'
|
|
2349
|
+
end
|
|
2350
|
+
|
|
2351
|
+
# resource path
|
|
2352
|
+
local_var_path = '/v1/google/maps/search'
|
|
2353
|
+
|
|
2354
|
+
# query parameters
|
|
2355
|
+
query_params = opts[:query_params] || {}
|
|
2356
|
+
query_params[:'q'] = q
|
|
2357
|
+
query_params[:'ll'] = opts[:'ll'] if !opts[:'ll'].nil?
|
|
2358
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2359
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
2360
|
+
query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
|
|
2361
|
+
|
|
2362
|
+
# header parameters
|
|
2363
|
+
header_params = opts[:header_params] || {}
|
|
2364
|
+
# HTTP header 'Accept' (if needed)
|
|
2365
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2366
|
+
|
|
2367
|
+
# form parameters
|
|
2368
|
+
form_params = opts[:form_params] || {}
|
|
2369
|
+
|
|
2370
|
+
# http body (model)
|
|
2371
|
+
post_body = opts[:debug_body]
|
|
2372
|
+
|
|
2373
|
+
# return_type
|
|
2374
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2375
|
+
|
|
2376
|
+
# auth_names
|
|
2377
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2378
|
+
|
|
2379
|
+
new_options = opts.merge(
|
|
2380
|
+
:operation => :"GoogleApi.google_search_google_maps_places",
|
|
2381
|
+
:header_params => header_params,
|
|
2382
|
+
:query_params => query_params,
|
|
2383
|
+
:form_params => form_params,
|
|
2384
|
+
:body => post_body,
|
|
2385
|
+
:auth_names => auth_names,
|
|
2386
|
+
:return_type => return_type
|
|
2387
|
+
)
|
|
2388
|
+
|
|
2389
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2390
|
+
if @api_client.config.debugging
|
|
2391
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_google_maps_places\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2392
|
+
end
|
|
2393
|
+
return data, status_code, headers
|
|
2394
|
+
end
|
|
2395
|
+
|
|
2396
|
+
# Search Google News
|
|
2397
|
+
# @param q [String] Search query
|
|
2398
|
+
# @param [Hash] opts the optional parameters
|
|
2399
|
+
# @option opts [String] :hl (default to 'en')
|
|
2400
|
+
# @option opts [String] :gl (default to 'US')
|
|
2401
|
+
# @option opts [Integer] :max_results (default to 10)
|
|
2402
|
+
# @return [Object]
|
|
2403
|
+
def google_search_google_news(q, opts = {})
|
|
2404
|
+
data, _status_code, _headers = google_search_google_news_with_http_info(q, opts)
|
|
2405
|
+
data
|
|
2406
|
+
end
|
|
2407
|
+
|
|
2408
|
+
# Search Google News
|
|
2409
|
+
# @param q [String] Search query
|
|
2410
|
+
# @param [Hash] opts the optional parameters
|
|
2411
|
+
# @option opts [String] :hl (default to 'en')
|
|
2412
|
+
# @option opts [String] :gl (default to 'US')
|
|
2413
|
+
# @option opts [Integer] :max_results (default to 10)
|
|
2414
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2415
|
+
def google_search_google_news_with_http_info(q, opts = {})
|
|
2416
|
+
if @api_client.config.debugging
|
|
2417
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_google_news ...'
|
|
2418
|
+
end
|
|
2419
|
+
# verify the required parameter 'q' is set
|
|
2420
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2421
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_google_news"
|
|
2422
|
+
end
|
|
2423
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] > 100
|
|
2424
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling GoogleApi.google_search_google_news, must be smaller than or equal to 100.'
|
|
2425
|
+
end
|
|
2426
|
+
|
|
2427
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] < 1
|
|
2428
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling GoogleApi.google_search_google_news, must be greater than or equal to 1.'
|
|
2429
|
+
end
|
|
2430
|
+
|
|
2431
|
+
# resource path
|
|
2432
|
+
local_var_path = '/v1/google/news/search'
|
|
2433
|
+
|
|
2434
|
+
# query parameters
|
|
2435
|
+
query_params = opts[:query_params] || {}
|
|
2436
|
+
query_params[:'q'] = q
|
|
2437
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
2438
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2439
|
+
query_params[:'max_results'] = opts[:'max_results'] if !opts[:'max_results'].nil?
|
|
2440
|
+
|
|
2441
|
+
# header parameters
|
|
2442
|
+
header_params = opts[:header_params] || {}
|
|
2443
|
+
# HTTP header 'Accept' (if needed)
|
|
2444
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2445
|
+
|
|
2446
|
+
# form parameters
|
|
2447
|
+
form_params = opts[:form_params] || {}
|
|
2448
|
+
|
|
2449
|
+
# http body (model)
|
|
2450
|
+
post_body = opts[:debug_body]
|
|
2451
|
+
|
|
2452
|
+
# return_type
|
|
2453
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2454
|
+
|
|
2455
|
+
# auth_names
|
|
2456
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2457
|
+
|
|
2458
|
+
new_options = opts.merge(
|
|
2459
|
+
:operation => :"GoogleApi.google_search_google_news",
|
|
2460
|
+
:header_params => header_params,
|
|
2461
|
+
:query_params => query_params,
|
|
2462
|
+
:form_params => form_params,
|
|
2463
|
+
:body => post_body,
|
|
2464
|
+
:auth_names => auth_names,
|
|
2465
|
+
:return_type => return_type
|
|
2466
|
+
)
|
|
2467
|
+
|
|
2468
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2469
|
+
if @api_client.config.debugging
|
|
2470
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_google_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2471
|
+
end
|
|
2472
|
+
return data, status_code, headers
|
|
2473
|
+
end
|
|
2474
|
+
|
|
2475
|
+
# Search Google Scholar
|
|
2476
|
+
# Search Google Scholar for scholarly articles. Each result ships with its doc ``id``, ``type`` badge ([BOOK]/[PDF]/...), wrapped ``inline_links`` (versions + cited_by + related), PDF ``resources`` list, and structured ``authors`` (with ``author_id`` for profiled authors — pipe straight into ``/scholar/author``). Envelope carries ``scholar_results`` alias (Scrapingdog parity), ``related_searches``, and matched ``profiles`` cards.
|
|
2477
|
+
# @param q [String] Search query for scholarly articles
|
|
2478
|
+
# @param [Hash] opts the optional parameters
|
|
2479
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2480
|
+
# @option opts [Integer] :as_ylo Year from (e.g. 2020)
|
|
2481
|
+
# @option opts [Integer] :as_yhi Year to (e.g. 2024)
|
|
2482
|
+
# @option opts [String] :as_sdt Search type: 0=exclude patents, 7=include (default to '0')
|
|
2483
|
+
# @option opts [Integer] :page Page number (0-based) (default to 0)
|
|
2484
|
+
# @option opts [Integer] :num Results per page (max 20) (default to 10)
|
|
2485
|
+
# @return [Object]
|
|
2486
|
+
def google_search_google_scholar(q, opts = {})
|
|
2487
|
+
data, _status_code, _headers = google_search_google_scholar_with_http_info(q, opts)
|
|
2488
|
+
data
|
|
2489
|
+
end
|
|
2490
|
+
|
|
2491
|
+
# Search Google Scholar
|
|
2492
|
+
# Search Google Scholar for scholarly articles. Each result ships with its doc ``id``, ``type`` badge ([BOOK]/[PDF]/...), wrapped ``inline_links`` (versions + cited_by + related), PDF ``resources`` list, and structured ``authors`` (with ``author_id`` for profiled authors — pipe straight into ``/scholar/author``). Envelope carries ``scholar_results`` alias (Scrapingdog parity), ``related_searches``, and matched ``profiles`` cards.
|
|
2493
|
+
# @param q [String] Search query for scholarly articles
|
|
2494
|
+
# @param [Hash] opts the optional parameters
|
|
2495
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2496
|
+
# @option opts [Integer] :as_ylo Year from (e.g. 2020)
|
|
2497
|
+
# @option opts [Integer] :as_yhi Year to (e.g. 2024)
|
|
2498
|
+
# @option opts [String] :as_sdt Search type: 0=exclude patents, 7=include (default to '0')
|
|
2499
|
+
# @option opts [Integer] :page Page number (0-based) (default to 0)
|
|
2500
|
+
# @option opts [Integer] :num Results per page (max 20) (default to 10)
|
|
2501
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2502
|
+
def google_search_google_scholar_with_http_info(q, opts = {})
|
|
2503
|
+
if @api_client.config.debugging
|
|
2504
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_google_scholar ...'
|
|
2505
|
+
end
|
|
2506
|
+
# verify the required parameter 'q' is set
|
|
2507
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2508
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_google_scholar"
|
|
2509
|
+
end
|
|
2510
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
|
|
2511
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GoogleApi.google_search_google_scholar, must be greater than or equal to 0.'
|
|
2512
|
+
end
|
|
2513
|
+
|
|
2514
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] > 20
|
|
2515
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_search_google_scholar, must be smaller than or equal to 20.'
|
|
2516
|
+
end
|
|
2517
|
+
|
|
2518
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] < 1
|
|
2519
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_search_google_scholar, must be greater than or equal to 1.'
|
|
2520
|
+
end
|
|
2521
|
+
|
|
2522
|
+
# resource path
|
|
2523
|
+
local_var_path = '/v1/google/scholar/search'
|
|
2524
|
+
|
|
2525
|
+
# query parameters
|
|
2526
|
+
query_params = opts[:query_params] || {}
|
|
2527
|
+
query_params[:'q'] = q
|
|
2528
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
2529
|
+
query_params[:'as_ylo'] = opts[:'as_ylo'] if !opts[:'as_ylo'].nil?
|
|
2530
|
+
query_params[:'as_yhi'] = opts[:'as_yhi'] if !opts[:'as_yhi'].nil?
|
|
2531
|
+
query_params[:'as_sdt'] = opts[:'as_sdt'] if !opts[:'as_sdt'].nil?
|
|
2532
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2533
|
+
query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
|
|
2534
|
+
|
|
2535
|
+
# header parameters
|
|
2536
|
+
header_params = opts[:header_params] || {}
|
|
2537
|
+
# HTTP header 'Accept' (if needed)
|
|
2538
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2539
|
+
|
|
2540
|
+
# form parameters
|
|
2541
|
+
form_params = opts[:form_params] || {}
|
|
2542
|
+
|
|
2543
|
+
# http body (model)
|
|
2544
|
+
post_body = opts[:debug_body]
|
|
2545
|
+
|
|
2546
|
+
# return_type
|
|
2547
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2548
|
+
|
|
2549
|
+
# auth_names
|
|
2550
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2551
|
+
|
|
2552
|
+
new_options = opts.merge(
|
|
2553
|
+
:operation => :"GoogleApi.google_search_google_scholar",
|
|
2554
|
+
:header_params => header_params,
|
|
2555
|
+
:query_params => query_params,
|
|
2556
|
+
:form_params => form_params,
|
|
2557
|
+
:body => post_body,
|
|
2558
|
+
:auth_names => auth_names,
|
|
2559
|
+
:return_type => return_type
|
|
2560
|
+
)
|
|
2561
|
+
|
|
2562
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2563
|
+
if @api_client.config.debugging
|
|
2564
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_google_scholar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2565
|
+
end
|
|
2566
|
+
return data, status_code, headers
|
|
2567
|
+
end
|
|
2568
|
+
|
|
2569
|
+
# Search Google Videos
|
|
2570
|
+
# Search Google for video results.
|
|
2571
|
+
# @param q [String] Video search query
|
|
2572
|
+
# @param [Hash] opts the optional parameters
|
|
2573
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
2574
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2575
|
+
# @option opts [String] :tbs Time filter (e.g. qdr:d)
|
|
2576
|
+
# @option opts [String] :safe Safe search (default to 'off')
|
|
2577
|
+
# @option opts [Integer] :page Page number (default to 0)
|
|
2578
|
+
# @return [Object]
|
|
2579
|
+
def google_search_google_videos(q, opts = {})
|
|
2580
|
+
data, _status_code, _headers = google_search_google_videos_with_http_info(q, opts)
|
|
2581
|
+
data
|
|
2582
|
+
end
|
|
2583
|
+
|
|
2584
|
+
# Search Google Videos
|
|
2585
|
+
# Search Google for video results.
|
|
2586
|
+
# @param q [String] Video search query
|
|
2587
|
+
# @param [Hash] opts the optional parameters
|
|
2588
|
+
# @option opts [String] :gl Country code (default to 'us')
|
|
2589
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2590
|
+
# @option opts [String] :tbs Time filter (e.g. qdr:d)
|
|
2591
|
+
# @option opts [String] :safe Safe search (default to 'off')
|
|
2592
|
+
# @option opts [Integer] :page Page number (default to 0)
|
|
2593
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2594
|
+
def google_search_google_videos_with_http_info(q, opts = {})
|
|
2595
|
+
if @api_client.config.debugging
|
|
2596
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_google_videos ...'
|
|
2597
|
+
end
|
|
2598
|
+
# verify the required parameter 'q' is set
|
|
2599
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2600
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_google_videos"
|
|
2601
|
+
end
|
|
2602
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
|
|
2603
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GoogleApi.google_search_google_videos, must be greater than or equal to 0.'
|
|
2604
|
+
end
|
|
2605
|
+
|
|
2606
|
+
# resource path
|
|
2607
|
+
local_var_path = '/v1/google/videos/search'
|
|
2608
|
+
|
|
2609
|
+
# query parameters
|
|
2610
|
+
query_params = opts[:query_params] || {}
|
|
2611
|
+
query_params[:'q'] = q
|
|
2612
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2613
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
2614
|
+
query_params[:'tbs'] = opts[:'tbs'] if !opts[:'tbs'].nil?
|
|
2615
|
+
query_params[:'safe'] = opts[:'safe'] if !opts[:'safe'].nil?
|
|
2616
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2617
|
+
|
|
2618
|
+
# header parameters
|
|
2619
|
+
header_params = opts[:header_params] || {}
|
|
2620
|
+
# HTTP header 'Accept' (if needed)
|
|
2621
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2622
|
+
|
|
2623
|
+
# form parameters
|
|
2624
|
+
form_params = opts[:form_params] || {}
|
|
2625
|
+
|
|
2626
|
+
# http body (model)
|
|
2627
|
+
post_body = opts[:debug_body]
|
|
2628
|
+
|
|
2629
|
+
# return_type
|
|
2630
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2631
|
+
|
|
2632
|
+
# auth_names
|
|
2633
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2634
|
+
|
|
2635
|
+
new_options = opts.merge(
|
|
2636
|
+
:operation => :"GoogleApi.google_search_google_videos",
|
|
2637
|
+
:header_params => header_params,
|
|
2638
|
+
:query_params => query_params,
|
|
2639
|
+
:form_params => form_params,
|
|
2640
|
+
:body => post_body,
|
|
2641
|
+
:auth_names => auth_names,
|
|
2642
|
+
:return_type => return_type
|
|
2643
|
+
)
|
|
2644
|
+
|
|
2645
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2646
|
+
if @api_client.config.debugging
|
|
2647
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_google_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2648
|
+
end
|
|
2649
|
+
return data, status_code, headers
|
|
2650
|
+
end
|
|
2651
|
+
|
|
2652
|
+
# Search hotels
|
|
2653
|
+
# @param q [String] Location or hotel name
|
|
2654
|
+
# @param check_in [String] YYYY-MM-DD
|
|
2655
|
+
# @param check_out [String] YYYY-MM-DD
|
|
2656
|
+
# @param [Hash] opts the optional parameters
|
|
2657
|
+
# @option opts [Integer] :adults (default to 2)
|
|
2658
|
+
# @option opts [String] :currency (default to 'USD')
|
|
2659
|
+
# @option opts [String] :gl (default to 'us')
|
|
2660
|
+
# @return [Object]
|
|
2661
|
+
def google_search_hotels(q, check_in, check_out, opts = {})
|
|
2662
|
+
data, _status_code, _headers = google_search_hotels_with_http_info(q, check_in, check_out, opts)
|
|
2663
|
+
data
|
|
2664
|
+
end
|
|
2665
|
+
|
|
2666
|
+
# Search hotels
|
|
2667
|
+
# @param q [String] Location or hotel name
|
|
2668
|
+
# @param check_in [String] YYYY-MM-DD
|
|
2669
|
+
# @param check_out [String] YYYY-MM-DD
|
|
2670
|
+
# @param [Hash] opts the optional parameters
|
|
2671
|
+
# @option opts [Integer] :adults (default to 2)
|
|
2672
|
+
# @option opts [String] :currency (default to 'USD')
|
|
2673
|
+
# @option opts [String] :gl (default to 'us')
|
|
2674
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2675
|
+
def google_search_hotels_with_http_info(q, check_in, check_out, opts = {})
|
|
2676
|
+
if @api_client.config.debugging
|
|
2677
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_hotels ...'
|
|
2678
|
+
end
|
|
2679
|
+
# verify the required parameter 'q' is set
|
|
2680
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2681
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_hotels"
|
|
2682
|
+
end
|
|
2683
|
+
# verify the required parameter 'check_in' is set
|
|
2684
|
+
if @api_client.config.client_side_validation && check_in.nil?
|
|
2685
|
+
fail ArgumentError, "Missing the required parameter 'check_in' when calling GoogleApi.google_search_hotels"
|
|
2686
|
+
end
|
|
2687
|
+
# verify the required parameter 'check_out' is set
|
|
2688
|
+
if @api_client.config.client_side_validation && check_out.nil?
|
|
2689
|
+
fail ArgumentError, "Missing the required parameter 'check_out' when calling GoogleApi.google_search_hotels"
|
|
2690
|
+
end
|
|
2691
|
+
# resource path
|
|
2692
|
+
local_var_path = '/v1/google/hotels/search'
|
|
2693
|
+
|
|
2694
|
+
# query parameters
|
|
2695
|
+
query_params = opts[:query_params] || {}
|
|
2696
|
+
query_params[:'q'] = q
|
|
2697
|
+
query_params[:'check_in'] = check_in
|
|
2698
|
+
query_params[:'check_out'] = check_out
|
|
2699
|
+
query_params[:'adults'] = opts[:'adults'] if !opts[:'adults'].nil?
|
|
2700
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
|
2701
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2702
|
+
|
|
2703
|
+
# header parameters
|
|
2704
|
+
header_params = opts[:header_params] || {}
|
|
2705
|
+
# HTTP header 'Accept' (if needed)
|
|
2706
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2707
|
+
|
|
2708
|
+
# form parameters
|
|
2709
|
+
form_params = opts[:form_params] || {}
|
|
2710
|
+
|
|
2711
|
+
# http body (model)
|
|
2712
|
+
post_body = opts[:debug_body]
|
|
2713
|
+
|
|
2714
|
+
# return_type
|
|
2715
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2716
|
+
|
|
2717
|
+
# auth_names
|
|
2718
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2719
|
+
|
|
2720
|
+
new_options = opts.merge(
|
|
2721
|
+
:operation => :"GoogleApi.google_search_hotels",
|
|
2722
|
+
:header_params => header_params,
|
|
2723
|
+
:query_params => query_params,
|
|
2724
|
+
:form_params => form_params,
|
|
2725
|
+
:body => post_body,
|
|
2726
|
+
:auth_names => auth_names,
|
|
2727
|
+
:return_type => return_type
|
|
2728
|
+
)
|
|
2729
|
+
|
|
2730
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2731
|
+
if @api_client.config.debugging
|
|
2732
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_hotels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2733
|
+
end
|
|
2734
|
+
return data, status_code, headers
|
|
2735
|
+
end
|
|
2736
|
+
|
|
2737
|
+
# Search patents
|
|
2738
|
+
# @param q [String] Search query (Boolean logic supported)
|
|
2739
|
+
# @param [Hash] opts the optional parameters
|
|
2740
|
+
# @option opts [Integer] :page (default to 0)
|
|
2741
|
+
# @option opts [Integer] :num (default to 10)
|
|
2742
|
+
# @option opts [String] :sort 'new' or 'old'
|
|
2743
|
+
# @option opts [String] :inventor Inventor name(s)
|
|
2744
|
+
# @option opts [String] :assignee Assignee / company name(s)
|
|
2745
|
+
# @option opts [String] :country Country code (US, EP, WO, …)
|
|
2746
|
+
# @option opts [String] :language Patent language: ENGLISH, GERMAN, CHINESE, FRENCH, JAPANESE, KOREAN, SPANISH
|
|
2747
|
+
# @option opts [String] :status GRANT or APPLICATION
|
|
2748
|
+
# @option opts [String] :patent_type PATENT or DESIGN
|
|
2749
|
+
# @option opts [String] :before Before date YYYYMMDD
|
|
2750
|
+
# @option opts [String] :after After date YYYYMMDD
|
|
2751
|
+
# @return [Object]
|
|
2752
|
+
def google_search_patents(q, opts = {})
|
|
2753
|
+
data, _status_code, _headers = google_search_patents_with_http_info(q, opts)
|
|
2754
|
+
data
|
|
2755
|
+
end
|
|
2756
|
+
|
|
2757
|
+
# Search patents
|
|
2758
|
+
# @param q [String] Search query (Boolean logic supported)
|
|
2759
|
+
# @param [Hash] opts the optional parameters
|
|
2760
|
+
# @option opts [Integer] :page (default to 0)
|
|
2761
|
+
# @option opts [Integer] :num (default to 10)
|
|
2762
|
+
# @option opts [String] :sort 'new' or 'old'
|
|
2763
|
+
# @option opts [String] :inventor Inventor name(s)
|
|
2764
|
+
# @option opts [String] :assignee Assignee / company name(s)
|
|
2765
|
+
# @option opts [String] :country Country code (US, EP, WO, …)
|
|
2766
|
+
# @option opts [String] :language Patent language: ENGLISH, GERMAN, CHINESE, FRENCH, JAPANESE, KOREAN, SPANISH
|
|
2767
|
+
# @option opts [String] :status GRANT or APPLICATION
|
|
2768
|
+
# @option opts [String] :patent_type PATENT or DESIGN
|
|
2769
|
+
# @option opts [String] :before Before date YYYYMMDD
|
|
2770
|
+
# @option opts [String] :after After date YYYYMMDD
|
|
2771
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2772
|
+
def google_search_patents_with_http_info(q, opts = {})
|
|
2773
|
+
if @api_client.config.debugging
|
|
2774
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_patents ...'
|
|
2775
|
+
end
|
|
2776
|
+
# verify the required parameter 'q' is set
|
|
2777
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2778
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_patents"
|
|
2779
|
+
end
|
|
2780
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
|
|
2781
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GoogleApi.google_search_patents, must be greater than or equal to 0.'
|
|
2782
|
+
end
|
|
2783
|
+
|
|
2784
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] > 100
|
|
2785
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_search_patents, must be smaller than or equal to 100.'
|
|
2786
|
+
end
|
|
2787
|
+
|
|
2788
|
+
if @api_client.config.client_side_validation && !opts[:'num'].nil? && opts[:'num'] < 1
|
|
2789
|
+
fail ArgumentError, 'invalid value for "opts[:"num"]" when calling GoogleApi.google_search_patents, must be greater than or equal to 1.'
|
|
2790
|
+
end
|
|
2791
|
+
|
|
2792
|
+
# resource path
|
|
2793
|
+
local_var_path = '/v1/google/patents/search'
|
|
2794
|
+
|
|
2795
|
+
# query parameters
|
|
2796
|
+
query_params = opts[:query_params] || {}
|
|
2797
|
+
query_params[:'q'] = q
|
|
2798
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2799
|
+
query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
|
|
2800
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
2801
|
+
query_params[:'inventor'] = opts[:'inventor'] if !opts[:'inventor'].nil?
|
|
2802
|
+
query_params[:'assignee'] = opts[:'assignee'] if !opts[:'assignee'].nil?
|
|
2803
|
+
query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
|
|
2804
|
+
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
|
2805
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
2806
|
+
query_params[:'patent_type'] = opts[:'patent_type'] if !opts[:'patent_type'].nil?
|
|
2807
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
2808
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
2809
|
+
|
|
2810
|
+
# header parameters
|
|
2811
|
+
header_params = opts[:header_params] || {}
|
|
2812
|
+
# HTTP header 'Accept' (if needed)
|
|
2813
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2814
|
+
|
|
2815
|
+
# form parameters
|
|
2816
|
+
form_params = opts[:form_params] || {}
|
|
2817
|
+
|
|
2818
|
+
# http body (model)
|
|
2819
|
+
post_body = opts[:debug_body]
|
|
2820
|
+
|
|
2821
|
+
# return_type
|
|
2822
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2823
|
+
|
|
2824
|
+
# auth_names
|
|
2825
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2826
|
+
|
|
2827
|
+
new_options = opts.merge(
|
|
2828
|
+
:operation => :"GoogleApi.google_search_patents",
|
|
2829
|
+
:header_params => header_params,
|
|
2830
|
+
:query_params => query_params,
|
|
2831
|
+
:form_params => form_params,
|
|
2832
|
+
:body => post_body,
|
|
2833
|
+
:auth_names => auth_names,
|
|
2834
|
+
:return_type => return_type
|
|
2835
|
+
)
|
|
2836
|
+
|
|
2837
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2838
|
+
if @api_client.config.debugging
|
|
2839
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_patents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2840
|
+
end
|
|
2841
|
+
return data, status_code, headers
|
|
2842
|
+
end
|
|
2843
|
+
|
|
2844
|
+
# Search products
|
|
2845
|
+
# @param q [String] Product search query
|
|
2846
|
+
# @param [Hash] opts the optional parameters
|
|
2847
|
+
# @option opts [String] :gl (default to 'us')
|
|
2848
|
+
# @option opts [Integer] :min_price
|
|
2849
|
+
# @option opts [Integer] :max_price
|
|
2850
|
+
# @option opts [String] :sort_by
|
|
2851
|
+
# @return [Object]
|
|
2852
|
+
def google_search_products(q, opts = {})
|
|
2853
|
+
data, _status_code, _headers = google_search_products_with_http_info(q, opts)
|
|
2854
|
+
data
|
|
2855
|
+
end
|
|
2856
|
+
|
|
2857
|
+
# Search products
|
|
2858
|
+
# @param q [String] Product search query
|
|
2859
|
+
# @param [Hash] opts the optional parameters
|
|
2860
|
+
# @option opts [String] :gl (default to 'us')
|
|
2861
|
+
# @option opts [Integer] :min_price
|
|
2862
|
+
# @option opts [Integer] :max_price
|
|
2863
|
+
# @option opts [String] :sort_by
|
|
2864
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2865
|
+
def google_search_products_with_http_info(q, opts = {})
|
|
2866
|
+
if @api_client.config.debugging
|
|
2867
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_products ...'
|
|
2868
|
+
end
|
|
2869
|
+
# verify the required parameter 'q' is set
|
|
2870
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
2871
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_search_products"
|
|
2872
|
+
end
|
|
2873
|
+
# resource path
|
|
2874
|
+
local_var_path = '/v1/google/shopping/search'
|
|
2875
|
+
|
|
2876
|
+
# query parameters
|
|
2877
|
+
query_params = opts[:query_params] || {}
|
|
2878
|
+
query_params[:'q'] = q
|
|
2879
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
2880
|
+
query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
|
|
2881
|
+
query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
|
|
2882
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
2883
|
+
|
|
2884
|
+
# header parameters
|
|
2885
|
+
header_params = opts[:header_params] || {}
|
|
2886
|
+
# HTTP header 'Accept' (if needed)
|
|
2887
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2888
|
+
|
|
2889
|
+
# form parameters
|
|
2890
|
+
form_params = opts[:form_params] || {}
|
|
2891
|
+
|
|
2892
|
+
# http body (model)
|
|
2893
|
+
post_body = opts[:debug_body]
|
|
2894
|
+
|
|
2895
|
+
# return_type
|
|
2896
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2897
|
+
|
|
2898
|
+
# auth_names
|
|
2899
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2900
|
+
|
|
2901
|
+
new_options = opts.merge(
|
|
2902
|
+
:operation => :"GoogleApi.google_search_products",
|
|
2903
|
+
:header_params => header_params,
|
|
2904
|
+
:query_params => query_params,
|
|
2905
|
+
:form_params => form_params,
|
|
2906
|
+
:body => post_body,
|
|
2907
|
+
:auth_names => auth_names,
|
|
2908
|
+
:return_type => return_type
|
|
2909
|
+
)
|
|
2910
|
+
|
|
2911
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2912
|
+
if @api_client.config.debugging
|
|
2913
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2914
|
+
end
|
|
2915
|
+
return data, status_code, headers
|
|
2916
|
+
end
|
|
2917
|
+
|
|
2918
|
+
# Search Scholar author profiles
|
|
2919
|
+
# Search Google Scholar for author profiles by name.
|
|
2920
|
+
# @param mauthors [String] Author name query (e.g. 'Geoffrey Hinton')
|
|
2921
|
+
# @param [Hash] opts the optional parameters
|
|
2922
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2923
|
+
# @option opts [String] :after_author Pagination token (next page)
|
|
2924
|
+
# @option opts [String] :before_author Pagination token (previous page)
|
|
2925
|
+
# @return [Object]
|
|
2926
|
+
def google_search_scholar_author_profiles(mauthors, opts = {})
|
|
2927
|
+
data, _status_code, _headers = google_search_scholar_author_profiles_with_http_info(mauthors, opts)
|
|
2928
|
+
data
|
|
2929
|
+
end
|
|
2930
|
+
|
|
2931
|
+
# Search Scholar author profiles
|
|
2932
|
+
# Search Google Scholar for author profiles by name.
|
|
2933
|
+
# @param mauthors [String] Author name query (e.g. 'Geoffrey Hinton')
|
|
2934
|
+
# @param [Hash] opts the optional parameters
|
|
2935
|
+
# @option opts [String] :hl Language code (default to 'en')
|
|
2936
|
+
# @option opts [String] :after_author Pagination token (next page)
|
|
2937
|
+
# @option opts [String] :before_author Pagination token (previous page)
|
|
2938
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2939
|
+
def google_search_scholar_author_profiles_with_http_info(mauthors, opts = {})
|
|
2940
|
+
if @api_client.config.debugging
|
|
2941
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_search_scholar_author_profiles ...'
|
|
2942
|
+
end
|
|
2943
|
+
# verify the required parameter 'mauthors' is set
|
|
2944
|
+
if @api_client.config.client_side_validation && mauthors.nil?
|
|
2945
|
+
fail ArgumentError, "Missing the required parameter 'mauthors' when calling GoogleApi.google_search_scholar_author_profiles"
|
|
2946
|
+
end
|
|
2947
|
+
# resource path
|
|
2948
|
+
local_var_path = '/v1/google/scholar/profiles'
|
|
2949
|
+
|
|
2950
|
+
# query parameters
|
|
2951
|
+
query_params = opts[:query_params] || {}
|
|
2952
|
+
query_params[:'mauthors'] = mauthors
|
|
2953
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
2954
|
+
query_params[:'after_author'] = opts[:'after_author'] if !opts[:'after_author'].nil?
|
|
2955
|
+
query_params[:'before_author'] = opts[:'before_author'] if !opts[:'before_author'].nil?
|
|
2956
|
+
|
|
2957
|
+
# header parameters
|
|
2958
|
+
header_params = opts[:header_params] || {}
|
|
2959
|
+
# HTTP header 'Accept' (if needed)
|
|
2960
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2961
|
+
|
|
2962
|
+
# form parameters
|
|
2963
|
+
form_params = opts[:form_params] || {}
|
|
2964
|
+
|
|
2965
|
+
# http body (model)
|
|
2966
|
+
post_body = opts[:debug_body]
|
|
2967
|
+
|
|
2968
|
+
# return_type
|
|
2969
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2970
|
+
|
|
2971
|
+
# auth_names
|
|
2972
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
2973
|
+
|
|
2974
|
+
new_options = opts.merge(
|
|
2975
|
+
:operation => :"GoogleApi.google_search_scholar_author_profiles",
|
|
2976
|
+
:header_params => header_params,
|
|
2977
|
+
:query_params => query_params,
|
|
2978
|
+
:form_params => form_params,
|
|
2979
|
+
:body => post_body,
|
|
2980
|
+
:auth_names => auth_names,
|
|
2981
|
+
:return_type => return_type
|
|
2982
|
+
)
|
|
2983
|
+
|
|
2984
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2985
|
+
if @api_client.config.debugging
|
|
2986
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_search_scholar_author_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2987
|
+
end
|
|
2988
|
+
return data, status_code, headers
|
|
2989
|
+
end
|
|
2990
|
+
|
|
2991
|
+
# Trending news
|
|
2992
|
+
# @param [Hash] opts the optional parameters
|
|
2993
|
+
# @option opts [String] :hl (default to 'en')
|
|
2994
|
+
# @option opts [String] :gl (default to 'US')
|
|
2995
|
+
# @option opts [Integer] :max_results (default to 10)
|
|
2996
|
+
# @return [Object]
|
|
2997
|
+
def google_trending_news(opts = {})
|
|
2998
|
+
data, _status_code, _headers = google_trending_news_with_http_info(opts)
|
|
2999
|
+
data
|
|
3000
|
+
end
|
|
3001
|
+
|
|
3002
|
+
# Trending news
|
|
3003
|
+
# @param [Hash] opts the optional parameters
|
|
3004
|
+
# @option opts [String] :hl (default to 'en')
|
|
3005
|
+
# @option opts [String] :gl (default to 'US')
|
|
3006
|
+
# @option opts [Integer] :max_results (default to 10)
|
|
3007
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
3008
|
+
def google_trending_news_with_http_info(opts = {})
|
|
3009
|
+
if @api_client.config.debugging
|
|
3010
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_trending_news ...'
|
|
3011
|
+
end
|
|
3012
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] > 100
|
|
3013
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling GoogleApi.google_trending_news, must be smaller than or equal to 100.'
|
|
3014
|
+
end
|
|
3015
|
+
|
|
3016
|
+
if @api_client.config.client_side_validation && !opts[:'max_results'].nil? && opts[:'max_results'] < 1
|
|
3017
|
+
fail ArgumentError, 'invalid value for "opts[:"max_results"]" when calling GoogleApi.google_trending_news, must be greater than or equal to 1.'
|
|
3018
|
+
end
|
|
3019
|
+
|
|
3020
|
+
# resource path
|
|
3021
|
+
local_var_path = '/v1/google/news/trending'
|
|
3022
|
+
|
|
3023
|
+
# query parameters
|
|
3024
|
+
query_params = opts[:query_params] || {}
|
|
3025
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
3026
|
+
query_params[:'gl'] = opts[:'gl'] if !opts[:'gl'].nil?
|
|
3027
|
+
query_params[:'max_results'] = opts[:'max_results'] if !opts[:'max_results'].nil?
|
|
3028
|
+
|
|
3029
|
+
# header parameters
|
|
3030
|
+
header_params = opts[:header_params] || {}
|
|
3031
|
+
# HTTP header 'Accept' (if needed)
|
|
3032
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3033
|
+
|
|
3034
|
+
# form parameters
|
|
3035
|
+
form_params = opts[:form_params] || {}
|
|
3036
|
+
|
|
3037
|
+
# http body (model)
|
|
3038
|
+
post_body = opts[:debug_body]
|
|
3039
|
+
|
|
3040
|
+
# return_type
|
|
3041
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
3042
|
+
|
|
3043
|
+
# auth_names
|
|
3044
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
3045
|
+
|
|
3046
|
+
new_options = opts.merge(
|
|
3047
|
+
:operation => :"GoogleApi.google_trending_news",
|
|
3048
|
+
:header_params => header_params,
|
|
3049
|
+
:query_params => query_params,
|
|
3050
|
+
:form_params => form_params,
|
|
3051
|
+
:body => post_body,
|
|
3052
|
+
:auth_names => auth_names,
|
|
3053
|
+
:return_type => return_type
|
|
3054
|
+
)
|
|
3055
|
+
|
|
3056
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3057
|
+
if @api_client.config.debugging
|
|
3058
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_trending_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3059
|
+
end
|
|
3060
|
+
return data, status_code, headers
|
|
3061
|
+
end
|
|
3062
|
+
|
|
3063
|
+
# Trending searches
|
|
3064
|
+
# @param [Hash] opts the optional parameters
|
|
3065
|
+
# @option opts [String] :geo (default to 'US')
|
|
3066
|
+
# @return [Object]
|
|
3067
|
+
def google_trending_searches(opts = {})
|
|
3068
|
+
data, _status_code, _headers = google_trending_searches_with_http_info(opts)
|
|
3069
|
+
data
|
|
3070
|
+
end
|
|
3071
|
+
|
|
3072
|
+
# Trending searches
|
|
3073
|
+
# @param [Hash] opts the optional parameters
|
|
3074
|
+
# @option opts [String] :geo (default to 'US')
|
|
3075
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
3076
|
+
def google_trending_searches_with_http_info(opts = {})
|
|
3077
|
+
if @api_client.config.debugging
|
|
3078
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_trending_searches ...'
|
|
3079
|
+
end
|
|
3080
|
+
# resource path
|
|
3081
|
+
local_var_path = '/v1/google/trends/trending'
|
|
3082
|
+
|
|
3083
|
+
# query parameters
|
|
3084
|
+
query_params = opts[:query_params] || {}
|
|
3085
|
+
query_params[:'geo'] = opts[:'geo'] if !opts[:'geo'].nil?
|
|
3086
|
+
|
|
3087
|
+
# header parameters
|
|
3088
|
+
header_params = opts[:header_params] || {}
|
|
3089
|
+
# HTTP header 'Accept' (if needed)
|
|
3090
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3091
|
+
|
|
3092
|
+
# form parameters
|
|
3093
|
+
form_params = opts[:form_params] || {}
|
|
3094
|
+
|
|
3095
|
+
# http body (model)
|
|
3096
|
+
post_body = opts[:debug_body]
|
|
3097
|
+
|
|
3098
|
+
# return_type
|
|
3099
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
3100
|
+
|
|
3101
|
+
# auth_names
|
|
3102
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
3103
|
+
|
|
3104
|
+
new_options = opts.merge(
|
|
3105
|
+
:operation => :"GoogleApi.google_trending_searches",
|
|
3106
|
+
:header_params => header_params,
|
|
3107
|
+
:query_params => query_params,
|
|
3108
|
+
:form_params => form_params,
|
|
3109
|
+
:body => post_body,
|
|
3110
|
+
:auth_names => auth_names,
|
|
3111
|
+
:return_type => return_type
|
|
3112
|
+
)
|
|
3113
|
+
|
|
3114
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3115
|
+
if @api_client.config.debugging
|
|
3116
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_trending_searches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3117
|
+
end
|
|
3118
|
+
return data, status_code, headers
|
|
3119
|
+
end
|
|
3120
|
+
|
|
3121
|
+
# Trends topic autocomplete
|
|
3122
|
+
# Return categorized Knowledge Graph topic entities (mid, type) for a query.
|
|
3123
|
+
# @param q [String] Query prefix to resolve into Trends topics
|
|
3124
|
+
# @param [Hash] opts the optional parameters
|
|
3125
|
+
# @option opts [String] :hl Language code (default to 'en-US')
|
|
3126
|
+
# @option opts [String] :tz Timezone offset in minutes (default to '0')
|
|
3127
|
+
# @return [Object]
|
|
3128
|
+
def google_trends_topic_autocomplete(q, opts = {})
|
|
3129
|
+
data, _status_code, _headers = google_trends_topic_autocomplete_with_http_info(q, opts)
|
|
3130
|
+
data
|
|
3131
|
+
end
|
|
3132
|
+
|
|
3133
|
+
# Trends topic autocomplete
|
|
3134
|
+
# Return categorized Knowledge Graph topic entities (mid, type) for a query.
|
|
3135
|
+
# @param q [String] Query prefix to resolve into Trends topics
|
|
3136
|
+
# @param [Hash] opts the optional parameters
|
|
3137
|
+
# @option opts [String] :hl Language code (default to 'en-US')
|
|
3138
|
+
# @option opts [String] :tz Timezone offset in minutes (default to '0')
|
|
3139
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
3140
|
+
def google_trends_topic_autocomplete_with_http_info(q, opts = {})
|
|
3141
|
+
if @api_client.config.debugging
|
|
3142
|
+
@api_client.config.logger.debug 'Calling API: GoogleApi.google_trends_topic_autocomplete ...'
|
|
3143
|
+
end
|
|
3144
|
+
# verify the required parameter 'q' is set
|
|
3145
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
3146
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling GoogleApi.google_trends_topic_autocomplete"
|
|
3147
|
+
end
|
|
3148
|
+
# resource path
|
|
3149
|
+
local_var_path = '/v1/google/trends/autocomplete'
|
|
3150
|
+
|
|
3151
|
+
# query parameters
|
|
3152
|
+
query_params = opts[:query_params] || {}
|
|
3153
|
+
query_params[:'q'] = q
|
|
3154
|
+
query_params[:'hl'] = opts[:'hl'] if !opts[:'hl'].nil?
|
|
3155
|
+
query_params[:'tz'] = opts[:'tz'] if !opts[:'tz'].nil?
|
|
3156
|
+
|
|
3157
|
+
# header parameters
|
|
3158
|
+
header_params = opts[:header_params] || {}
|
|
3159
|
+
# HTTP header 'Accept' (if needed)
|
|
3160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3161
|
+
|
|
3162
|
+
# form parameters
|
|
3163
|
+
form_params = opts[:form_params] || {}
|
|
3164
|
+
|
|
3165
|
+
# http body (model)
|
|
3166
|
+
post_body = opts[:debug_body]
|
|
3167
|
+
|
|
3168
|
+
# return_type
|
|
3169
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
3170
|
+
|
|
3171
|
+
# auth_names
|
|
3172
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
3173
|
+
|
|
3174
|
+
new_options = opts.merge(
|
|
3175
|
+
:operation => :"GoogleApi.google_trends_topic_autocomplete",
|
|
3176
|
+
:header_params => header_params,
|
|
3177
|
+
:query_params => query_params,
|
|
3178
|
+
:form_params => form_params,
|
|
3179
|
+
:body => post_body,
|
|
3180
|
+
:auth_names => auth_names,
|
|
3181
|
+
:return_type => return_type
|
|
3182
|
+
)
|
|
3183
|
+
|
|
3184
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3185
|
+
if @api_client.config.debugging
|
|
3186
|
+
@api_client.config.logger.debug "API called: GoogleApi#google_trends_topic_autocomplete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3187
|
+
end
|
|
3188
|
+
return data, status_code, headers
|
|
3189
|
+
end
|
|
3190
|
+
end
|
|
3191
|
+
end
|