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,1165 @@
|
|
|
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 AmazonApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Amazon scraper health check
|
|
23
|
+
# Check health of the Amazon scraper service (accepts HEAD for UptimeRobot).
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [Object]
|
|
26
|
+
def amazon_amazon_scraper_health_check(opts = {})
|
|
27
|
+
data, _status_code, _headers = amazon_amazon_scraper_health_check_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Amazon scraper health check
|
|
32
|
+
# Check health of the Amazon scraper service (accepts HEAD for UptimeRobot).
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
35
|
+
def amazon_amazon_scraper_health_check_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_amazon_scraper_health_check ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/v1/amazon/health'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"AmazonApi.amazon_amazon_scraper_health_check",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_amazon_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Amazon scraper health check
|
|
80
|
+
# Check health of the Amazon scraper service (accepts HEAD for UptimeRobot).
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [Object]
|
|
83
|
+
def amazon_amazon_scraper_health_check_head(opts = {})
|
|
84
|
+
data, _status_code, _headers = amazon_amazon_scraper_health_check_head_with_http_info(opts)
|
|
85
|
+
data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Amazon scraper health check
|
|
89
|
+
# Check health of the Amazon scraper service (accepts HEAD for UptimeRobot).
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
92
|
+
def amazon_amazon_scraper_health_check_head_with_http_info(opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_amazon_scraper_health_check_head ...'
|
|
95
|
+
end
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/v1/amazon/health'
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
|
|
102
|
+
# header parameters
|
|
103
|
+
header_params = opts[:header_params] || {}
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:debug_body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:operation => :"AmazonApi.amazon_amazon_scraper_health_check_head",
|
|
121
|
+
:header_params => header_params,
|
|
122
|
+
:query_params => query_params,
|
|
123
|
+
:form_params => form_params,
|
|
124
|
+
:body => post_body,
|
|
125
|
+
:auth_names => auth_names,
|
|
126
|
+
:return_type => return_type
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
130
|
+
if @api_client.config.debugging
|
|
131
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_amazon_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Bestsellers by category
|
|
137
|
+
# Top-selling products for a category (browse node).
|
|
138
|
+
# @param [Hash] opts the optional parameters
|
|
139
|
+
# @option opts [String] :domain (default to 'com')
|
|
140
|
+
# @option opts [String] :category Bestsellers node id or slug
|
|
141
|
+
# @option opts [Integer] :page (default to 1)
|
|
142
|
+
# @return [Object]
|
|
143
|
+
def amazon_bestsellers_by_category(opts = {})
|
|
144
|
+
data, _status_code, _headers = amazon_bestsellers_by_category_with_http_info(opts)
|
|
145
|
+
data
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Bestsellers by category
|
|
149
|
+
# Top-selling products for a category (browse node).
|
|
150
|
+
# @param [Hash] opts the optional parameters
|
|
151
|
+
# @option opts [String] :domain (default to 'com')
|
|
152
|
+
# @option opts [String] :category Bestsellers node id or slug
|
|
153
|
+
# @option opts [Integer] :page (default to 1)
|
|
154
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
155
|
+
def amazon_bestsellers_by_category_with_http_info(opts = {})
|
|
156
|
+
if @api_client.config.debugging
|
|
157
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_bestsellers_by_category ...'
|
|
158
|
+
end
|
|
159
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 2
|
|
160
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_bestsellers_by_category, must be smaller than or equal to 2.'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
164
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_bestsellers_by_category, must be greater than or equal to 1.'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# resource path
|
|
168
|
+
local_var_path = '/v1/amazon/bestsellers'
|
|
169
|
+
|
|
170
|
+
# query parameters
|
|
171
|
+
query_params = opts[:query_params] || {}
|
|
172
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
173
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
|
174
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
175
|
+
|
|
176
|
+
# header parameters
|
|
177
|
+
header_params = opts[:header_params] || {}
|
|
178
|
+
# HTTP header 'Accept' (if needed)
|
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
180
|
+
|
|
181
|
+
# form parameters
|
|
182
|
+
form_params = opts[:form_params] || {}
|
|
183
|
+
|
|
184
|
+
# http body (model)
|
|
185
|
+
post_body = opts[:debug_body]
|
|
186
|
+
|
|
187
|
+
# return_type
|
|
188
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
189
|
+
|
|
190
|
+
# auth_names
|
|
191
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
192
|
+
|
|
193
|
+
new_options = opts.merge(
|
|
194
|
+
:operation => :"AmazonApi.amazon_bestsellers_by_category",
|
|
195
|
+
:header_params => header_params,
|
|
196
|
+
:query_params => query_params,
|
|
197
|
+
:form_params => form_params,
|
|
198
|
+
:body => post_body,
|
|
199
|
+
:auth_names => auth_names,
|
|
200
|
+
:return_type => return_type
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
204
|
+
if @api_client.config.debugging
|
|
205
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_bestsellers_by_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
206
|
+
end
|
|
207
|
+
return data, status_code, headers
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Browse-node category listing
|
|
211
|
+
# List products within an Amazon browse-node category.
|
|
212
|
+
# @param node [String] Amazon browse-node id
|
|
213
|
+
# @param [Hash] opts the optional parameters
|
|
214
|
+
# @option opts [String] :domain (default to 'com')
|
|
215
|
+
# @option opts [Integer] :page (default to 1)
|
|
216
|
+
# @option opts [String] :sort_by
|
|
217
|
+
# @return [Object]
|
|
218
|
+
def amazon_browse_node_category_listing(node, opts = {})
|
|
219
|
+
data, _status_code, _headers = amazon_browse_node_category_listing_with_http_info(node, opts)
|
|
220
|
+
data
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Browse-node category listing
|
|
224
|
+
# List products within an Amazon browse-node category.
|
|
225
|
+
# @param node [String] Amazon browse-node id
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @option opts [String] :domain (default to 'com')
|
|
228
|
+
# @option opts [Integer] :page (default to 1)
|
|
229
|
+
# @option opts [String] :sort_by
|
|
230
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
231
|
+
def amazon_browse_node_category_listing_with_http_info(node, opts = {})
|
|
232
|
+
if @api_client.config.debugging
|
|
233
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_browse_node_category_listing ...'
|
|
234
|
+
end
|
|
235
|
+
# verify the required parameter 'node' is set
|
|
236
|
+
if @api_client.config.client_side_validation && node.nil?
|
|
237
|
+
fail ArgumentError, "Missing the required parameter 'node' when calling AmazonApi.amazon_browse_node_category_listing"
|
|
238
|
+
end
|
|
239
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 20
|
|
240
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_browse_node_category_listing, must be smaller than or equal to 20.'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
244
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_browse_node_category_listing, must be greater than or equal to 1.'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# resource path
|
|
248
|
+
local_var_path = '/v1/amazon/category'
|
|
249
|
+
|
|
250
|
+
# query parameters
|
|
251
|
+
query_params = opts[:query_params] || {}
|
|
252
|
+
query_params[:'node'] = node
|
|
253
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
254
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
255
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
256
|
+
|
|
257
|
+
# header parameters
|
|
258
|
+
header_params = opts[:header_params] || {}
|
|
259
|
+
# HTTP header 'Accept' (if needed)
|
|
260
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
261
|
+
|
|
262
|
+
# form parameters
|
|
263
|
+
form_params = opts[:form_params] || {}
|
|
264
|
+
|
|
265
|
+
# http body (model)
|
|
266
|
+
post_body = opts[:debug_body]
|
|
267
|
+
|
|
268
|
+
# return_type
|
|
269
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
270
|
+
|
|
271
|
+
# auth_names
|
|
272
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
273
|
+
|
|
274
|
+
new_options = opts.merge(
|
|
275
|
+
:operation => :"AmazonApi.amazon_browse_node_category_listing",
|
|
276
|
+
:header_params => header_params,
|
|
277
|
+
:query_params => query_params,
|
|
278
|
+
:form_params => form_params,
|
|
279
|
+
:body => post_body,
|
|
280
|
+
:auth_names => auth_names,
|
|
281
|
+
:return_type => return_type
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_browse_node_category_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
287
|
+
end
|
|
288
|
+
return data, status_code, headers
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Get all seller offers (buybox)
|
|
292
|
+
# All third-party offers for an ASIN, including the Buy Box winner.
|
|
293
|
+
# @param asin [String]
|
|
294
|
+
# @param [Hash] opts the optional parameters
|
|
295
|
+
# @option opts [String] :domain (default to 'com')
|
|
296
|
+
# @option opts [String] :zip
|
|
297
|
+
# @return [Object]
|
|
298
|
+
def amazon_get_all_seller_offers_buybox(asin, opts = {})
|
|
299
|
+
data, _status_code, _headers = amazon_get_all_seller_offers_buybox_with_http_info(asin, opts)
|
|
300
|
+
data
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Get all seller offers (buybox)
|
|
304
|
+
# All third-party offers for an ASIN, including the Buy Box winner.
|
|
305
|
+
# @param asin [String]
|
|
306
|
+
# @param [Hash] opts the optional parameters
|
|
307
|
+
# @option opts [String] :domain (default to 'com')
|
|
308
|
+
# @option opts [String] :zip
|
|
309
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
310
|
+
def amazon_get_all_seller_offers_buybox_with_http_info(asin, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_get_all_seller_offers_buybox ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'asin' is set
|
|
315
|
+
if @api_client.config.client_side_validation && asin.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'asin' when calling AmazonApi.amazon_get_all_seller_offers_buybox"
|
|
317
|
+
end
|
|
318
|
+
# resource path
|
|
319
|
+
local_var_path = '/v1/amazon/products/{asin}/offers'.sub('{' + 'asin' + '}', CGI.escape(asin.to_s))
|
|
320
|
+
|
|
321
|
+
# query parameters
|
|
322
|
+
query_params = opts[:query_params] || {}
|
|
323
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
324
|
+
query_params[:'zip'] = opts[:'zip'] if !opts[:'zip'].nil?
|
|
325
|
+
|
|
326
|
+
# header parameters
|
|
327
|
+
header_params = opts[:header_params] || {}
|
|
328
|
+
# HTTP header 'Accept' (if needed)
|
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
330
|
+
|
|
331
|
+
# form parameters
|
|
332
|
+
form_params = opts[:form_params] || {}
|
|
333
|
+
|
|
334
|
+
# http body (model)
|
|
335
|
+
post_body = opts[:debug_body]
|
|
336
|
+
|
|
337
|
+
# return_type
|
|
338
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
339
|
+
|
|
340
|
+
# auth_names
|
|
341
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
342
|
+
|
|
343
|
+
new_options = opts.merge(
|
|
344
|
+
:operation => :"AmazonApi.amazon_get_all_seller_offers_buybox",
|
|
345
|
+
:header_params => header_params,
|
|
346
|
+
:query_params => query_params,
|
|
347
|
+
:form_params => form_params,
|
|
348
|
+
:body => post_body,
|
|
349
|
+
:auth_names => auth_names,
|
|
350
|
+
:return_type => return_type
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
354
|
+
if @api_client.config.debugging
|
|
355
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_get_all_seller_offers_buybox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
356
|
+
end
|
|
357
|
+
return data, status_code, headers
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Get product detail
|
|
361
|
+
# Full product detail by ASIN (price, variants, badges, buybox, ranks…).
|
|
362
|
+
# @param asin [String]
|
|
363
|
+
# @param [Hash] opts the optional parameters
|
|
364
|
+
# @option opts [String] :domain (default to 'com')
|
|
365
|
+
# @option opts [String] :zip Delivery postal/zip for localized buybox
|
|
366
|
+
# @option opts [String] :language
|
|
367
|
+
# @return [Object]
|
|
368
|
+
def amazon_get_product_detail(asin, opts = {})
|
|
369
|
+
data, _status_code, _headers = amazon_get_product_detail_with_http_info(asin, opts)
|
|
370
|
+
data
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Get product detail
|
|
374
|
+
# Full product detail by ASIN (price, variants, badges, buybox, ranks…).
|
|
375
|
+
# @param asin [String]
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @option opts [String] :domain (default to 'com')
|
|
378
|
+
# @option opts [String] :zip Delivery postal/zip for localized buybox
|
|
379
|
+
# @option opts [String] :language
|
|
380
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
381
|
+
def amazon_get_product_detail_with_http_info(asin, opts = {})
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_get_product_detail ...'
|
|
384
|
+
end
|
|
385
|
+
# verify the required parameter 'asin' is set
|
|
386
|
+
if @api_client.config.client_side_validation && asin.nil?
|
|
387
|
+
fail ArgumentError, "Missing the required parameter 'asin' when calling AmazonApi.amazon_get_product_detail"
|
|
388
|
+
end
|
|
389
|
+
# resource path
|
|
390
|
+
local_var_path = '/v1/amazon/products/{asin}'.sub('{' + 'asin' + '}', CGI.escape(asin.to_s))
|
|
391
|
+
|
|
392
|
+
# query parameters
|
|
393
|
+
query_params = opts[:query_params] || {}
|
|
394
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
395
|
+
query_params[:'zip'] = opts[:'zip'] if !opts[:'zip'].nil?
|
|
396
|
+
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
|
397
|
+
|
|
398
|
+
# header parameters
|
|
399
|
+
header_params = opts[:header_params] || {}
|
|
400
|
+
# HTTP header 'Accept' (if needed)
|
|
401
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
402
|
+
|
|
403
|
+
# form parameters
|
|
404
|
+
form_params = opts[:form_params] || {}
|
|
405
|
+
|
|
406
|
+
# http body (model)
|
|
407
|
+
post_body = opts[:debug_body]
|
|
408
|
+
|
|
409
|
+
# return_type
|
|
410
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
411
|
+
|
|
412
|
+
# auth_names
|
|
413
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
414
|
+
|
|
415
|
+
new_options = opts.merge(
|
|
416
|
+
:operation => :"AmazonApi.amazon_get_product_detail",
|
|
417
|
+
:header_params => header_params,
|
|
418
|
+
:query_params => query_params,
|
|
419
|
+
:form_params => form_params,
|
|
420
|
+
:body => post_body,
|
|
421
|
+
:auth_names => auth_names,
|
|
422
|
+
:return_type => return_type
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
426
|
+
if @api_client.config.debugging
|
|
427
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_get_product_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
428
|
+
end
|
|
429
|
+
return data, status_code, headers
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Get product reviews
|
|
433
|
+
# Customer reviews for an ASIN (featured + paginated, with filters).
|
|
434
|
+
# @param asin [String]
|
|
435
|
+
# @param [Hash] opts the optional parameters
|
|
436
|
+
# @option opts [String] :domain (default to 'com')
|
|
437
|
+
# @option opts [Integer] :page Review page (1-100, ~10 reviews/page) (default to 1)
|
|
438
|
+
# @option opts [String] :sort_by helpful | recent (default to 'helpful')
|
|
439
|
+
# @option opts [String] :star one_star..five_star | positive | critical
|
|
440
|
+
# @option opts [Boolean] :verified_only (default to false)
|
|
441
|
+
# @option opts [Boolean] :media_only (default to false)
|
|
442
|
+
# @return [Object]
|
|
443
|
+
def amazon_get_product_reviews(asin, opts = {})
|
|
444
|
+
data, _status_code, _headers = amazon_get_product_reviews_with_http_info(asin, opts)
|
|
445
|
+
data
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
# Get product reviews
|
|
449
|
+
# Customer reviews for an ASIN (featured + paginated, with filters).
|
|
450
|
+
# @param asin [String]
|
|
451
|
+
# @param [Hash] opts the optional parameters
|
|
452
|
+
# @option opts [String] :domain (default to 'com')
|
|
453
|
+
# @option opts [Integer] :page Review page (1-100, ~10 reviews/page) (default to 1)
|
|
454
|
+
# @option opts [String] :sort_by helpful | recent (default to 'helpful')
|
|
455
|
+
# @option opts [String] :star one_star..five_star | positive | critical
|
|
456
|
+
# @option opts [Boolean] :verified_only (default to false)
|
|
457
|
+
# @option opts [Boolean] :media_only (default to false)
|
|
458
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
459
|
+
def amazon_get_product_reviews_with_http_info(asin, opts = {})
|
|
460
|
+
if @api_client.config.debugging
|
|
461
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_get_product_reviews ...'
|
|
462
|
+
end
|
|
463
|
+
# verify the required parameter 'asin' is set
|
|
464
|
+
if @api_client.config.client_side_validation && asin.nil?
|
|
465
|
+
fail ArgumentError, "Missing the required parameter 'asin' when calling AmazonApi.amazon_get_product_reviews"
|
|
466
|
+
end
|
|
467
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
|
|
468
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_get_product_reviews, must be smaller than or equal to 100.'
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
472
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_get_product_reviews, must be greater than or equal to 1.'
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
# resource path
|
|
476
|
+
local_var_path = '/v1/amazon/products/{asin}/reviews'.sub('{' + 'asin' + '}', CGI.escape(asin.to_s))
|
|
477
|
+
|
|
478
|
+
# query parameters
|
|
479
|
+
query_params = opts[:query_params] || {}
|
|
480
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
481
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
482
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
483
|
+
query_params[:'star'] = opts[:'star'] if !opts[:'star'].nil?
|
|
484
|
+
query_params[:'verified_only'] = opts[:'verified_only'] if !opts[:'verified_only'].nil?
|
|
485
|
+
query_params[:'media_only'] = opts[:'media_only'] if !opts[:'media_only'].nil?
|
|
486
|
+
|
|
487
|
+
# header parameters
|
|
488
|
+
header_params = opts[:header_params] || {}
|
|
489
|
+
# HTTP header 'Accept' (if needed)
|
|
490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
491
|
+
|
|
492
|
+
# form parameters
|
|
493
|
+
form_params = opts[:form_params] || {}
|
|
494
|
+
|
|
495
|
+
# http body (model)
|
|
496
|
+
post_body = opts[:debug_body]
|
|
497
|
+
|
|
498
|
+
# return_type
|
|
499
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
500
|
+
|
|
501
|
+
# auth_names
|
|
502
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
503
|
+
|
|
504
|
+
new_options = opts.merge(
|
|
505
|
+
:operation => :"AmazonApi.amazon_get_product_reviews",
|
|
506
|
+
:header_params => header_params,
|
|
507
|
+
:query_params => query_params,
|
|
508
|
+
:form_params => form_params,
|
|
509
|
+
:body => post_body,
|
|
510
|
+
:auth_names => auth_names,
|
|
511
|
+
:return_type => return_type
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
515
|
+
if @api_client.config.debugging
|
|
516
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_get_product_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
517
|
+
end
|
|
518
|
+
return data, status_code, headers
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
# Get seller feedback
|
|
522
|
+
# Buyer feedback entries for a seller.
|
|
523
|
+
# @param seller_id [String]
|
|
524
|
+
# @param [Hash] opts the optional parameters
|
|
525
|
+
# @option opts [String] :domain (default to 'com')
|
|
526
|
+
# @option opts [Integer] :page (default to 1)
|
|
527
|
+
# @return [Object]
|
|
528
|
+
def amazon_get_seller_feedback(seller_id, opts = {})
|
|
529
|
+
data, _status_code, _headers = amazon_get_seller_feedback_with_http_info(seller_id, opts)
|
|
530
|
+
data
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
# Get seller feedback
|
|
534
|
+
# Buyer feedback entries for a seller.
|
|
535
|
+
# @param seller_id [String]
|
|
536
|
+
# @param [Hash] opts the optional parameters
|
|
537
|
+
# @option opts [String] :domain (default to 'com')
|
|
538
|
+
# @option opts [Integer] :page (default to 1)
|
|
539
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
540
|
+
def amazon_get_seller_feedback_with_http_info(seller_id, opts = {})
|
|
541
|
+
if @api_client.config.debugging
|
|
542
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_get_seller_feedback ...'
|
|
543
|
+
end
|
|
544
|
+
# verify the required parameter 'seller_id' is set
|
|
545
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
546
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling AmazonApi.amazon_get_seller_feedback"
|
|
547
|
+
end
|
|
548
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
549
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_get_seller_feedback, must be greater than or equal to 1.'
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# resource path
|
|
553
|
+
local_var_path = '/v1/amazon/sellers/{seller_id}/feedback'.sub('{' + 'seller_id' + '}', CGI.escape(seller_id.to_s))
|
|
554
|
+
|
|
555
|
+
# query parameters
|
|
556
|
+
query_params = opts[:query_params] || {}
|
|
557
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
558
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
559
|
+
|
|
560
|
+
# header parameters
|
|
561
|
+
header_params = opts[:header_params] || {}
|
|
562
|
+
# HTTP header 'Accept' (if needed)
|
|
563
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
564
|
+
|
|
565
|
+
# form parameters
|
|
566
|
+
form_params = opts[:form_params] || {}
|
|
567
|
+
|
|
568
|
+
# http body (model)
|
|
569
|
+
post_body = opts[:debug_body]
|
|
570
|
+
|
|
571
|
+
# return_type
|
|
572
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
573
|
+
|
|
574
|
+
# auth_names
|
|
575
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
576
|
+
|
|
577
|
+
new_options = opts.merge(
|
|
578
|
+
:operation => :"AmazonApi.amazon_get_seller_feedback",
|
|
579
|
+
:header_params => header_params,
|
|
580
|
+
:query_params => query_params,
|
|
581
|
+
:form_params => form_params,
|
|
582
|
+
:body => post_body,
|
|
583
|
+
:auth_names => auth_names,
|
|
584
|
+
:return_type => return_type
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
588
|
+
if @api_client.config.debugging
|
|
589
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_get_seller_feedback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
590
|
+
end
|
|
591
|
+
return data, status_code, headers
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Get seller profile
|
|
595
|
+
# Seller profile, ratings and feedback summary.
|
|
596
|
+
# @param seller_id [String]
|
|
597
|
+
# @param [Hash] opts the optional parameters
|
|
598
|
+
# @option opts [String] :domain (default to 'com')
|
|
599
|
+
# @return [Object]
|
|
600
|
+
def amazon_get_seller_profile(seller_id, opts = {})
|
|
601
|
+
data, _status_code, _headers = amazon_get_seller_profile_with_http_info(seller_id, opts)
|
|
602
|
+
data
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
# Get seller profile
|
|
606
|
+
# Seller profile, ratings and feedback summary.
|
|
607
|
+
# @param seller_id [String]
|
|
608
|
+
# @param [Hash] opts the optional parameters
|
|
609
|
+
# @option opts [String] :domain (default to 'com')
|
|
610
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
611
|
+
def amazon_get_seller_profile_with_http_info(seller_id, opts = {})
|
|
612
|
+
if @api_client.config.debugging
|
|
613
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_get_seller_profile ...'
|
|
614
|
+
end
|
|
615
|
+
# verify the required parameter 'seller_id' is set
|
|
616
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
617
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling AmazonApi.amazon_get_seller_profile"
|
|
618
|
+
end
|
|
619
|
+
# resource path
|
|
620
|
+
local_var_path = '/v1/amazon/sellers/{seller_id}'.sub('{' + 'seller_id' + '}', CGI.escape(seller_id.to_s))
|
|
621
|
+
|
|
622
|
+
# query parameters
|
|
623
|
+
query_params = opts[:query_params] || {}
|
|
624
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
625
|
+
|
|
626
|
+
# header parameters
|
|
627
|
+
header_params = opts[:header_params] || {}
|
|
628
|
+
# HTTP header 'Accept' (if needed)
|
|
629
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
630
|
+
|
|
631
|
+
# form parameters
|
|
632
|
+
form_params = opts[:form_params] || {}
|
|
633
|
+
|
|
634
|
+
# http body (model)
|
|
635
|
+
post_body = opts[:debug_body]
|
|
636
|
+
|
|
637
|
+
# return_type
|
|
638
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
639
|
+
|
|
640
|
+
# auth_names
|
|
641
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
642
|
+
|
|
643
|
+
new_options = opts.merge(
|
|
644
|
+
:operation => :"AmazonApi.amazon_get_seller_profile",
|
|
645
|
+
:header_params => header_params,
|
|
646
|
+
:query_params => query_params,
|
|
647
|
+
:form_params => form_params,
|
|
648
|
+
:body => post_body,
|
|
649
|
+
:auth_names => auth_names,
|
|
650
|
+
:return_type => return_type
|
|
651
|
+
)
|
|
652
|
+
|
|
653
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
654
|
+
if @api_client.config.debugging
|
|
655
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_get_seller_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
656
|
+
end
|
|
657
|
+
return data, status_code, headers
|
|
658
|
+
end
|
|
659
|
+
|
|
660
|
+
# Get seller storefront products
|
|
661
|
+
# Products listed in a seller's storefront.
|
|
662
|
+
# @param seller_id [String]
|
|
663
|
+
# @param [Hash] opts the optional parameters
|
|
664
|
+
# @option opts [String] :domain (default to 'com')
|
|
665
|
+
# @option opts [Integer] :page (default to 1)
|
|
666
|
+
# @return [Object]
|
|
667
|
+
def amazon_get_seller_storefront_products(seller_id, opts = {})
|
|
668
|
+
data, _status_code, _headers = amazon_get_seller_storefront_products_with_http_info(seller_id, opts)
|
|
669
|
+
data
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
# Get seller storefront products
|
|
673
|
+
# Products listed in a seller's storefront.
|
|
674
|
+
# @param seller_id [String]
|
|
675
|
+
# @param [Hash] opts the optional parameters
|
|
676
|
+
# @option opts [String] :domain (default to 'com')
|
|
677
|
+
# @option opts [Integer] :page (default to 1)
|
|
678
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
679
|
+
def amazon_get_seller_storefront_products_with_http_info(seller_id, opts = {})
|
|
680
|
+
if @api_client.config.debugging
|
|
681
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_get_seller_storefront_products ...'
|
|
682
|
+
end
|
|
683
|
+
# verify the required parameter 'seller_id' is set
|
|
684
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
685
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling AmazonApi.amazon_get_seller_storefront_products"
|
|
686
|
+
end
|
|
687
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
688
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_get_seller_storefront_products, must be greater than or equal to 1.'
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
# resource path
|
|
692
|
+
local_var_path = '/v1/amazon/sellers/{seller_id}/products'.sub('{' + 'seller_id' + '}', CGI.escape(seller_id.to_s))
|
|
693
|
+
|
|
694
|
+
# query parameters
|
|
695
|
+
query_params = opts[:query_params] || {}
|
|
696
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
697
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].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 => :"AmazonApi.amazon_get_seller_storefront_products",
|
|
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: AmazonApi#amazon_get_seller_storefront_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
729
|
+
end
|
|
730
|
+
return data, status_code, headers
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Keyword suggestions
|
|
734
|
+
# Get Amazon search autocomplete suggestions for keyword research.
|
|
735
|
+
# @param query [String] Partial search term
|
|
736
|
+
# @param [Hash] opts the optional parameters
|
|
737
|
+
# @option opts [String] :domain (default to 'com')
|
|
738
|
+
# @return [Object]
|
|
739
|
+
def amazon_keyword_suggestions(query, opts = {})
|
|
740
|
+
data, _status_code, _headers = amazon_keyword_suggestions_with_http_info(query, opts)
|
|
741
|
+
data
|
|
742
|
+
end
|
|
743
|
+
|
|
744
|
+
# Keyword suggestions
|
|
745
|
+
# Get Amazon search autocomplete suggestions for keyword research.
|
|
746
|
+
# @param query [String] Partial search term
|
|
747
|
+
# @param [Hash] opts the optional parameters
|
|
748
|
+
# @option opts [String] :domain (default to 'com')
|
|
749
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
750
|
+
def amazon_keyword_suggestions_with_http_info(query, opts = {})
|
|
751
|
+
if @api_client.config.debugging
|
|
752
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_keyword_suggestions ...'
|
|
753
|
+
end
|
|
754
|
+
# verify the required parameter 'query' is set
|
|
755
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
756
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling AmazonApi.amazon_keyword_suggestions"
|
|
757
|
+
end
|
|
758
|
+
# resource path
|
|
759
|
+
local_var_path = '/v1/amazon/autocomplete'
|
|
760
|
+
|
|
761
|
+
# query parameters
|
|
762
|
+
query_params = opts[:query_params] || {}
|
|
763
|
+
query_params[:'query'] = query
|
|
764
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
765
|
+
|
|
766
|
+
# header parameters
|
|
767
|
+
header_params = opts[:header_params] || {}
|
|
768
|
+
# HTTP header 'Accept' (if needed)
|
|
769
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
770
|
+
|
|
771
|
+
# form parameters
|
|
772
|
+
form_params = opts[:form_params] || {}
|
|
773
|
+
|
|
774
|
+
# http body (model)
|
|
775
|
+
post_body = opts[:debug_body]
|
|
776
|
+
|
|
777
|
+
# return_type
|
|
778
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
779
|
+
|
|
780
|
+
# auth_names
|
|
781
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
782
|
+
|
|
783
|
+
new_options = opts.merge(
|
|
784
|
+
:operation => :"AmazonApi.amazon_keyword_suggestions",
|
|
785
|
+
:header_params => header_params,
|
|
786
|
+
:query_params => query_params,
|
|
787
|
+
:form_params => form_params,
|
|
788
|
+
:body => post_body,
|
|
789
|
+
:auth_names => auth_names,
|
|
790
|
+
:return_type => return_type
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
794
|
+
if @api_client.config.debugging
|
|
795
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_keyword_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
796
|
+
end
|
|
797
|
+
return data, status_code, headers
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
# List category aliases
|
|
801
|
+
# List common Amazon department/category aliases and bestseller nodes.
|
|
802
|
+
# @param [Hash] opts the optional parameters
|
|
803
|
+
# @option opts [String] :domain (default to 'com')
|
|
804
|
+
# @return [Object]
|
|
805
|
+
def amazon_list_category_aliases(opts = {})
|
|
806
|
+
data, _status_code, _headers = amazon_list_category_aliases_with_http_info(opts)
|
|
807
|
+
data
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
# List category aliases
|
|
811
|
+
# List common Amazon department/category aliases and bestseller nodes.
|
|
812
|
+
# @param [Hash] opts the optional parameters
|
|
813
|
+
# @option opts [String] :domain (default to 'com')
|
|
814
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
815
|
+
def amazon_list_category_aliases_with_http_info(opts = {})
|
|
816
|
+
if @api_client.config.debugging
|
|
817
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_list_category_aliases ...'
|
|
818
|
+
end
|
|
819
|
+
# resource path
|
|
820
|
+
local_var_path = '/v1/amazon/categories'
|
|
821
|
+
|
|
822
|
+
# query parameters
|
|
823
|
+
query_params = opts[:query_params] || {}
|
|
824
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
825
|
+
|
|
826
|
+
# header parameters
|
|
827
|
+
header_params = opts[:header_params] || {}
|
|
828
|
+
# HTTP header 'Accept' (if needed)
|
|
829
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
830
|
+
|
|
831
|
+
# form parameters
|
|
832
|
+
form_params = opts[:form_params] || {}
|
|
833
|
+
|
|
834
|
+
# http body (model)
|
|
835
|
+
post_body = opts[:debug_body]
|
|
836
|
+
|
|
837
|
+
# return_type
|
|
838
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
839
|
+
|
|
840
|
+
# auth_names
|
|
841
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
842
|
+
|
|
843
|
+
new_options = opts.merge(
|
|
844
|
+
:operation => :"AmazonApi.amazon_list_category_aliases",
|
|
845
|
+
:header_params => header_params,
|
|
846
|
+
:query_params => query_params,
|
|
847
|
+
:form_params => form_params,
|
|
848
|
+
:body => post_body,
|
|
849
|
+
:auth_names => auth_names,
|
|
850
|
+
:return_type => return_type
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
854
|
+
if @api_client.config.debugging
|
|
855
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_list_category_aliases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
856
|
+
end
|
|
857
|
+
return data, status_code, headers
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# List marketplaces
|
|
861
|
+
# List all supported Amazon marketplaces.
|
|
862
|
+
# @param [Hash] opts the optional parameters
|
|
863
|
+
# @return [Object]
|
|
864
|
+
def amazon_list_marketplaces(opts = {})
|
|
865
|
+
data, _status_code, _headers = amazon_list_marketplaces_with_http_info(opts)
|
|
866
|
+
data
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
# List marketplaces
|
|
870
|
+
# List all supported Amazon marketplaces.
|
|
871
|
+
# @param [Hash] opts the optional parameters
|
|
872
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
873
|
+
def amazon_list_marketplaces_with_http_info(opts = {})
|
|
874
|
+
if @api_client.config.debugging
|
|
875
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_list_marketplaces ...'
|
|
876
|
+
end
|
|
877
|
+
# resource path
|
|
878
|
+
local_var_path = '/v1/amazon/markets'
|
|
879
|
+
|
|
880
|
+
# query parameters
|
|
881
|
+
query_params = opts[:query_params] || {}
|
|
882
|
+
|
|
883
|
+
# header parameters
|
|
884
|
+
header_params = opts[:header_params] || {}
|
|
885
|
+
# HTTP header 'Accept' (if needed)
|
|
886
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
887
|
+
|
|
888
|
+
# form parameters
|
|
889
|
+
form_params = opts[:form_params] || {}
|
|
890
|
+
|
|
891
|
+
# http body (model)
|
|
892
|
+
post_body = opts[:debug_body]
|
|
893
|
+
|
|
894
|
+
# return_type
|
|
895
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
896
|
+
|
|
897
|
+
# auth_names
|
|
898
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
899
|
+
|
|
900
|
+
new_options = opts.merge(
|
|
901
|
+
:operation => :"AmazonApi.amazon_list_marketplaces",
|
|
902
|
+
:header_params => header_params,
|
|
903
|
+
:query_params => query_params,
|
|
904
|
+
:form_params => form_params,
|
|
905
|
+
:body => post_body,
|
|
906
|
+
:auth_names => auth_names,
|
|
907
|
+
:return_type => return_type
|
|
908
|
+
)
|
|
909
|
+
|
|
910
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
911
|
+
if @api_client.config.debugging
|
|
912
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_list_marketplaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
913
|
+
end
|
|
914
|
+
return data, status_code, headers
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
# New releases by category
|
|
918
|
+
# Newly released products for a category (browse node).
|
|
919
|
+
# @param [Hash] opts the optional parameters
|
|
920
|
+
# @option opts [String] :domain (default to 'com')
|
|
921
|
+
# @option opts [String] :category
|
|
922
|
+
# @option opts [Integer] :page (default to 1)
|
|
923
|
+
# @return [Object]
|
|
924
|
+
def amazon_new_releases_by_category(opts = {})
|
|
925
|
+
data, _status_code, _headers = amazon_new_releases_by_category_with_http_info(opts)
|
|
926
|
+
data
|
|
927
|
+
end
|
|
928
|
+
|
|
929
|
+
# New releases by category
|
|
930
|
+
# Newly released products for a category (browse node).
|
|
931
|
+
# @param [Hash] opts the optional parameters
|
|
932
|
+
# @option opts [String] :domain (default to 'com')
|
|
933
|
+
# @option opts [String] :category
|
|
934
|
+
# @option opts [Integer] :page (default to 1)
|
|
935
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
936
|
+
def amazon_new_releases_by_category_with_http_info(opts = {})
|
|
937
|
+
if @api_client.config.debugging
|
|
938
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_new_releases_by_category ...'
|
|
939
|
+
end
|
|
940
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 2
|
|
941
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_new_releases_by_category, must be smaller than or equal to 2.'
|
|
942
|
+
end
|
|
943
|
+
|
|
944
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
945
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_new_releases_by_category, must be greater than or equal to 1.'
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
# resource path
|
|
949
|
+
local_var_path = '/v1/amazon/new-releases'
|
|
950
|
+
|
|
951
|
+
# query parameters
|
|
952
|
+
query_params = opts[:query_params] || {}
|
|
953
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
954
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
|
955
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
956
|
+
|
|
957
|
+
# header parameters
|
|
958
|
+
header_params = opts[:header_params] || {}
|
|
959
|
+
# HTTP header 'Accept' (if needed)
|
|
960
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
961
|
+
|
|
962
|
+
# form parameters
|
|
963
|
+
form_params = opts[:form_params] || {}
|
|
964
|
+
|
|
965
|
+
# http body (model)
|
|
966
|
+
post_body = opts[:debug_body]
|
|
967
|
+
|
|
968
|
+
# return_type
|
|
969
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
970
|
+
|
|
971
|
+
# auth_names
|
|
972
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
973
|
+
|
|
974
|
+
new_options = opts.merge(
|
|
975
|
+
:operation => :"AmazonApi.amazon_new_releases_by_category",
|
|
976
|
+
:header_params => header_params,
|
|
977
|
+
:query_params => query_params,
|
|
978
|
+
:form_params => form_params,
|
|
979
|
+
:body => post_body,
|
|
980
|
+
:auth_names => auth_names,
|
|
981
|
+
:return_type => return_type
|
|
982
|
+
)
|
|
983
|
+
|
|
984
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
985
|
+
if @api_client.config.debugging
|
|
986
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_new_releases_by_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
987
|
+
end
|
|
988
|
+
return data, status_code, headers
|
|
989
|
+
end
|
|
990
|
+
|
|
991
|
+
# Search Amazon products
|
|
992
|
+
# Search the Amazon catalog with filters and sorting.
|
|
993
|
+
# @param query [String] Search keywords
|
|
994
|
+
# @param [Hash] opts the optional parameters
|
|
995
|
+
# @option opts [String] :domain Amazon marketplace TLD or code (com, co.uk, de…) (default to 'com')
|
|
996
|
+
# @option opts [Integer] :page (default to 1)
|
|
997
|
+
# @option opts [String] :sort_by relevance | price_low_to_high | price_high_to_low | avg_review | newest
|
|
998
|
+
# @option opts [String] :category Department/category alias (i= param)
|
|
999
|
+
# @option opts [Float] :min_price
|
|
1000
|
+
# @option opts [Float] :max_price
|
|
1001
|
+
# @option opts [String] :zip Delivery postal/zip code for localized pricing
|
|
1002
|
+
# @option opts [String] :language Locale for results, e.g. en_US, fr_FR
|
|
1003
|
+
# @return [Object]
|
|
1004
|
+
def amazon_search_amazon_products(query, opts = {})
|
|
1005
|
+
data, _status_code, _headers = amazon_search_amazon_products_with_http_info(query, opts)
|
|
1006
|
+
data
|
|
1007
|
+
end
|
|
1008
|
+
|
|
1009
|
+
# Search Amazon products
|
|
1010
|
+
# Search the Amazon catalog with filters and sorting.
|
|
1011
|
+
# @param query [String] Search keywords
|
|
1012
|
+
# @param [Hash] opts the optional parameters
|
|
1013
|
+
# @option opts [String] :domain Amazon marketplace TLD or code (com, co.uk, de…) (default to 'com')
|
|
1014
|
+
# @option opts [Integer] :page (default to 1)
|
|
1015
|
+
# @option opts [String] :sort_by relevance | price_low_to_high | price_high_to_low | avg_review | newest
|
|
1016
|
+
# @option opts [String] :category Department/category alias (i= param)
|
|
1017
|
+
# @option opts [Float] :min_price
|
|
1018
|
+
# @option opts [Float] :max_price
|
|
1019
|
+
# @option opts [String] :zip Delivery postal/zip code for localized pricing
|
|
1020
|
+
# @option opts [String] :language Locale for results, e.g. en_US, fr_FR
|
|
1021
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1022
|
+
def amazon_search_amazon_products_with_http_info(query, opts = {})
|
|
1023
|
+
if @api_client.config.debugging
|
|
1024
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_search_amazon_products ...'
|
|
1025
|
+
end
|
|
1026
|
+
# verify the required parameter 'query' is set
|
|
1027
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
1028
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling AmazonApi.amazon_search_amazon_products"
|
|
1029
|
+
end
|
|
1030
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 20
|
|
1031
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_search_amazon_products, must be smaller than or equal to 20.'
|
|
1032
|
+
end
|
|
1033
|
+
|
|
1034
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1035
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_search_amazon_products, must be greater than or equal to 1.'
|
|
1036
|
+
end
|
|
1037
|
+
|
|
1038
|
+
if @api_client.config.client_side_validation && !opts[:'min_price'].nil? && opts[:'min_price'] < 0
|
|
1039
|
+
fail ArgumentError, 'invalid value for "opts[:"min_price"]" when calling AmazonApi.amazon_search_amazon_products, must be greater than or equal to 0.'
|
|
1040
|
+
end
|
|
1041
|
+
|
|
1042
|
+
if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 0
|
|
1043
|
+
fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling AmazonApi.amazon_search_amazon_products, must be greater than or equal to 0.'
|
|
1044
|
+
end
|
|
1045
|
+
|
|
1046
|
+
# resource path
|
|
1047
|
+
local_var_path = '/v1/amazon/search'
|
|
1048
|
+
|
|
1049
|
+
# query parameters
|
|
1050
|
+
query_params = opts[:query_params] || {}
|
|
1051
|
+
query_params[:'query'] = query
|
|
1052
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
1053
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1054
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
1055
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
|
1056
|
+
query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
|
|
1057
|
+
query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
|
|
1058
|
+
query_params[:'zip'] = opts[:'zip'] if !opts[:'zip'].nil?
|
|
1059
|
+
query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
|
|
1060
|
+
|
|
1061
|
+
# header parameters
|
|
1062
|
+
header_params = opts[:header_params] || {}
|
|
1063
|
+
# HTTP header 'Accept' (if needed)
|
|
1064
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1065
|
+
|
|
1066
|
+
# form parameters
|
|
1067
|
+
form_params = opts[:form_params] || {}
|
|
1068
|
+
|
|
1069
|
+
# http body (model)
|
|
1070
|
+
post_body = opts[:debug_body]
|
|
1071
|
+
|
|
1072
|
+
# return_type
|
|
1073
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1074
|
+
|
|
1075
|
+
# auth_names
|
|
1076
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1077
|
+
|
|
1078
|
+
new_options = opts.merge(
|
|
1079
|
+
:operation => :"AmazonApi.amazon_search_amazon_products",
|
|
1080
|
+
:header_params => header_params,
|
|
1081
|
+
:query_params => query_params,
|
|
1082
|
+
:form_params => form_params,
|
|
1083
|
+
:body => post_body,
|
|
1084
|
+
:auth_names => auth_names,
|
|
1085
|
+
:return_type => return_type
|
|
1086
|
+
)
|
|
1087
|
+
|
|
1088
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1089
|
+
if @api_client.config.debugging
|
|
1090
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_search_amazon_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1091
|
+
end
|
|
1092
|
+
return data, status_code, headers
|
|
1093
|
+
end
|
|
1094
|
+
|
|
1095
|
+
# Today's deals
|
|
1096
|
+
# Current Amazon deals (lightning deals, best deals).
|
|
1097
|
+
# @param [Hash] opts the optional parameters
|
|
1098
|
+
# @option opts [String] :domain (default to 'com')
|
|
1099
|
+
# @option opts [String] :category
|
|
1100
|
+
# @option opts [Integer] :page (default to 1)
|
|
1101
|
+
# @return [Object]
|
|
1102
|
+
def amazon_today_s_deals(opts = {})
|
|
1103
|
+
data, _status_code, _headers = amazon_today_s_deals_with_http_info(opts)
|
|
1104
|
+
data
|
|
1105
|
+
end
|
|
1106
|
+
|
|
1107
|
+
# Today's deals
|
|
1108
|
+
# Current Amazon deals (lightning deals, best deals).
|
|
1109
|
+
# @param [Hash] opts the optional parameters
|
|
1110
|
+
# @option opts [String] :domain (default to 'com')
|
|
1111
|
+
# @option opts [String] :category
|
|
1112
|
+
# @option opts [Integer] :page (default to 1)
|
|
1113
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1114
|
+
def amazon_today_s_deals_with_http_info(opts = {})
|
|
1115
|
+
if @api_client.config.debugging
|
|
1116
|
+
@api_client.config.logger.debug 'Calling API: AmazonApi.amazon_today_s_deals ...'
|
|
1117
|
+
end
|
|
1118
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1119
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AmazonApi.amazon_today_s_deals, must be greater than or equal to 1.'
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
# resource path
|
|
1123
|
+
local_var_path = '/v1/amazon/deals'
|
|
1124
|
+
|
|
1125
|
+
# query parameters
|
|
1126
|
+
query_params = opts[:query_params] || {}
|
|
1127
|
+
query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
|
|
1128
|
+
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
|
1129
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1130
|
+
|
|
1131
|
+
# header parameters
|
|
1132
|
+
header_params = opts[:header_params] || {}
|
|
1133
|
+
# HTTP header 'Accept' (if needed)
|
|
1134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1135
|
+
|
|
1136
|
+
# form parameters
|
|
1137
|
+
form_params = opts[:form_params] || {}
|
|
1138
|
+
|
|
1139
|
+
# http body (model)
|
|
1140
|
+
post_body = opts[:debug_body]
|
|
1141
|
+
|
|
1142
|
+
# return_type
|
|
1143
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1144
|
+
|
|
1145
|
+
# auth_names
|
|
1146
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
1147
|
+
|
|
1148
|
+
new_options = opts.merge(
|
|
1149
|
+
:operation => :"AmazonApi.amazon_today_s_deals",
|
|
1150
|
+
:header_params => header_params,
|
|
1151
|
+
:query_params => query_params,
|
|
1152
|
+
:form_params => form_params,
|
|
1153
|
+
:body => post_body,
|
|
1154
|
+
:auth_names => auth_names,
|
|
1155
|
+
:return_type => return_type
|
|
1156
|
+
)
|
|
1157
|
+
|
|
1158
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1159
|
+
if @api_client.config.debugging
|
|
1160
|
+
@api_client.config.logger.debug "API called: AmazonApi#amazon_today_s_deals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1161
|
+
end
|
|
1162
|
+
return data, status_code, headers
|
|
1163
|
+
end
|
|
1164
|
+
end
|
|
1165
|
+
end
|