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,705 @@
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 VintedApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get item details
23
+ # Get detailed information about a Vinted item.
24
+ # @param item_id [Integer]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :market (default to 'fr')
27
+ # @return [Object]
28
+ def vinted_get_item_details(item_id, opts = {})
29
+ data, _status_code, _headers = vinted_get_item_details_with_http_info(item_id, opts)
30
+ data
31
+ end
32
+
33
+ # Get item details
34
+ # Get detailed information about a Vinted item.
35
+ # @param item_id [Integer]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :market (default to 'fr')
38
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
39
+ def vinted_get_item_details_with_http_info(item_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_get_item_details ...'
42
+ end
43
+ # verify the required parameter 'item_id' is set
44
+ if @api_client.config.client_side_validation && item_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'item_id' when calling VintedApi.vinted_get_item_details"
46
+ end
47
+ # resource path
48
+ local_var_path = '/v1/vinted/items/{item_id}'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'Object'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"VintedApi.vinted_get_item_details",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: VintedApi#vinted_get_item_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Get user profile
89
+ # Get a Vinted user's profile.
90
+ # @param user_id [Integer]
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [String] :market (default to 'fr')
93
+ # @return [Object]
94
+ def vinted_get_user_profile(user_id, opts = {})
95
+ data, _status_code, _headers = vinted_get_user_profile_with_http_info(user_id, opts)
96
+ data
97
+ end
98
+
99
+ # Get user profile
100
+ # Get a Vinted user&#39;s profile.
101
+ # @param user_id [Integer]
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :market (default to 'fr')
104
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
105
+ def vinted_get_user_profile_with_http_info(user_id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_get_user_profile ...'
108
+ end
109
+ # verify the required parameter 'user_id' is set
110
+ if @api_client.config.client_side_validation && user_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling VintedApi.vinted_get_user_profile"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v1/vinted/users/{user_id}'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
119
+
120
+ # header parameters
121
+ header_params = opts[:header_params] || {}
122
+ # HTTP header 'Accept' (if needed)
123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:debug_body]
130
+
131
+ # return_type
132
+ return_type = opts[:debug_return_type] || 'Object'
133
+
134
+ # auth_names
135
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
136
+
137
+ new_options = opts.merge(
138
+ :operation => :"VintedApi.vinted_get_user_profile",
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => return_type
145
+ )
146
+
147
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: VintedApi#vinted_get_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # Get user's listed items
155
+ # Get items listed by a Vinted user.
156
+ # @param user_id [Integer]
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [String] :market (default to 'fr')
159
+ # @option opts [Integer] :page (default to 1)
160
+ # @option opts [Integer] :per_page (default to 20)
161
+ # @return [Object]
162
+ def vinted_get_user_s_listed_items(user_id, opts = {})
163
+ data, _status_code, _headers = vinted_get_user_s_listed_items_with_http_info(user_id, opts)
164
+ data
165
+ end
166
+
167
+ # Get user&#39;s listed items
168
+ # Get items listed by a Vinted user.
169
+ # @param user_id [Integer]
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :market (default to 'fr')
172
+ # @option opts [Integer] :page (default to 1)
173
+ # @option opts [Integer] :per_page (default to 20)
174
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
175
+ def vinted_get_user_s_listed_items_with_http_info(user_id, opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_get_user_s_listed_items ...'
178
+ end
179
+ # verify the required parameter 'user_id' is set
180
+ if @api_client.config.client_side_validation && user_id.nil?
181
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling VintedApi.vinted_get_user_s_listed_items"
182
+ end
183
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
184
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VintedApi.vinted_get_user_s_listed_items, must be greater than or equal to 1.'
185
+ end
186
+
187
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 96
188
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling VintedApi.vinted_get_user_s_listed_items, must be smaller than or equal to 96.'
189
+ end
190
+
191
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
192
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling VintedApi.vinted_get_user_s_listed_items, must be greater than or equal to 1.'
193
+ end
194
+
195
+ # resource path
196
+ local_var_path = '/v1/vinted/users/{user_id}/items'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
197
+
198
+ # query parameters
199
+ query_params = opts[:query_params] || {}
200
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
201
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
202
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
203
+
204
+ # header parameters
205
+ header_params = opts[:header_params] || {}
206
+ # HTTP header 'Accept' (if needed)
207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
208
+
209
+ # form parameters
210
+ form_params = opts[:form_params] || {}
211
+
212
+ # http body (model)
213
+ post_body = opts[:debug_body]
214
+
215
+ # return_type
216
+ return_type = opts[:debug_return_type] || 'Object'
217
+
218
+ # auth_names
219
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
220
+
221
+ new_options = opts.merge(
222
+ :operation => :"VintedApi.vinted_get_user_s_listed_items",
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => return_type
229
+ )
230
+
231
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: VintedApi#vinted_get_user_s_listed_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+
238
+ # List colors
239
+ # Get available Vinted colors for filtering.
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [String] :market (default to 'fr')
242
+ # @return [Object]
243
+ def vinted_list_colors(opts = {})
244
+ data, _status_code, _headers = vinted_list_colors_with_http_info(opts)
245
+ data
246
+ end
247
+
248
+ # List colors
249
+ # Get available Vinted colors for filtering.
250
+ # @param [Hash] opts the optional parameters
251
+ # @option opts [String] :market (default to 'fr')
252
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
253
+ def vinted_list_colors_with_http_info(opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_list_colors ...'
256
+ end
257
+ # resource path
258
+ local_var_path = '/v1/vinted/colors'
259
+
260
+ # query parameters
261
+ query_params = opts[:query_params] || {}
262
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
263
+
264
+ # header parameters
265
+ header_params = opts[:header_params] || {}
266
+ # HTTP header 'Accept' (if needed)
267
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
268
+
269
+ # form parameters
270
+ form_params = opts[:form_params] || {}
271
+
272
+ # http body (model)
273
+ post_body = opts[:debug_body]
274
+
275
+ # return_type
276
+ return_type = opts[:debug_return_type] || 'Object'
277
+
278
+ # auth_names
279
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
280
+
281
+ new_options = opts.merge(
282
+ :operation => :"VintedApi.vinted_list_colors",
283
+ :header_params => header_params,
284
+ :query_params => query_params,
285
+ :form_params => form_params,
286
+ :body => post_body,
287
+ :auth_names => auth_names,
288
+ :return_type => return_type
289
+ )
290
+
291
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "API called: VintedApi#vinted_list_colors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
294
+ end
295
+ return data, status_code, headers
296
+ end
297
+
298
+ # List item conditions
299
+ # Get available item condition statuses.
300
+ # @param [Hash] opts the optional parameters
301
+ # @option opts [String] :market (default to 'fr')
302
+ # @return [Object]
303
+ def vinted_list_item_conditions(opts = {})
304
+ data, _status_code, _headers = vinted_list_item_conditions_with_http_info(opts)
305
+ data
306
+ end
307
+
308
+ # List item conditions
309
+ # Get available item condition statuses.
310
+ # @param [Hash] opts the optional parameters
311
+ # @option opts [String] :market (default to 'fr')
312
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
313
+ def vinted_list_item_conditions_with_http_info(opts = {})
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_list_item_conditions ...'
316
+ end
317
+ # resource path
318
+ local_var_path = '/v1/vinted/statuses'
319
+
320
+ # query parameters
321
+ query_params = opts[:query_params] || {}
322
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
323
+
324
+ # header parameters
325
+ header_params = opts[:header_params] || {}
326
+ # HTTP header 'Accept' (if needed)
327
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
328
+
329
+ # form parameters
330
+ form_params = opts[:form_params] || {}
331
+
332
+ # http body (model)
333
+ post_body = opts[:debug_body]
334
+
335
+ # return_type
336
+ return_type = opts[:debug_return_type] || 'Object'
337
+
338
+ # auth_names
339
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
340
+
341
+ new_options = opts.merge(
342
+ :operation => :"VintedApi.vinted_list_item_conditions",
343
+ :header_params => header_params,
344
+ :query_params => query_params,
345
+ :form_params => form_params,
346
+ :body => post_body,
347
+ :auth_names => auth_names,
348
+ :return_type => return_type
349
+ )
350
+
351
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug "API called: VintedApi#vinted_list_item_conditions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
354
+ end
355
+ return data, status_code, headers
356
+ end
357
+
358
+ # List markets
359
+ # List all supported Vinted markets.
360
+ # @param [Hash] opts the optional parameters
361
+ # @return [Object]
362
+ def vinted_list_markets(opts = {})
363
+ data, _status_code, _headers = vinted_list_markets_with_http_info(opts)
364
+ data
365
+ end
366
+
367
+ # List markets
368
+ # List all supported Vinted markets.
369
+ # @param [Hash] opts the optional parameters
370
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
371
+ def vinted_list_markets_with_http_info(opts = {})
372
+ if @api_client.config.debugging
373
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_list_markets ...'
374
+ end
375
+ # resource path
376
+ local_var_path = '/v1/vinted/markets'
377
+
378
+ # query parameters
379
+ query_params = opts[:query_params] || {}
380
+
381
+ # header parameters
382
+ header_params = opts[:header_params] || {}
383
+ # HTTP header 'Accept' (if needed)
384
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
385
+
386
+ # form parameters
387
+ form_params = opts[:form_params] || {}
388
+
389
+ # http body (model)
390
+ post_body = opts[:debug_body]
391
+
392
+ # return_type
393
+ return_type = opts[:debug_return_type] || 'Object'
394
+
395
+ # auth_names
396
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
397
+
398
+ new_options = opts.merge(
399
+ :operation => :"VintedApi.vinted_list_markets",
400
+ :header_params => header_params,
401
+ :query_params => query_params,
402
+ :form_params => form_params,
403
+ :body => post_body,
404
+ :auth_names => auth_names,
405
+ :return_type => return_type
406
+ )
407
+
408
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug "API called: VintedApi#vinted_list_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
411
+ end
412
+ return data, status_code, headers
413
+ end
414
+
415
+ # Search brands
416
+ # Search Vinted brands.
417
+ # @param keyword [String] Brand search keyword
418
+ # @param [Hash] opts the optional parameters
419
+ # @option opts [String] :market (default to 'fr')
420
+ # @return [Object]
421
+ def vinted_search_brands(keyword, opts = {})
422
+ data, _status_code, _headers = vinted_search_brands_with_http_info(keyword, opts)
423
+ data
424
+ end
425
+
426
+ # Search brands
427
+ # Search Vinted brands.
428
+ # @param keyword [String] Brand search keyword
429
+ # @param [Hash] opts the optional parameters
430
+ # @option opts [String] :market (default to 'fr')
431
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
432
+ def vinted_search_brands_with_http_info(keyword, opts = {})
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_search_brands ...'
435
+ end
436
+ # verify the required parameter 'keyword' is set
437
+ if @api_client.config.client_side_validation && keyword.nil?
438
+ fail ArgumentError, "Missing the required parameter 'keyword' when calling VintedApi.vinted_search_brands"
439
+ end
440
+ # resource path
441
+ local_var_path = '/v1/vinted/brands'
442
+
443
+ # query parameters
444
+ query_params = opts[:query_params] || {}
445
+ query_params[:'keyword'] = keyword
446
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
447
+
448
+ # header parameters
449
+ header_params = opts[:header_params] || {}
450
+ # HTTP header 'Accept' (if needed)
451
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
452
+
453
+ # form parameters
454
+ form_params = opts[:form_params] || {}
455
+
456
+ # http body (model)
457
+ post_body = opts[:debug_body]
458
+
459
+ # return_type
460
+ return_type = opts[:debug_return_type] || 'Object'
461
+
462
+ # auth_names
463
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
464
+
465
+ new_options = opts.merge(
466
+ :operation => :"VintedApi.vinted_search_brands",
467
+ :header_params => header_params,
468
+ :query_params => query_params,
469
+ :form_params => form_params,
470
+ :body => post_body,
471
+ :auth_names => auth_names,
472
+ :return_type => return_type
473
+ )
474
+
475
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
476
+ if @api_client.config.debugging
477
+ @api_client.config.logger.debug "API called: VintedApi#vinted_search_brands\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
478
+ end
479
+ return data, status_code, headers
480
+ end
481
+
482
+ # Search Vinted items
483
+ # Search Vinted catalog items with filters.
484
+ # @param query [String] Search text
485
+ # @param [Hash] opts the optional parameters
486
+ # @option opts [String] :market Market code (default to 'fr')
487
+ # @option opts [String] :seller_country Filter to items whose seller is physically located in one of these comma-separated ISO-2 country codes (e.g. &#39;fr&#39; or &#39;fr,be&#39;). Market domains federate cross-border EU listings and Vinted has no native country filter, so each item is enriched with its seller&#39;s country and non-matching ones are dropped. Adds 1 credit per uncached seller looked up (cached for 7 days).
488
+ # @option opts [Integer] :page (default to 1)
489
+ # @option opts [Integer] :per_page (default to 20)
490
+ # @option opts [Float] :price_from
491
+ # @option opts [Float] :price_to
492
+ # @option opts [String] :brand_ids
493
+ # @option opts [String] :catalog_ids Comma-separated Vinted catalog (category) IDs to restrict the search to, e.g. &#39;1904&#39; or &#39;1904,79&#39;. Vinted applies this before searching, so pagination totals reflect the filtered set. A catalog ID is the &#x60;catalog[]&#x60; value in a Vinted category URL (vinted.fr/catalog?catalog[]&#x3D;1904).
494
+ # @option opts [String] :color_ids Comma-separated color IDs
495
+ # @option opts [String] :status_ids Comma-separated condition/status IDs
496
+ # @option opts [String] :order
497
+ # @return [Object]
498
+ def vinted_search_vinted_items(query, opts = {})
499
+ data, _status_code, _headers = vinted_search_vinted_items_with_http_info(query, opts)
500
+ data
501
+ end
502
+
503
+ # Search Vinted items
504
+ # Search Vinted catalog items with filters.
505
+ # @param query [String] Search text
506
+ # @param [Hash] opts the optional parameters
507
+ # @option opts [String] :market Market code (default to 'fr')
508
+ # @option opts [String] :seller_country Filter to items whose seller is physically located in one of these comma-separated ISO-2 country codes (e.g. &#39;fr&#39; or &#39;fr,be&#39;). Market domains federate cross-border EU listings and Vinted has no native country filter, so each item is enriched with its seller&#39;s country and non-matching ones are dropped. Adds 1 credit per uncached seller looked up (cached for 7 days).
509
+ # @option opts [Integer] :page (default to 1)
510
+ # @option opts [Integer] :per_page (default to 20)
511
+ # @option opts [Float] :price_from
512
+ # @option opts [Float] :price_to
513
+ # @option opts [String] :brand_ids
514
+ # @option opts [String] :catalog_ids Comma-separated Vinted catalog (category) IDs to restrict the search to, e.g. &#39;1904&#39; or &#39;1904,79&#39;. Vinted applies this before searching, so pagination totals reflect the filtered set. A catalog ID is the &#x60;catalog[]&#x60; value in a Vinted category URL (vinted.fr/catalog?catalog[]&#x3D;1904).
515
+ # @option opts [String] :color_ids Comma-separated color IDs
516
+ # @option opts [String] :status_ids Comma-separated condition/status IDs
517
+ # @option opts [String] :order
518
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
519
+ def vinted_search_vinted_items_with_http_info(query, opts = {})
520
+ if @api_client.config.debugging
521
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_search_vinted_items ...'
522
+ end
523
+ # verify the required parameter 'query' is set
524
+ if @api_client.config.client_side_validation && query.nil?
525
+ fail ArgumentError, "Missing the required parameter 'query' when calling VintedApi.vinted_search_vinted_items"
526
+ end
527
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
528
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VintedApi.vinted_search_vinted_items, must be greater than or equal to 1.'
529
+ end
530
+
531
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 96
532
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling VintedApi.vinted_search_vinted_items, must be smaller than or equal to 96.'
533
+ end
534
+
535
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
536
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling VintedApi.vinted_search_vinted_items, must be greater than or equal to 1.'
537
+ end
538
+
539
+ # resource path
540
+ local_var_path = '/v1/vinted/search'
541
+
542
+ # query parameters
543
+ query_params = opts[:query_params] || {}
544
+ query_params[:'query'] = query
545
+ query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
546
+ query_params[:'seller_country'] = opts[:'seller_country'] if !opts[:'seller_country'].nil?
547
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
548
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
549
+ query_params[:'price_from'] = opts[:'price_from'] if !opts[:'price_from'].nil?
550
+ query_params[:'price_to'] = opts[:'price_to'] if !opts[:'price_to'].nil?
551
+ query_params[:'brand_ids'] = opts[:'brand_ids'] if !opts[:'brand_ids'].nil?
552
+ query_params[:'catalog_ids'] = opts[:'catalog_ids'] if !opts[:'catalog_ids'].nil?
553
+ query_params[:'color_ids'] = opts[:'color_ids'] if !opts[:'color_ids'].nil?
554
+ query_params[:'status_ids'] = opts[:'status_ids'] if !opts[:'status_ids'].nil?
555
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
556
+
557
+ # header parameters
558
+ header_params = opts[:header_params] || {}
559
+ # HTTP header 'Accept' (if needed)
560
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
561
+
562
+ # form parameters
563
+ form_params = opts[:form_params] || {}
564
+
565
+ # http body (model)
566
+ post_body = opts[:debug_body]
567
+
568
+ # return_type
569
+ return_type = opts[:debug_return_type] || 'Object'
570
+
571
+ # auth_names
572
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
573
+
574
+ new_options = opts.merge(
575
+ :operation => :"VintedApi.vinted_search_vinted_items",
576
+ :header_params => header_params,
577
+ :query_params => query_params,
578
+ :form_params => form_params,
579
+ :body => post_body,
580
+ :auth_names => auth_names,
581
+ :return_type => return_type
582
+ )
583
+
584
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
585
+ if @api_client.config.debugging
586
+ @api_client.config.logger.debug "API called: VintedApi#vinted_search_vinted_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
587
+ end
588
+ return data, status_code, headers
589
+ end
590
+
591
+ # Vinted scraper health check
592
+ # Check health of the Vinted scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
593
+ # @param [Hash] opts the optional parameters
594
+ # @return [Object]
595
+ def vinted_vinted_scraper_health_check(opts = {})
596
+ data, _status_code, _headers = vinted_vinted_scraper_health_check_with_http_info(opts)
597
+ data
598
+ end
599
+
600
+ # Vinted scraper health check
601
+ # Check health of the Vinted scraper service. Accepts &#x60;&#x60;HEAD&#x60;&#x60; so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don&#39;t get a 405 Method Not Allowed.
602
+ # @param [Hash] opts the optional parameters
603
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
604
+ def vinted_vinted_scraper_health_check_with_http_info(opts = {})
605
+ if @api_client.config.debugging
606
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_vinted_scraper_health_check ...'
607
+ end
608
+ # resource path
609
+ local_var_path = '/v1/vinted/health'
610
+
611
+ # query parameters
612
+ query_params = opts[:query_params] || {}
613
+
614
+ # header parameters
615
+ header_params = opts[:header_params] || {}
616
+ # HTTP header 'Accept' (if needed)
617
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
618
+
619
+ # form parameters
620
+ form_params = opts[:form_params] || {}
621
+
622
+ # http body (model)
623
+ post_body = opts[:debug_body]
624
+
625
+ # return_type
626
+ return_type = opts[:debug_return_type] || 'Object'
627
+
628
+ # auth_names
629
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
630
+
631
+ new_options = opts.merge(
632
+ :operation => :"VintedApi.vinted_vinted_scraper_health_check",
633
+ :header_params => header_params,
634
+ :query_params => query_params,
635
+ :form_params => form_params,
636
+ :body => post_body,
637
+ :auth_names => auth_names,
638
+ :return_type => return_type
639
+ )
640
+
641
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
642
+ if @api_client.config.debugging
643
+ @api_client.config.logger.debug "API called: VintedApi#vinted_vinted_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
644
+ end
645
+ return data, status_code, headers
646
+ end
647
+
648
+ # Vinted scraper health check
649
+ # Check health of the Vinted scraper service. Accepts ``HEAD`` so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don't get a 405 Method Not Allowed.
650
+ # @param [Hash] opts the optional parameters
651
+ # @return [Object]
652
+ def vinted_vinted_scraper_health_check_head(opts = {})
653
+ data, _status_code, _headers = vinted_vinted_scraper_health_check_head_with_http_info(opts)
654
+ data
655
+ end
656
+
657
+ # Vinted scraper health check
658
+ # Check health of the Vinted scraper service. Accepts &#x60;&#x60;HEAD&#x60;&#x60; so external uptime checkers (UptimeRobot uses HEAD by default for HTTP monitors) don&#39;t get a 405 Method Not Allowed.
659
+ # @param [Hash] opts the optional parameters
660
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
661
+ def vinted_vinted_scraper_health_check_head_with_http_info(opts = {})
662
+ if @api_client.config.debugging
663
+ @api_client.config.logger.debug 'Calling API: VintedApi.vinted_vinted_scraper_health_check_head ...'
664
+ end
665
+ # resource path
666
+ local_var_path = '/v1/vinted/health'
667
+
668
+ # query parameters
669
+ query_params = opts[:query_params] || {}
670
+
671
+ # header parameters
672
+ header_params = opts[:header_params] || {}
673
+ # HTTP header 'Accept' (if needed)
674
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
675
+
676
+ # form parameters
677
+ form_params = opts[:form_params] || {}
678
+
679
+ # http body (model)
680
+ post_body = opts[:debug_body]
681
+
682
+ # return_type
683
+ return_type = opts[:debug_return_type] || 'Object'
684
+
685
+ # auth_names
686
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
687
+
688
+ new_options = opts.merge(
689
+ :operation => :"VintedApi.vinted_vinted_scraper_health_check_head",
690
+ :header_params => header_params,
691
+ :query_params => query_params,
692
+ :form_params => form_params,
693
+ :body => post_body,
694
+ :auth_names => auth_names,
695
+ :return_type => return_type
696
+ )
697
+
698
+ data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
699
+ if @api_client.config.debugging
700
+ @api_client.config.logger.debug "API called: VintedApi#vinted_vinted_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
701
+ end
702
+ return data, status_code, headers
703
+ end
704
+ end
705
+ end