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.
Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +548 -0
  5. data/Rakefile +10 -0
  6. data/docs/AccountApi.md +76 -0
  7. data/docs/AccountInfo.md +28 -0
  8. data/docs/AmazonApi.md +1244 -0
  9. data/docs/ApartmentsApi.md +373 -0
  10. data/docs/BaiduApi.md +447 -0
  11. data/docs/BillingLogListResponse.md +24 -0
  12. data/docs/BillingLogResponse.md +32 -0
  13. data/docs/BingApi.md +610 -0
  14. data/docs/ChatGPTApi.md +521 -0
  15. data/docs/DepopApi.md +542 -0
  16. data/docs/DuckDuckGoApi.md +700 -0
  17. data/docs/EBayApi.md +1019 -0
  18. data/docs/FacebookApi.md +1671 -0
  19. data/docs/FilterRuleCreate.md +28 -0
  20. data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
  21. data/docs/FilterRuleDeliveryLogResponse.md +44 -0
  22. data/docs/FilterRuleListResponse.md +24 -0
  23. data/docs/FilterRuleResponse.md +40 -0
  24. data/docs/FilterRuleUpdate.md +30 -0
  25. data/docs/FilterRuleValidateRequest.md +18 -0
  26. data/docs/FilterRuleValidateResponse.md +22 -0
  27. data/docs/GoogleApi.md +3175 -0
  28. data/docs/HTTPValidationError.md +18 -0
  29. data/docs/IdealistaApi.md +822 -0
  30. data/docs/ImmobiliareApi.md +773 -0
  31. data/docs/InstagramApi.md +1673 -0
  32. data/docs/LeboncoinApi.md +884 -0
  33. data/docs/LinkedInApi.md +925 -0
  34. data/docs/LoopNetApi.md +529 -0
  35. data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
  36. data/docs/RealtorApi.md +474 -0
  37. data/docs/RedditApi.md +1677 -0
  38. data/docs/RedfinApi.md +616 -0
  39. data/docs/StreamMonitorCreate.md +26 -0
  40. data/docs/StreamMonitorListResponse.md +24 -0
  41. data/docs/StreamMonitorResponse.md +42 -0
  42. data/docs/StreamMonitorUpdate.md +28 -0
  43. data/docs/SubscriptionInfo.md +40 -0
  44. data/docs/TikTokApi.md +2104 -0
  45. data/docs/TweetDeliveryLogListResponse.md +24 -0
  46. data/docs/TweetDeliveryLogResponse.md +44 -0
  47. data/docs/TwitterApi.md +4091 -0
  48. data/docs/ValidationError.md +22 -0
  49. data/docs/ValidationErrorLocInner.md +15 -0
  50. data/docs/VintedApi.md +766 -0
  51. data/docs/WalmartApi.md +904 -0
  52. data/docs/WebApi.md +634 -0
  53. data/docs/WebhookCreate.md +22 -0
  54. data/docs/WebhookListItem.md +28 -0
  55. data/docs/WebhookListResponse.md +20 -0
  56. data/docs/WebhookResponse.md +26 -0
  57. data/docs/WebhookTestRequest.md +18 -0
  58. data/docs/WebhookTestResponse.md +24 -0
  59. data/docs/YahooApi.md +602 -0
  60. data/docs/YandexApi.md +450 -0
  61. data/docs/YouTubeApi.md +2872 -0
  62. data/docs/ZillowApi.md +622 -0
  63. data/git_push.sh +57 -0
  64. data/lib/scrapebadger/api/account_api.rb +79 -0
  65. data/lib/scrapebadger/api/amazon_api.rb +1165 -0
  66. data/lib/scrapebadger/api/apartments_api.rb +377 -0
  67. data/lib/scrapebadger/api/baidu_api.rb +436 -0
  68. data/lib/scrapebadger/api/bing_api.rb +580 -0
  69. data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
  70. data/lib/scrapebadger/api/depop_api.rb +518 -0
  71. data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
  72. data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
  73. data/lib/scrapebadger/api/facebook_api.rb +1492 -0
  74. data/lib/scrapebadger/api/google_api.rb +3191 -0
  75. data/lib/scrapebadger/api/idealista_api.rb +864 -0
  76. data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
  77. data/lib/scrapebadger/api/instagram_api.rb +1555 -0
  78. data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
  79. data/lib/scrapebadger/api/linked_in_api.rb +832 -0
  80. data/lib/scrapebadger/api/loop_net_api.rb +503 -0
  81. data/lib/scrapebadger/api/realtor_api.rb +481 -0
  82. data/lib/scrapebadger/api/reddit_api.rb +1601 -0
  83. data/lib/scrapebadger/api/redfin_api.rb +625 -0
  84. data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
  85. data/lib/scrapebadger/api/twitter_api.rb +3696 -0
  86. data/lib/scrapebadger/api/vinted_api.rb +705 -0
  87. data/lib/scrapebadger/api/walmart_api.rb +876 -0
  88. data/lib/scrapebadger/api/web_api.rb +547 -0
  89. data/lib/scrapebadger/api/yahoo_api.rb +560 -0
  90. data/lib/scrapebadger/api/yandex_api.rb +422 -0
  91. data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
  92. data/lib/scrapebadger/api/zillow_api.rb +634 -0
  93. data/lib/scrapebadger/api_client.rb +394 -0
  94. data/lib/scrapebadger/api_error.rb +58 -0
  95. data/lib/scrapebadger/configuration.rb +308 -0
  96. data/lib/scrapebadger/models/account_info.rb +288 -0
  97. data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
  98. data/lib/scrapebadger/models/billing_log_response.rb +334 -0
  99. data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
  100. data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
  101. data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
  102. data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
  103. data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
  104. data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
  105. data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
  106. data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
  107. data/lib/scrapebadger/models/http_validation_error.rb +216 -0
  108. data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
  109. data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
  110. data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
  111. data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
  112. data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
  113. data/lib/scrapebadger/models/subscription_info.rb +352 -0
  114. data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
  115. data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
  116. data/lib/scrapebadger/models/validation_error.rb +255 -0
  117. data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
  118. data/lib/scrapebadger/models/webhook_create.rb +282 -0
  119. data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
  120. data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
  121. data/lib/scrapebadger/models/webhook_response.rb +286 -0
  122. data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
  123. data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
  124. data/lib/scrapebadger/version.rb +15 -0
  125. data/lib/scrapebadger.rb +96 -0
  126. data/scrapebadger.gemspec +39 -0
  127. data/spec/api/account_api_spec.rb +46 -0
  128. data/spec/api/amazon_api_spec.rb +258 -0
  129. data/spec/api/apartments_api_spec.rb +98 -0
  130. data/spec/api/baidu_api_spec.rb +109 -0
  131. data/spec/api/bing_api_spec.rb +141 -0
  132. data/spec/api/chat_gpt_api_spec.rb +123 -0
  133. data/spec/api/depop_api_spec.rb +132 -0
  134. data/spec/api/duck_duck_go_api_spec.rb +162 -0
  135. data/spec/api/e_bay_api_spec.rb +222 -0
  136. data/spec/api/facebook_api_spec.rb +326 -0
  137. data/spec/api/google_api_spec.rb +649 -0
  138. data/spec/api/idealista_api_spec.rb +197 -0
  139. data/spec/api/immobiliare_api_spec.rb +174 -0
  140. data/spec/api/instagram_api_spec.rb +309 -0
  141. data/spec/api/leboncoin_api_spec.rb +184 -0
  142. data/spec/api/linked_in_api_spec.rb +197 -0
  143. data/spec/api/loop_net_api_spec.rb +127 -0
  144. data/spec/api/realtor_api_spec.rb +123 -0
  145. data/spec/api/reddit_api_spec.rb +331 -0
  146. data/spec/api/redfin_api_spec.rb +147 -0
  147. data/spec/api/tik_tok_api_spec.rb +413 -0
  148. data/spec/api/twitter_api_spec.rb +735 -0
  149. data/spec/api/vinted_api_spec.rb +169 -0
  150. data/spec/api/walmart_api_spec.rb +192 -0
  151. data/spec/api/web_api_spec.rb +136 -0
  152. data/spec/api/yahoo_api_spec.rb +137 -0
  153. data/spec/api/yandex_api_spec.rb +111 -0
  154. data/spec/api/you_tube_api_spec.rb +500 -0
  155. data/spec/api/zillow_api_spec.rb +150 -0
  156. data/spec/models/account_info_spec.rb +66 -0
  157. data/spec/models/billing_log_list_response_spec.rb +54 -0
  158. data/spec/models/billing_log_response_spec.rb +78 -0
  159. data/spec/models/filter_rule_create_spec.rb +66 -0
  160. data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
  161. data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
  162. data/spec/models/filter_rule_list_response_spec.rb +54 -0
  163. data/spec/models/filter_rule_response_spec.rb +102 -0
  164. data/spec/models/filter_rule_update_spec.rb +72 -0
  165. data/spec/models/filter_rule_validate_request_spec.rb +36 -0
  166. data/spec/models/filter_rule_validate_response_spec.rb +48 -0
  167. data/spec/models/http_validation_error_spec.rb +36 -0
  168. data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
  169. data/spec/models/stream_monitor_create_spec.rb +60 -0
  170. data/spec/models/stream_monitor_list_response_spec.rb +54 -0
  171. data/spec/models/stream_monitor_response_spec.rb +108 -0
  172. data/spec/models/stream_monitor_update_spec.rb +66 -0
  173. data/spec/models/subscription_info_spec.rb +102 -0
  174. data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
  175. data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
  176. data/spec/models/validation_error_loc_inner_spec.rb +21 -0
  177. data/spec/models/validation_error_spec.rb +48 -0
  178. data/spec/models/webhook_create_spec.rb +48 -0
  179. data/spec/models/webhook_list_item_spec.rb +66 -0
  180. data/spec/models/webhook_list_response_spec.rb +42 -0
  181. data/spec/models/webhook_response_spec.rb +60 -0
  182. data/spec/models/webhook_test_request_spec.rb +36 -0
  183. data/spec/models/webhook_test_response_spec.rb +54 -0
  184. data/spec/spec_helper.rb +111 -0
  185. metadata +324 -0
@@ -0,0 +1,1029 @@
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 EBayApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Browse a category
23
+ # List active listings within an eBay category.
24
+ # @param category_id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :domain (default to 'com')
27
+ # @option opts [Integer] :page (default to 1)
28
+ # @option opts [Integer] :per_page
29
+ # @option opts [String] :sort_by best_match|ending_soonest|newly_listed|price_low_to_high|price_high_to_low (default to 'best_match')
30
+ # @option opts [Float] :min_price
31
+ # @option opts [Float] :max_price
32
+ # @return [Object]
33
+ def ebay_browse_a_category(category_id, opts = {})
34
+ data, _status_code, _headers = ebay_browse_a_category_with_http_info(category_id, opts)
35
+ data
36
+ end
37
+
38
+ # Browse a category
39
+ # List active listings within an eBay category.
40
+ # @param category_id [String]
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :domain (default to 'com')
43
+ # @option opts [Integer] :page (default to 1)
44
+ # @option opts [Integer] :per_page
45
+ # @option opts [String] :sort_by best_match|ending_soonest|newly_listed|price_low_to_high|price_high_to_low (default to 'best_match')
46
+ # @option opts [Float] :min_price
47
+ # @option opts [Float] :max_price
48
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
49
+ def ebay_browse_a_category_with_http_info(category_id, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_browse_a_category ...'
52
+ end
53
+ # verify the required parameter 'category_id' is set
54
+ if @api_client.config.client_side_validation && category_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'category_id' when calling EBayApi.ebay_browse_a_category"
56
+ end
57
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
58
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_browse_a_category, must be smaller than or equal to 100.'
59
+ end
60
+
61
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
62
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_browse_a_category, must be greater than or equal to 1.'
63
+ end
64
+
65
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 240
66
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_browse_a_category, must be smaller than or equal to 240.'
67
+ end
68
+
69
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
70
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_browse_a_category, must be greater than or equal to 1.'
71
+ end
72
+
73
+ if @api_client.config.client_side_validation && !opts[:'min_price'].nil? && opts[:'min_price'] < 0
74
+ fail ArgumentError, 'invalid value for "opts[:"min_price"]" when calling EBayApi.ebay_browse_a_category, must be greater than or equal to 0.'
75
+ end
76
+
77
+ if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 0
78
+ fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling EBayApi.ebay_browse_a_category, must be greater than or equal to 0.'
79
+ end
80
+
81
+ # resource path
82
+ local_var_path = '/v1/ebay/categories/{category_id}/items'.sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
83
+
84
+ # query parameters
85
+ query_params = opts[:query_params] || {}
86
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
87
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
88
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
89
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
90
+ query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
91
+ query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
92
+
93
+ # header parameters
94
+ header_params = opts[:header_params] || {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
97
+
98
+ # form parameters
99
+ form_params = opts[:form_params] || {}
100
+
101
+ # http body (model)
102
+ post_body = opts[:debug_body]
103
+
104
+ # return_type
105
+ return_type = opts[:debug_return_type] || 'Object'
106
+
107
+ # auth_names
108
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
109
+
110
+ new_options = opts.merge(
111
+ :operation => :"EBayApi.ebay_browse_a_category",
112
+ :header_params => header_params,
113
+ :query_params => query_params,
114
+ :form_params => form_params,
115
+ :body => post_body,
116
+ :auth_names => auth_names,
117
+ :return_type => return_type
118
+ )
119
+
120
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
121
+ if @api_client.config.debugging
122
+ @api_client.config.logger.debug "API called: EBayApi#ebay_browse_a_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
123
+ end
124
+ return data, status_code, headers
125
+ end
126
+
127
+ # Completed / sold listings
128
+ # Search completed/sold listings — eBay's sold-price history.
129
+ # @param query [String] Search keywords
130
+ # @param [Hash] opts the optional parameters
131
+ # @option opts [String] :domain (default to 'com')
132
+ # @option opts [String] :category_id
133
+ # @option opts [Integer] :page (default to 1)
134
+ # @option opts [Integer] :per_page
135
+ # @option opts [String] :sort_by best_match|ending_soonest|newly_listed|price_low_to_high|price_high_to_low (default to 'best_match')
136
+ # @option opts [String] :condition new|open_box|refurbished|used|for_parts
137
+ # @option opts [Float] :min_price
138
+ # @option opts [Float] :max_price
139
+ # @return [Object]
140
+ def ebay_completed_sold_listings(query, opts = {})
141
+ data, _status_code, _headers = ebay_completed_sold_listings_with_http_info(query, opts)
142
+ data
143
+ end
144
+
145
+ # Completed / sold listings
146
+ # Search completed/sold listings — eBay&#39;s sold-price history.
147
+ # @param query [String] Search keywords
148
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [String] :domain (default to 'com')
150
+ # @option opts [String] :category_id
151
+ # @option opts [Integer] :page (default to 1)
152
+ # @option opts [Integer] :per_page
153
+ # @option opts [String] :sort_by best_match|ending_soonest|newly_listed|price_low_to_high|price_high_to_low (default to 'best_match')
154
+ # @option opts [String] :condition new|open_box|refurbished|used|for_parts
155
+ # @option opts [Float] :min_price
156
+ # @option opts [Float] :max_price
157
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
158
+ def ebay_completed_sold_listings_with_http_info(query, opts = {})
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_completed_sold_listings ...'
161
+ end
162
+ # verify the required parameter 'query' is set
163
+ if @api_client.config.client_side_validation && query.nil?
164
+ fail ArgumentError, "Missing the required parameter 'query' when calling EBayApi.ebay_completed_sold_listings"
165
+ end
166
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
167
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_completed_sold_listings, must be smaller than or equal to 100.'
168
+ end
169
+
170
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
171
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_completed_sold_listings, must be greater than or equal to 1.'
172
+ end
173
+
174
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 240
175
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_completed_sold_listings, must be smaller than or equal to 240.'
176
+ end
177
+
178
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
179
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_completed_sold_listings, must be greater than or equal to 1.'
180
+ end
181
+
182
+ if @api_client.config.client_side_validation && !opts[:'min_price'].nil? && opts[:'min_price'] < 0
183
+ fail ArgumentError, 'invalid value for "opts[:"min_price"]" when calling EBayApi.ebay_completed_sold_listings, must be greater than or equal to 0.'
184
+ end
185
+
186
+ if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 0
187
+ fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling EBayApi.ebay_completed_sold_listings, must be greater than or equal to 0.'
188
+ end
189
+
190
+ # resource path
191
+ local_var_path = '/v1/ebay/completed'
192
+
193
+ # query parameters
194
+ query_params = opts[:query_params] || {}
195
+ query_params[:'query'] = query
196
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
197
+ query_params[:'category_id'] = opts[:'category_id'] if !opts[:'category_id'].nil?
198
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
199
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
200
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
201
+ query_params[:'condition'] = opts[:'condition'] if !opts[:'condition'].nil?
202
+ query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
203
+ query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:debug_body]
215
+
216
+ # return_type
217
+ return_type = opts[:debug_return_type] || 'Object'
218
+
219
+ # auth_names
220
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
221
+
222
+ new_options = opts.merge(
223
+ :operation => :"EBayApi.ebay_completed_sold_listings",
224
+ :header_params => header_params,
225
+ :query_params => query_params,
226
+ :form_params => form_params,
227
+ :body => post_body,
228
+ :auth_names => auth_names,
229
+ :return_type => return_type
230
+ )
231
+
232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: EBayApi#ebay_completed_sold_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+
239
+ # eBay scraper health check
240
+ # Check health of the eBay scraper service (accepts HEAD for UptimeRobot).
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [Object]
243
+ def ebay_ebay_scraper_health_check(opts = {})
244
+ data, _status_code, _headers = ebay_ebay_scraper_health_check_with_http_info(opts)
245
+ data
246
+ end
247
+
248
+ # eBay scraper health check
249
+ # Check health of the eBay scraper service (accepts HEAD for UptimeRobot).
250
+ # @param [Hash] opts the optional parameters
251
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
252
+ def ebay_ebay_scraper_health_check_with_http_info(opts = {})
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_ebay_scraper_health_check ...'
255
+ end
256
+ # resource path
257
+ local_var_path = '/v1/ebay/health'
258
+
259
+ # query parameters
260
+ query_params = opts[:query_params] || {}
261
+
262
+ # header parameters
263
+ header_params = opts[:header_params] || {}
264
+ # HTTP header 'Accept' (if needed)
265
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
266
+
267
+ # form parameters
268
+ form_params = opts[:form_params] || {}
269
+
270
+ # http body (model)
271
+ post_body = opts[:debug_body]
272
+
273
+ # return_type
274
+ return_type = opts[:debug_return_type] || 'Object'
275
+
276
+ # auth_names
277
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
278
+
279
+ new_options = opts.merge(
280
+ :operation => :"EBayApi.ebay_ebay_scraper_health_check",
281
+ :header_params => header_params,
282
+ :query_params => query_params,
283
+ :form_params => form_params,
284
+ :body => post_body,
285
+ :auth_names => auth_names,
286
+ :return_type => return_type
287
+ )
288
+
289
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug "API called: EBayApi#ebay_ebay_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
+ end
293
+ return data, status_code, headers
294
+ end
295
+
296
+ # eBay scraper health check
297
+ # Check health of the eBay scraper service (accepts HEAD for UptimeRobot).
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [Object]
300
+ def ebay_ebay_scraper_health_check_head(opts = {})
301
+ data, _status_code, _headers = ebay_ebay_scraper_health_check_head_with_http_info(opts)
302
+ data
303
+ end
304
+
305
+ # eBay scraper health check
306
+ # Check health of the eBay scraper service (accepts HEAD for UptimeRobot).
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
309
+ def ebay_ebay_scraper_health_check_head_with_http_info(opts = {})
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_ebay_scraper_health_check_head ...'
312
+ end
313
+ # resource path
314
+ local_var_path = '/v1/ebay/health'
315
+
316
+ # query parameters
317
+ query_params = opts[:query_params] || {}
318
+
319
+ # header parameters
320
+ header_params = opts[:header_params] || {}
321
+ # HTTP header 'Accept' (if needed)
322
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
323
+
324
+ # form parameters
325
+ form_params = opts[:form_params] || {}
326
+
327
+ # http body (model)
328
+ post_body = opts[:debug_body]
329
+
330
+ # return_type
331
+ return_type = opts[:debug_return_type] || 'Object'
332
+
333
+ # auth_names
334
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
335
+
336
+ new_options = opts.merge(
337
+ :operation => :"EBayApi.ebay_ebay_scraper_health_check_head",
338
+ :header_params => header_params,
339
+ :query_params => query_params,
340
+ :form_params => form_params,
341
+ :body => post_body,
342
+ :auth_names => auth_names,
343
+ :return_type => return_type
344
+ )
345
+
346
+ data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug "API called: EBayApi#ebay_ebay_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ end
350
+ return data, status_code, headers
351
+ end
352
+
353
+ # Get item detail
354
+ # Get a single eBay listing's full detail.
355
+ # @param item_id [String]
356
+ # @param [Hash] opts the optional parameters
357
+ # @option opts [String] :domain (default to 'com')
358
+ # @return [Object]
359
+ def ebay_get_item_detail(item_id, opts = {})
360
+ data, _status_code, _headers = ebay_get_item_detail_with_http_info(item_id, opts)
361
+ data
362
+ end
363
+
364
+ # Get item detail
365
+ # Get a single eBay listing&#39;s full detail.
366
+ # @param item_id [String]
367
+ # @param [Hash] opts the optional parameters
368
+ # @option opts [String] :domain (default to 'com')
369
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
370
+ def ebay_get_item_detail_with_http_info(item_id, opts = {})
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_get_item_detail ...'
373
+ end
374
+ # verify the required parameter 'item_id' is set
375
+ if @api_client.config.client_side_validation && item_id.nil?
376
+ fail ArgumentError, "Missing the required parameter 'item_id' when calling EBayApi.ebay_get_item_detail"
377
+ end
378
+ # resource path
379
+ local_var_path = '/v1/ebay/items/{item_id}'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
384
+
385
+ # header parameters
386
+ header_params = opts[:header_params] || {}
387
+ # HTTP header 'Accept' (if needed)
388
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
389
+
390
+ # form parameters
391
+ form_params = opts[:form_params] || {}
392
+
393
+ # http body (model)
394
+ post_body = opts[:debug_body]
395
+
396
+ # return_type
397
+ return_type = opts[:debug_return_type] || 'Object'
398
+
399
+ # auth_names
400
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
401
+
402
+ new_options = opts.merge(
403
+ :operation => :"EBayApi.ebay_get_item_detail",
404
+ :header_params => header_params,
405
+ :query_params => query_params,
406
+ :form_params => form_params,
407
+ :body => post_body,
408
+ :auth_names => auth_names,
409
+ :return_type => return_type
410
+ )
411
+
412
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
413
+ if @api_client.config.debugging
414
+ @api_client.config.logger.debug "API called: EBayApi#ebay_get_item_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
415
+ end
416
+ return data, status_code, headers
417
+ end
418
+
419
+ # Get item reviews
420
+ # Get catalog product reviews shown on an eBay listing.
421
+ # @param item_id [String]
422
+ # @param [Hash] opts the optional parameters
423
+ # @option opts [String] :domain (default to 'com')
424
+ # @option opts [Integer] :page (default to 1)
425
+ # @return [Object]
426
+ def ebay_get_item_reviews(item_id, opts = {})
427
+ data, _status_code, _headers = ebay_get_item_reviews_with_http_info(item_id, opts)
428
+ data
429
+ end
430
+
431
+ # Get item reviews
432
+ # Get catalog product reviews shown on an eBay listing.
433
+ # @param item_id [String]
434
+ # @param [Hash] opts the optional parameters
435
+ # @option opts [String] :domain (default to 'com')
436
+ # @option opts [Integer] :page (default to 1)
437
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
438
+ def ebay_get_item_reviews_with_http_info(item_id, opts = {})
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_get_item_reviews ...'
441
+ end
442
+ # verify the required parameter 'item_id' is set
443
+ if @api_client.config.client_side_validation && item_id.nil?
444
+ fail ArgumentError, "Missing the required parameter 'item_id' when calling EBayApi.ebay_get_item_reviews"
445
+ end
446
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 50
447
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_get_item_reviews, must be smaller than or equal to 50.'
448
+ end
449
+
450
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
451
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_get_item_reviews, must be greater than or equal to 1.'
452
+ end
453
+
454
+ # resource path
455
+ local_var_path = '/v1/ebay/items/{item_id}/reviews'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))
456
+
457
+ # query parameters
458
+ query_params = opts[:query_params] || {}
459
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
460
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
461
+
462
+ # header parameters
463
+ header_params = opts[:header_params] || {}
464
+ # HTTP header 'Accept' (if needed)
465
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
466
+
467
+ # form parameters
468
+ form_params = opts[:form_params] || {}
469
+
470
+ # http body (model)
471
+ post_body = opts[:debug_body]
472
+
473
+ # return_type
474
+ return_type = opts[:debug_return_type] || 'Object'
475
+
476
+ # auth_names
477
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
478
+
479
+ new_options = opts.merge(
480
+ :operation => :"EBayApi.ebay_get_item_reviews",
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => return_type
487
+ )
488
+
489
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug "API called: EBayApi#ebay_get_item_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
+ end
493
+ return data, status_code, headers
494
+ end
495
+
496
+ # Get seller feedback
497
+ # Get a seller's recent feedback comments.
498
+ # @param username [String]
499
+ # @param [Hash] opts the optional parameters
500
+ # @option opts [String] :domain (default to 'com')
501
+ # @option opts [Integer] :page (default to 1)
502
+ # @return [Object]
503
+ def ebay_get_seller_feedback(username, opts = {})
504
+ data, _status_code, _headers = ebay_get_seller_feedback_with_http_info(username, opts)
505
+ data
506
+ end
507
+
508
+ # Get seller feedback
509
+ # Get a seller&#39;s recent feedback comments.
510
+ # @param username [String]
511
+ # @param [Hash] opts the optional parameters
512
+ # @option opts [String] :domain (default to 'com')
513
+ # @option opts [Integer] :page (default to 1)
514
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
515
+ def ebay_get_seller_feedback_with_http_info(username, opts = {})
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_get_seller_feedback ...'
518
+ end
519
+ # verify the required parameter 'username' is set
520
+ if @api_client.config.client_side_validation && username.nil?
521
+ fail ArgumentError, "Missing the required parameter 'username' when calling EBayApi.ebay_get_seller_feedback"
522
+ end
523
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 50
524
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_get_seller_feedback, must be smaller than or equal to 50.'
525
+ end
526
+
527
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
528
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_get_seller_feedback, must be greater than or equal to 1.'
529
+ end
530
+
531
+ # resource path
532
+ local_var_path = '/v1/ebay/sellers/{username}/feedback'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
533
+
534
+ # query parameters
535
+ query_params = opts[:query_params] || {}
536
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
537
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
538
+
539
+ # header parameters
540
+ header_params = opts[:header_params] || {}
541
+ # HTTP header 'Accept' (if needed)
542
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
543
+
544
+ # form parameters
545
+ form_params = opts[:form_params] || {}
546
+
547
+ # http body (model)
548
+ post_body = opts[:debug_body]
549
+
550
+ # return_type
551
+ return_type = opts[:debug_return_type] || 'Object'
552
+
553
+ # auth_names
554
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
555
+
556
+ new_options = opts.merge(
557
+ :operation => :"EBayApi.ebay_get_seller_feedback",
558
+ :header_params => header_params,
559
+ :query_params => query_params,
560
+ :form_params => form_params,
561
+ :body => post_body,
562
+ :auth_names => auth_names,
563
+ :return_type => return_type
564
+ )
565
+
566
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
567
+ if @api_client.config.debugging
568
+ @api_client.config.logger.debug "API called: EBayApi#ebay_get_seller_feedback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
569
+ end
570
+ return data, status_code, headers
571
+ end
572
+
573
+ # Get seller listings
574
+ # List the active listings of a single eBay seller.
575
+ # @param username [String]
576
+ # @param [Hash] opts the optional parameters
577
+ # @option opts [String] :domain (default to 'com')
578
+ # @option opts [String] :query
579
+ # @option opts [Integer] :page (default to 1)
580
+ # @option opts [Integer] :per_page
581
+ # @return [Object]
582
+ def ebay_get_seller_listings(username, opts = {})
583
+ data, _status_code, _headers = ebay_get_seller_listings_with_http_info(username, opts)
584
+ data
585
+ end
586
+
587
+ # Get seller listings
588
+ # List the active listings of a single eBay seller.
589
+ # @param username [String]
590
+ # @param [Hash] opts the optional parameters
591
+ # @option opts [String] :domain (default to 'com')
592
+ # @option opts [String] :query
593
+ # @option opts [Integer] :page (default to 1)
594
+ # @option opts [Integer] :per_page
595
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
596
+ def ebay_get_seller_listings_with_http_info(username, opts = {})
597
+ if @api_client.config.debugging
598
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_get_seller_listings ...'
599
+ end
600
+ # verify the required parameter 'username' is set
601
+ if @api_client.config.client_side_validation && username.nil?
602
+ fail ArgumentError, "Missing the required parameter 'username' when calling EBayApi.ebay_get_seller_listings"
603
+ end
604
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
605
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_get_seller_listings, must be smaller than or equal to 100.'
606
+ end
607
+
608
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
609
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_get_seller_listings, must be greater than or equal to 1.'
610
+ end
611
+
612
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 240
613
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_get_seller_listings, must be smaller than or equal to 240.'
614
+ end
615
+
616
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
617
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_get_seller_listings, must be greater than or equal to 1.'
618
+ end
619
+
620
+ # resource path
621
+ local_var_path = '/v1/ebay/sellers/{username}/items'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
622
+
623
+ # query parameters
624
+ query_params = opts[:query_params] || {}
625
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
626
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
627
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
628
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
629
+
630
+ # header parameters
631
+ header_params = opts[:header_params] || {}
632
+ # HTTP header 'Accept' (if needed)
633
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
634
+
635
+ # form parameters
636
+ form_params = opts[:form_params] || {}
637
+
638
+ # http body (model)
639
+ post_body = opts[:debug_body]
640
+
641
+ # return_type
642
+ return_type = opts[:debug_return_type] || 'Object'
643
+
644
+ # auth_names
645
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
646
+
647
+ new_options = opts.merge(
648
+ :operation => :"EBayApi.ebay_get_seller_listings",
649
+ :header_params => header_params,
650
+ :query_params => query_params,
651
+ :form_params => form_params,
652
+ :body => post_body,
653
+ :auth_names => auth_names,
654
+ :return_type => return_type
655
+ )
656
+
657
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
658
+ if @api_client.config.debugging
659
+ @api_client.config.logger.debug "API called: EBayApi#ebay_get_seller_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
660
+ end
661
+ return data, status_code, headers
662
+ end
663
+
664
+ # Get seller profile
665
+ # Get an eBay seller's public profile.
666
+ # @param username [String]
667
+ # @param [Hash] opts the optional parameters
668
+ # @option opts [String] :domain (default to 'com')
669
+ # @return [Object]
670
+ def ebay_get_seller_profile(username, opts = {})
671
+ data, _status_code, _headers = ebay_get_seller_profile_with_http_info(username, opts)
672
+ data
673
+ end
674
+
675
+ # Get seller profile
676
+ # Get an eBay seller&#39;s public profile.
677
+ # @param username [String]
678
+ # @param [Hash] opts the optional parameters
679
+ # @option opts [String] :domain (default to 'com')
680
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
681
+ def ebay_get_seller_profile_with_http_info(username, opts = {})
682
+ if @api_client.config.debugging
683
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_get_seller_profile ...'
684
+ end
685
+ # verify the required parameter 'username' is set
686
+ if @api_client.config.client_side_validation && username.nil?
687
+ fail ArgumentError, "Missing the required parameter 'username' when calling EBayApi.ebay_get_seller_profile"
688
+ end
689
+ # resource path
690
+ local_var_path = '/v1/ebay/sellers/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
691
+
692
+ # query parameters
693
+ query_params = opts[:query_params] || {}
694
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
695
+
696
+ # header parameters
697
+ header_params = opts[:header_params] || {}
698
+ # HTTP header 'Accept' (if needed)
699
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
700
+
701
+ # form parameters
702
+ form_params = opts[:form_params] || {}
703
+
704
+ # http body (model)
705
+ post_body = opts[:debug_body]
706
+
707
+ # return_type
708
+ return_type = opts[:debug_return_type] || 'Object'
709
+
710
+ # auth_names
711
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
712
+
713
+ new_options = opts.merge(
714
+ :operation => :"EBayApi.ebay_get_seller_profile",
715
+ :header_params => header_params,
716
+ :query_params => query_params,
717
+ :form_params => form_params,
718
+ :body => post_body,
719
+ :auth_names => auth_names,
720
+ :return_type => return_type
721
+ )
722
+
723
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
724
+ if @api_client.config.debugging
725
+ @api_client.config.logger.debug "API called: EBayApi#ebay_get_seller_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
726
+ end
727
+ return data, status_code, headers
728
+ end
729
+
730
+ # Keyword suggestions
731
+ # Return eBay keyword autocomplete suggestions.
732
+ # @param query [String] Partial query prefix
733
+ # @param [Hash] opts the optional parameters
734
+ # @option opts [String] :domain (default to 'com')
735
+ # @return [Object]
736
+ def ebay_keyword_suggestions(query, opts = {})
737
+ data, _status_code, _headers = ebay_keyword_suggestions_with_http_info(query, opts)
738
+ data
739
+ end
740
+
741
+ # Keyword suggestions
742
+ # Return eBay keyword autocomplete suggestions.
743
+ # @param query [String] Partial query prefix
744
+ # @param [Hash] opts the optional parameters
745
+ # @option opts [String] :domain (default to 'com')
746
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
747
+ def ebay_keyword_suggestions_with_http_info(query, opts = {})
748
+ if @api_client.config.debugging
749
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_keyword_suggestions ...'
750
+ end
751
+ # verify the required parameter 'query' is set
752
+ if @api_client.config.client_side_validation && query.nil?
753
+ fail ArgumentError, "Missing the required parameter 'query' when calling EBayApi.ebay_keyword_suggestions"
754
+ end
755
+ # resource path
756
+ local_var_path = '/v1/ebay/autocomplete'
757
+
758
+ # query parameters
759
+ query_params = opts[:query_params] || {}
760
+ query_params[:'query'] = query
761
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
762
+
763
+ # header parameters
764
+ header_params = opts[:header_params] || {}
765
+ # HTTP header 'Accept' (if needed)
766
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
767
+
768
+ # form parameters
769
+ form_params = opts[:form_params] || {}
770
+
771
+ # http body (model)
772
+ post_body = opts[:debug_body]
773
+
774
+ # return_type
775
+ return_type = opts[:debug_return_type] || 'Object'
776
+
777
+ # auth_names
778
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
779
+
780
+ new_options = opts.merge(
781
+ :operation => :"EBayApi.ebay_keyword_suggestions",
782
+ :header_params => header_params,
783
+ :query_params => query_params,
784
+ :form_params => form_params,
785
+ :body => post_body,
786
+ :auth_names => auth_names,
787
+ :return_type => return_type
788
+ )
789
+
790
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
791
+ if @api_client.config.debugging
792
+ @api_client.config.logger.debug "API called: EBayApi#ebay_keyword_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
793
+ end
794
+ return data, status_code, headers
795
+ end
796
+
797
+ # List categories
798
+ # List eBay's top-level category ids.
799
+ # @param [Hash] opts the optional parameters
800
+ # @return [Object]
801
+ def ebay_list_categories(opts = {})
802
+ data, _status_code, _headers = ebay_list_categories_with_http_info(opts)
803
+ data
804
+ end
805
+
806
+ # List categories
807
+ # List eBay&#39;s top-level category ids.
808
+ # @param [Hash] opts the optional parameters
809
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
810
+ def ebay_list_categories_with_http_info(opts = {})
811
+ if @api_client.config.debugging
812
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_list_categories ...'
813
+ end
814
+ # resource path
815
+ local_var_path = '/v1/ebay/categories'
816
+
817
+ # query parameters
818
+ query_params = opts[:query_params] || {}
819
+
820
+ # header parameters
821
+ header_params = opts[:header_params] || {}
822
+ # HTTP header 'Accept' (if needed)
823
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
824
+
825
+ # form parameters
826
+ form_params = opts[:form_params] || {}
827
+
828
+ # http body (model)
829
+ post_body = opts[:debug_body]
830
+
831
+ # return_type
832
+ return_type = opts[:debug_return_type] || 'Object'
833
+
834
+ # auth_names
835
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
836
+
837
+ new_options = opts.merge(
838
+ :operation => :"EBayApi.ebay_list_categories",
839
+ :header_params => header_params,
840
+ :query_params => query_params,
841
+ :form_params => form_params,
842
+ :body => post_body,
843
+ :auth_names => auth_names,
844
+ :return_type => return_type
845
+ )
846
+
847
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
848
+ if @api_client.config.debugging
849
+ @api_client.config.logger.debug "API called: EBayApi#ebay_list_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
850
+ end
851
+ return data, status_code, headers
852
+ end
853
+
854
+ # List markets
855
+ # List all supported eBay marketplaces.
856
+ # @param [Hash] opts the optional parameters
857
+ # @return [Object]
858
+ def ebay_list_markets(opts = {})
859
+ data, _status_code, _headers = ebay_list_markets_with_http_info(opts)
860
+ data
861
+ end
862
+
863
+ # List markets
864
+ # List all supported eBay marketplaces.
865
+ # @param [Hash] opts the optional parameters
866
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
867
+ def ebay_list_markets_with_http_info(opts = {})
868
+ if @api_client.config.debugging
869
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_list_markets ...'
870
+ end
871
+ # resource path
872
+ local_var_path = '/v1/ebay/markets'
873
+
874
+ # query parameters
875
+ query_params = opts[:query_params] || {}
876
+
877
+ # header parameters
878
+ header_params = opts[:header_params] || {}
879
+ # HTTP header 'Accept' (if needed)
880
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
881
+
882
+ # form parameters
883
+ form_params = opts[:form_params] || {}
884
+
885
+ # http body (model)
886
+ post_body = opts[:debug_body]
887
+
888
+ # return_type
889
+ return_type = opts[:debug_return_type] || 'Object'
890
+
891
+ # auth_names
892
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
893
+
894
+ new_options = opts.merge(
895
+ :operation => :"EBayApi.ebay_list_markets",
896
+ :header_params => header_params,
897
+ :query_params => query_params,
898
+ :form_params => form_params,
899
+ :body => post_body,
900
+ :auth_names => auth_names,
901
+ :return_type => return_type
902
+ )
903
+
904
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
905
+ if @api_client.config.debugging
906
+ @api_client.config.logger.debug "API called: EBayApi#ebay_list_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
907
+ end
908
+ return data, status_code, headers
909
+ end
910
+
911
+ # Search listings
912
+ # Search an eBay marketplace for active listings.
913
+ # @param query [String] Search keywords
914
+ # @param [Hash] opts the optional parameters
915
+ # @option opts [String] :domain Marketplace domain (com, co.uk, de …) (default to 'com')
916
+ # @option opts [String] :category_id Restrict to a category id
917
+ # @option opts [Integer] :page (default to 1)
918
+ # @option opts [Integer] :per_page 60, 120 or 240
919
+ # @option opts [String] :sort_by best_match|ending_soonest|newly_listed|price_low_to_high|price_high_to_low (default to 'best_match')
920
+ # @option opts [String] :condition new|open_box|refurbished|used|for_parts
921
+ # @option opts [String] :buying_format auction|buy_it_now|best_offer
922
+ # @option opts [Float] :min_price
923
+ # @option opts [Float] :max_price
924
+ # @option opts [Boolean] :free_shipping (default to false)
925
+ # @return [Object]
926
+ def ebay_search_listings(query, opts = {})
927
+ data, _status_code, _headers = ebay_search_listings_with_http_info(query, opts)
928
+ data
929
+ end
930
+
931
+ # Search listings
932
+ # Search an eBay marketplace for active listings.
933
+ # @param query [String] Search keywords
934
+ # @param [Hash] opts the optional parameters
935
+ # @option opts [String] :domain Marketplace domain (com, co.uk, de …) (default to 'com')
936
+ # @option opts [String] :category_id Restrict to a category id
937
+ # @option opts [Integer] :page (default to 1)
938
+ # @option opts [Integer] :per_page 60, 120 or 240
939
+ # @option opts [String] :sort_by best_match|ending_soonest|newly_listed|price_low_to_high|price_high_to_low (default to 'best_match')
940
+ # @option opts [String] :condition new|open_box|refurbished|used|for_parts
941
+ # @option opts [String] :buying_format auction|buy_it_now|best_offer
942
+ # @option opts [Float] :min_price
943
+ # @option opts [Float] :max_price
944
+ # @option opts [Boolean] :free_shipping (default to false)
945
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
946
+ def ebay_search_listings_with_http_info(query, opts = {})
947
+ if @api_client.config.debugging
948
+ @api_client.config.logger.debug 'Calling API: EBayApi.ebay_search_listings ...'
949
+ end
950
+ # verify the required parameter 'query' is set
951
+ if @api_client.config.client_side_validation && query.nil?
952
+ fail ArgumentError, "Missing the required parameter 'query' when calling EBayApi.ebay_search_listings"
953
+ end
954
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
955
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_search_listings, must be smaller than or equal to 100.'
956
+ end
957
+
958
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
959
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EBayApi.ebay_search_listings, must be greater than or equal to 1.'
960
+ end
961
+
962
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 240
963
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_search_listings, must be smaller than or equal to 240.'
964
+ end
965
+
966
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
967
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling EBayApi.ebay_search_listings, must be greater than or equal to 1.'
968
+ end
969
+
970
+ if @api_client.config.client_side_validation && !opts[:'min_price'].nil? && opts[:'min_price'] < 0
971
+ fail ArgumentError, 'invalid value for "opts[:"min_price"]" when calling EBayApi.ebay_search_listings, must be greater than or equal to 0.'
972
+ end
973
+
974
+ if @api_client.config.client_side_validation && !opts[:'max_price'].nil? && opts[:'max_price'] < 0
975
+ fail ArgumentError, 'invalid value for "opts[:"max_price"]" when calling EBayApi.ebay_search_listings, must be greater than or equal to 0.'
976
+ end
977
+
978
+ # resource path
979
+ local_var_path = '/v1/ebay/search'
980
+
981
+ # query parameters
982
+ query_params = opts[:query_params] || {}
983
+ query_params[:'query'] = query
984
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
985
+ query_params[:'category_id'] = opts[:'category_id'] if !opts[:'category_id'].nil?
986
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
987
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
988
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
989
+ query_params[:'condition'] = opts[:'condition'] if !opts[:'condition'].nil?
990
+ query_params[:'buying_format'] = opts[:'buying_format'] if !opts[:'buying_format'].nil?
991
+ query_params[:'min_price'] = opts[:'min_price'] if !opts[:'min_price'].nil?
992
+ query_params[:'max_price'] = opts[:'max_price'] if !opts[:'max_price'].nil?
993
+ query_params[:'free_shipping'] = opts[:'free_shipping'] if !opts[:'free_shipping'].nil?
994
+
995
+ # header parameters
996
+ header_params = opts[:header_params] || {}
997
+ # HTTP header 'Accept' (if needed)
998
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
999
+
1000
+ # form parameters
1001
+ form_params = opts[:form_params] || {}
1002
+
1003
+ # http body (model)
1004
+ post_body = opts[:debug_body]
1005
+
1006
+ # return_type
1007
+ return_type = opts[:debug_return_type] || 'Object'
1008
+
1009
+ # auth_names
1010
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
1011
+
1012
+ new_options = opts.merge(
1013
+ :operation => :"EBayApi.ebay_search_listings",
1014
+ :header_params => header_params,
1015
+ :query_params => query_params,
1016
+ :form_params => form_params,
1017
+ :body => post_body,
1018
+ :auth_names => auth_names,
1019
+ :return_type => return_type
1020
+ )
1021
+
1022
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1023
+ if @api_client.config.debugging
1024
+ @api_client.config.logger.debug "API called: EBayApi#ebay_search_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1025
+ end
1026
+ return data, status_code, headers
1027
+ end
1028
+ end
1029
+ end