scrapebadger 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +548 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +76 -0
- data/docs/AccountInfo.md +28 -0
- data/docs/AmazonApi.md +1244 -0
- data/docs/ApartmentsApi.md +373 -0
- data/docs/BaiduApi.md +447 -0
- data/docs/BillingLogListResponse.md +24 -0
- data/docs/BillingLogResponse.md +32 -0
- data/docs/BingApi.md +610 -0
- data/docs/ChatGPTApi.md +521 -0
- data/docs/DepopApi.md +542 -0
- data/docs/DuckDuckGoApi.md +700 -0
- data/docs/EBayApi.md +1019 -0
- data/docs/FacebookApi.md +1671 -0
- data/docs/FilterRuleCreate.md +28 -0
- data/docs/FilterRuleDeliveryLogListResponse.md +24 -0
- data/docs/FilterRuleDeliveryLogResponse.md +44 -0
- data/docs/FilterRuleListResponse.md +24 -0
- data/docs/FilterRuleResponse.md +40 -0
- data/docs/FilterRuleUpdate.md +30 -0
- data/docs/FilterRuleValidateRequest.md +18 -0
- data/docs/FilterRuleValidateResponse.md +22 -0
- data/docs/GoogleApi.md +3175 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdealistaApi.md +822 -0
- data/docs/ImmobiliareApi.md +773 -0
- data/docs/InstagramApi.md +1673 -0
- data/docs/LeboncoinApi.md +884 -0
- data/docs/LinkedInApi.md +925 -0
- data/docs/LoopNetApi.md +529 -0
- data/docs/PortalApiRoutersV1TwitterFilterRulesFilterRulePricingResponse.md +20 -0
- data/docs/RealtorApi.md +474 -0
- data/docs/RedditApi.md +1677 -0
- data/docs/RedfinApi.md +616 -0
- data/docs/StreamMonitorCreate.md +26 -0
- data/docs/StreamMonitorListResponse.md +24 -0
- data/docs/StreamMonitorResponse.md +42 -0
- data/docs/StreamMonitorUpdate.md +28 -0
- data/docs/SubscriptionInfo.md +40 -0
- data/docs/TikTokApi.md +2104 -0
- data/docs/TweetDeliveryLogListResponse.md +24 -0
- data/docs/TweetDeliveryLogResponse.md +44 -0
- data/docs/TwitterApi.md +4091 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VintedApi.md +766 -0
- data/docs/WalmartApi.md +904 -0
- data/docs/WebApi.md +634 -0
- data/docs/WebhookCreate.md +22 -0
- data/docs/WebhookListItem.md +28 -0
- data/docs/WebhookListResponse.md +20 -0
- data/docs/WebhookResponse.md +26 -0
- data/docs/WebhookTestRequest.md +18 -0
- data/docs/WebhookTestResponse.md +24 -0
- data/docs/YahooApi.md +602 -0
- data/docs/YandexApi.md +450 -0
- data/docs/YouTubeApi.md +2872 -0
- data/docs/ZillowApi.md +622 -0
- data/git_push.sh +57 -0
- data/lib/scrapebadger/api/account_api.rb +79 -0
- data/lib/scrapebadger/api/amazon_api.rb +1165 -0
- data/lib/scrapebadger/api/apartments_api.rb +377 -0
- data/lib/scrapebadger/api/baidu_api.rb +436 -0
- data/lib/scrapebadger/api/bing_api.rb +580 -0
- data/lib/scrapebadger/api/chat_gpt_api.rb +466 -0
- data/lib/scrapebadger/api/depop_api.rb +518 -0
- data/lib/scrapebadger/api/duck_duck_go_api.rb +675 -0
- data/lib/scrapebadger/api/e_bay_api.rb +1029 -0
- data/lib/scrapebadger/api/facebook_api.rb +1492 -0
- data/lib/scrapebadger/api/google_api.rb +3191 -0
- data/lib/scrapebadger/api/idealista_api.rb +864 -0
- data/lib/scrapebadger/api/immobiliare_api.rb +734 -0
- data/lib/scrapebadger/api/instagram_api.rb +1555 -0
- data/lib/scrapebadger/api/leboncoin_api.rb +818 -0
- data/lib/scrapebadger/api/linked_in_api.rb +832 -0
- data/lib/scrapebadger/api/loop_net_api.rb +503 -0
- data/lib/scrapebadger/api/realtor_api.rb +481 -0
- data/lib/scrapebadger/api/reddit_api.rb +1601 -0
- data/lib/scrapebadger/api/redfin_api.rb +625 -0
- data/lib/scrapebadger/api/tik_tok_api.rb +2029 -0
- data/lib/scrapebadger/api/twitter_api.rb +3696 -0
- data/lib/scrapebadger/api/vinted_api.rb +705 -0
- data/lib/scrapebadger/api/walmart_api.rb +876 -0
- data/lib/scrapebadger/api/web_api.rb +547 -0
- data/lib/scrapebadger/api/yahoo_api.rb +560 -0
- data/lib/scrapebadger/api/yandex_api.rb +422 -0
- data/lib/scrapebadger/api/you_tube_api.rb +2520 -0
- data/lib/scrapebadger/api/zillow_api.rb +634 -0
- data/lib/scrapebadger/api_client.rb +394 -0
- data/lib/scrapebadger/api_error.rb +58 -0
- data/lib/scrapebadger/configuration.rb +308 -0
- data/lib/scrapebadger/models/account_info.rb +288 -0
- data/lib/scrapebadger/models/billing_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/billing_log_response.rb +334 -0
- data/lib/scrapebadger/models/filter_rule_create.rb +427 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/filter_rule_list_response.rb +272 -0
- data/lib/scrapebadger/models/filter_rule_response.rb +390 -0
- data/lib/scrapebadger/models/filter_rule_update.rb +389 -0
- data/lib/scrapebadger/models/filter_rule_validate_request.rb +250 -0
- data/lib/scrapebadger/models/filter_rule_validate_response.rb +248 -0
- data/lib/scrapebadger/models/http_validation_error.rb +216 -0
- data/lib/scrapebadger/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response.rb +238 -0
- data/lib/scrapebadger/models/stream_monitor_create.rb +373 -0
- data/lib/scrapebadger/models/stream_monitor_list_response.rb +272 -0
- data/lib/scrapebadger/models/stream_monitor_response.rb +406 -0
- data/lib/scrapebadger/models/stream_monitor_update.rb +335 -0
- data/lib/scrapebadger/models/subscription_info.rb +352 -0
- data/lib/scrapebadger/models/tweet_delivery_log_list_response.rb +272 -0
- data/lib/scrapebadger/models/tweet_delivery_log_response.rb +422 -0
- data/lib/scrapebadger/models/validation_error.rb +255 -0
- data/lib/scrapebadger/models/validation_error_loc_inner.rb +104 -0
- data/lib/scrapebadger/models/webhook_create.rb +282 -0
- data/lib/scrapebadger/models/webhook_list_item.rb +302 -0
- data/lib/scrapebadger/models/webhook_list_response.rb +240 -0
- data/lib/scrapebadger/models/webhook_response.rb +286 -0
- data/lib/scrapebadger/models/webhook_test_request.rb +223 -0
- data/lib/scrapebadger/models/webhook_test_response.rb +259 -0
- data/lib/scrapebadger/version.rb +15 -0
- data/lib/scrapebadger.rb +96 -0
- data/scrapebadger.gemspec +39 -0
- data/spec/api/account_api_spec.rb +46 -0
- data/spec/api/amazon_api_spec.rb +258 -0
- data/spec/api/apartments_api_spec.rb +98 -0
- data/spec/api/baidu_api_spec.rb +109 -0
- data/spec/api/bing_api_spec.rb +141 -0
- data/spec/api/chat_gpt_api_spec.rb +123 -0
- data/spec/api/depop_api_spec.rb +132 -0
- data/spec/api/duck_duck_go_api_spec.rb +162 -0
- data/spec/api/e_bay_api_spec.rb +222 -0
- data/spec/api/facebook_api_spec.rb +326 -0
- data/spec/api/google_api_spec.rb +649 -0
- data/spec/api/idealista_api_spec.rb +197 -0
- data/spec/api/immobiliare_api_spec.rb +174 -0
- data/spec/api/instagram_api_spec.rb +309 -0
- data/spec/api/leboncoin_api_spec.rb +184 -0
- data/spec/api/linked_in_api_spec.rb +197 -0
- data/spec/api/loop_net_api_spec.rb +127 -0
- data/spec/api/realtor_api_spec.rb +123 -0
- data/spec/api/reddit_api_spec.rb +331 -0
- data/spec/api/redfin_api_spec.rb +147 -0
- data/spec/api/tik_tok_api_spec.rb +413 -0
- data/spec/api/twitter_api_spec.rb +735 -0
- data/spec/api/vinted_api_spec.rb +169 -0
- data/spec/api/walmart_api_spec.rb +192 -0
- data/spec/api/web_api_spec.rb +136 -0
- data/spec/api/yahoo_api_spec.rb +137 -0
- data/spec/api/yandex_api_spec.rb +111 -0
- data/spec/api/you_tube_api_spec.rb +500 -0
- data/spec/api/zillow_api_spec.rb +150 -0
- data/spec/models/account_info_spec.rb +66 -0
- data/spec/models/billing_log_list_response_spec.rb +54 -0
- data/spec/models/billing_log_response_spec.rb +78 -0
- data/spec/models/filter_rule_create_spec.rb +66 -0
- data/spec/models/filter_rule_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_delivery_log_response_spec.rb +114 -0
- data/spec/models/filter_rule_list_response_spec.rb +54 -0
- data/spec/models/filter_rule_response_spec.rb +102 -0
- data/spec/models/filter_rule_update_spec.rb +72 -0
- data/spec/models/filter_rule_validate_request_spec.rb +36 -0
- data/spec/models/filter_rule_validate_response_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/portal_api_routers_v1_twitter_filter_rules_filter_rule_pricing_response_spec.rb +42 -0
- data/spec/models/stream_monitor_create_spec.rb +60 -0
- data/spec/models/stream_monitor_list_response_spec.rb +54 -0
- data/spec/models/stream_monitor_response_spec.rb +108 -0
- data/spec/models/stream_monitor_update_spec.rb +66 -0
- data/spec/models/subscription_info_spec.rb +102 -0
- data/spec/models/tweet_delivery_log_list_response_spec.rb +54 -0
- data/spec/models/tweet_delivery_log_response_spec.rb +114 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +48 -0
- data/spec/models/webhook_list_item_spec.rb +66 -0
- data/spec/models/webhook_list_response_spec.rb +42 -0
- data/spec/models/webhook_response_spec.rb +60 -0
- data/spec/models/webhook_test_request_spec.rb +36 -0
- data/spec/models/webhook_test_response_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +324 -0
|
@@ -0,0 +1,518 @@
|
|
|
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 DepopApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Depop scraper health check
|
|
23
|
+
# Check health of the Depop scraper service (accepts HEAD).
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [Object]
|
|
26
|
+
def depop_depop_scraper_health_check(opts = {})
|
|
27
|
+
data, _status_code, _headers = depop_depop_scraper_health_check_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Depop scraper health check
|
|
32
|
+
# Check health of the Depop scraper service (accepts HEAD).
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
35
|
+
def depop_depop_scraper_health_check_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_depop_scraper_health_check ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/v1/depop/health'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"DepopApi.depop_depop_scraper_health_check",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_depop_scraper_health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Depop scraper health check
|
|
80
|
+
# Check health of the Depop scraper service (accepts HEAD).
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [Object]
|
|
83
|
+
def depop_depop_scraper_health_check_head(opts = {})
|
|
84
|
+
data, _status_code, _headers = depop_depop_scraper_health_check_head_with_http_info(opts)
|
|
85
|
+
data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Depop scraper health check
|
|
89
|
+
# Check health of the Depop scraper service (accepts HEAD).
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
92
|
+
def depop_depop_scraper_health_check_head_with_http_info(opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_depop_scraper_health_check_head ...'
|
|
95
|
+
end
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/v1/depop/health'
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
|
|
102
|
+
# header parameters
|
|
103
|
+
header_params = opts[:header_params] || {}
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:debug_body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:operation => :"DepopApi.depop_depop_scraper_health_check_head",
|
|
121
|
+
:header_params => header_params,
|
|
122
|
+
:query_params => query_params,
|
|
123
|
+
:form_params => form_params,
|
|
124
|
+
:body => post_body,
|
|
125
|
+
:auth_names => auth_names,
|
|
126
|
+
:return_type => return_type
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
|
|
130
|
+
if @api_client.config.debugging
|
|
131
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_depop_scraper_health_check_head\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Get a user's products
|
|
137
|
+
# A user's active listings (cursor-paginated).
|
|
138
|
+
# @param username [String]
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @option opts [String] :market Market code (default to 'us')
|
|
141
|
+
# @option opts [Integer] :per_page (default to 24)
|
|
142
|
+
# @option opts [String] :cursor Pagination cursor
|
|
143
|
+
# @return [Object]
|
|
144
|
+
def depop_get_a_user_s_products(username, opts = {})
|
|
145
|
+
data, _status_code, _headers = depop_get_a_user_s_products_with_http_info(username, opts)
|
|
146
|
+
data
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Get a user's products
|
|
150
|
+
# A user's active listings (cursor-paginated).
|
|
151
|
+
# @param username [String]
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @option opts [String] :market Market code (default to 'us')
|
|
154
|
+
# @option opts [Integer] :per_page (default to 24)
|
|
155
|
+
# @option opts [String] :cursor Pagination cursor
|
|
156
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
157
|
+
def depop_get_a_user_s_products_with_http_info(username, opts = {})
|
|
158
|
+
if @api_client.config.debugging
|
|
159
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_get_a_user_s_products ...'
|
|
160
|
+
end
|
|
161
|
+
# verify the required parameter 'username' is set
|
|
162
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
163
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling DepopApi.depop_get_a_user_s_products"
|
|
164
|
+
end
|
|
165
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
|
166
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DepopApi.depop_get_a_user_s_products, must be smaller than or equal to 100.'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
|
170
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DepopApi.depop_get_a_user_s_products, must be greater than or equal to 1.'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# resource path
|
|
174
|
+
local_var_path = '/v1/depop/users/{username}/products'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
175
|
+
|
|
176
|
+
# query parameters
|
|
177
|
+
query_params = opts[:query_params] || {}
|
|
178
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
179
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
180
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
181
|
+
|
|
182
|
+
# header parameters
|
|
183
|
+
header_params = opts[:header_params] || {}
|
|
184
|
+
# HTTP header 'Accept' (if needed)
|
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
186
|
+
|
|
187
|
+
# form parameters
|
|
188
|
+
form_params = opts[:form_params] || {}
|
|
189
|
+
|
|
190
|
+
# http body (model)
|
|
191
|
+
post_body = opts[:debug_body]
|
|
192
|
+
|
|
193
|
+
# return_type
|
|
194
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
195
|
+
|
|
196
|
+
# auth_names
|
|
197
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
198
|
+
|
|
199
|
+
new_options = opts.merge(
|
|
200
|
+
:operation => :"DepopApi.depop_get_a_user_s_products",
|
|
201
|
+
:header_params => header_params,
|
|
202
|
+
:query_params => query_params,
|
|
203
|
+
:form_params => form_params,
|
|
204
|
+
:body => post_body,
|
|
205
|
+
:auth_names => auth_names,
|
|
206
|
+
:return_type => return_type
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
210
|
+
if @api_client.config.debugging
|
|
211
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_get_a_user_s_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
212
|
+
end
|
|
213
|
+
return data, status_code, headers
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Get product detail
|
|
217
|
+
# Full detail for a single product (by numeric id or slug).
|
|
218
|
+
# @param product_id [String]
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @option opts [String] :market Market code (default to 'us')
|
|
221
|
+
# @return [Object]
|
|
222
|
+
def depop_get_product_detail(product_id, opts = {})
|
|
223
|
+
data, _status_code, _headers = depop_get_product_detail_with_http_info(product_id, opts)
|
|
224
|
+
data
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Get product detail
|
|
228
|
+
# Full detail for a single product (by numeric id or slug).
|
|
229
|
+
# @param product_id [String]
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @option opts [String] :market Market code (default to 'us')
|
|
232
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
233
|
+
def depop_get_product_detail_with_http_info(product_id, opts = {})
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_get_product_detail ...'
|
|
236
|
+
end
|
|
237
|
+
# verify the required parameter 'product_id' is set
|
|
238
|
+
if @api_client.config.client_side_validation && product_id.nil?
|
|
239
|
+
fail ArgumentError, "Missing the required parameter 'product_id' when calling DepopApi.depop_get_product_detail"
|
|
240
|
+
end
|
|
241
|
+
# resource path
|
|
242
|
+
local_var_path = '/v1/depop/products/{product_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s))
|
|
243
|
+
|
|
244
|
+
# query parameters
|
|
245
|
+
query_params = opts[:query_params] || {}
|
|
246
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = opts[:header_params] || {}
|
|
250
|
+
# HTTP header 'Accept' (if needed)
|
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
252
|
+
|
|
253
|
+
# form parameters
|
|
254
|
+
form_params = opts[:form_params] || {}
|
|
255
|
+
|
|
256
|
+
# http body (model)
|
|
257
|
+
post_body = opts[:debug_body]
|
|
258
|
+
|
|
259
|
+
# return_type
|
|
260
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
261
|
+
|
|
262
|
+
# auth_names
|
|
263
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
264
|
+
|
|
265
|
+
new_options = opts.merge(
|
|
266
|
+
:operation => :"DepopApi.depop_get_product_detail",
|
|
267
|
+
:header_params => header_params,
|
|
268
|
+
:query_params => query_params,
|
|
269
|
+
:form_params => form_params,
|
|
270
|
+
:body => post_body,
|
|
271
|
+
:auth_names => auth_names,
|
|
272
|
+
:return_type => return_type
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
276
|
+
if @api_client.config.debugging
|
|
277
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_get_product_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
278
|
+
end
|
|
279
|
+
return data, status_code, headers
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Get shop/user profile
|
|
283
|
+
# Public shop/user profile by username.
|
|
284
|
+
# @param username [String]
|
|
285
|
+
# @param [Hash] opts the optional parameters
|
|
286
|
+
# @option opts [String] :market Market code (default to 'us')
|
|
287
|
+
# @return [Object]
|
|
288
|
+
def depop_get_shop_user_profile(username, opts = {})
|
|
289
|
+
data, _status_code, _headers = depop_get_shop_user_profile_with_http_info(username, opts)
|
|
290
|
+
data
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Get shop/user profile
|
|
294
|
+
# Public shop/user profile by username.
|
|
295
|
+
# @param username [String]
|
|
296
|
+
# @param [Hash] opts the optional parameters
|
|
297
|
+
# @option opts [String] :market Market code (default to 'us')
|
|
298
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
299
|
+
def depop_get_shop_user_profile_with_http_info(username, opts = {})
|
|
300
|
+
if @api_client.config.debugging
|
|
301
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_get_shop_user_profile ...'
|
|
302
|
+
end
|
|
303
|
+
# verify the required parameter 'username' is set
|
|
304
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
305
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling DepopApi.depop_get_shop_user_profile"
|
|
306
|
+
end
|
|
307
|
+
# resource path
|
|
308
|
+
local_var_path = '/v1/depop/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
309
|
+
|
|
310
|
+
# query parameters
|
|
311
|
+
query_params = opts[:query_params] || {}
|
|
312
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
313
|
+
|
|
314
|
+
# header parameters
|
|
315
|
+
header_params = opts[:header_params] || {}
|
|
316
|
+
# HTTP header 'Accept' (if needed)
|
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
318
|
+
|
|
319
|
+
# form parameters
|
|
320
|
+
form_params = opts[:form_params] || {}
|
|
321
|
+
|
|
322
|
+
# http body (model)
|
|
323
|
+
post_body = opts[:debug_body]
|
|
324
|
+
|
|
325
|
+
# return_type
|
|
326
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
327
|
+
|
|
328
|
+
# auth_names
|
|
329
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
330
|
+
|
|
331
|
+
new_options = opts.merge(
|
|
332
|
+
:operation => :"DepopApi.depop_get_shop_user_profile",
|
|
333
|
+
:header_params => header_params,
|
|
334
|
+
:query_params => query_params,
|
|
335
|
+
:form_params => form_params,
|
|
336
|
+
:body => post_body,
|
|
337
|
+
:auth_names => auth_names,
|
|
338
|
+
:return_type => return_type
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_get_shop_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
344
|
+
end
|
|
345
|
+
return data, status_code, headers
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# List markets
|
|
349
|
+
# List supported Depop markets (country + currency).
|
|
350
|
+
# @param [Hash] opts the optional parameters
|
|
351
|
+
# @return [Object]
|
|
352
|
+
def depop_list_markets(opts = {})
|
|
353
|
+
data, _status_code, _headers = depop_list_markets_with_http_info(opts)
|
|
354
|
+
data
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# List markets
|
|
358
|
+
# List supported Depop markets (country + currency).
|
|
359
|
+
# @param [Hash] opts the optional parameters
|
|
360
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
361
|
+
def depop_list_markets_with_http_info(opts = {})
|
|
362
|
+
if @api_client.config.debugging
|
|
363
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_list_markets ...'
|
|
364
|
+
end
|
|
365
|
+
# resource path
|
|
366
|
+
local_var_path = '/v1/depop/markets'
|
|
367
|
+
|
|
368
|
+
# query parameters
|
|
369
|
+
query_params = opts[:query_params] || {}
|
|
370
|
+
|
|
371
|
+
# header parameters
|
|
372
|
+
header_params = opts[:header_params] || {}
|
|
373
|
+
# HTTP header 'Accept' (if needed)
|
|
374
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
375
|
+
|
|
376
|
+
# form parameters
|
|
377
|
+
form_params = opts[:form_params] || {}
|
|
378
|
+
|
|
379
|
+
# http body (model)
|
|
380
|
+
post_body = opts[:debug_body]
|
|
381
|
+
|
|
382
|
+
# return_type
|
|
383
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
384
|
+
|
|
385
|
+
# auth_names
|
|
386
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
387
|
+
|
|
388
|
+
new_options = opts.merge(
|
|
389
|
+
:operation => :"DepopApi.depop_list_markets",
|
|
390
|
+
:header_params => header_params,
|
|
391
|
+
:query_params => query_params,
|
|
392
|
+
:form_params => form_params,
|
|
393
|
+
:body => post_body,
|
|
394
|
+
:auth_names => auth_names,
|
|
395
|
+
:return_type => return_type
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
399
|
+
if @api_client.config.debugging
|
|
400
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_list_markets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
401
|
+
end
|
|
402
|
+
return data, status_code, headers
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Search Depop products
|
|
406
|
+
# Search the Depop catalog with filters (cursor-paginated).
|
|
407
|
+
# @param query [String] Search text, e.g. 'nike vintage'
|
|
408
|
+
# @param [Hash] opts the optional parameters
|
|
409
|
+
# @option opts [String] :market Market code (us, gb, au, it, fr, ...) (default to 'us')
|
|
410
|
+
# @option opts [Integer] :per_page Results per page (default to 24)
|
|
411
|
+
# @option opts [String] :cursor Pagination cursor (from previous page)
|
|
412
|
+
# @option opts [Float] :price_min Minimum price
|
|
413
|
+
# @option opts [Float] :price_max Maximum price
|
|
414
|
+
# @option opts [String] :brands Comma-separated brand IDs
|
|
415
|
+
# @option opts [String] :categories Comma-separated category IDs
|
|
416
|
+
# @option opts [String] :sizes Comma-separated size IDs
|
|
417
|
+
# @option opts [String] :conditions Comma-separated condition slugs (brand_new, used_excellent, ...)
|
|
418
|
+
# @option opts [String] :gender male | female
|
|
419
|
+
# @option opts [String] :sort relevance | newlyListed | priceAscending | priceDescending
|
|
420
|
+
# @return [Object]
|
|
421
|
+
def depop_search_depop_products(query, opts = {})
|
|
422
|
+
data, _status_code, _headers = depop_search_depop_products_with_http_info(query, opts)
|
|
423
|
+
data
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Search Depop products
|
|
427
|
+
# Search the Depop catalog with filters (cursor-paginated).
|
|
428
|
+
# @param query [String] Search text, e.g. 'nike vintage'
|
|
429
|
+
# @param [Hash] opts the optional parameters
|
|
430
|
+
# @option opts [String] :market Market code (us, gb, au, it, fr, ...) (default to 'us')
|
|
431
|
+
# @option opts [Integer] :per_page Results per page (default to 24)
|
|
432
|
+
# @option opts [String] :cursor Pagination cursor (from previous page)
|
|
433
|
+
# @option opts [Float] :price_min Minimum price
|
|
434
|
+
# @option opts [Float] :price_max Maximum price
|
|
435
|
+
# @option opts [String] :brands Comma-separated brand IDs
|
|
436
|
+
# @option opts [String] :categories Comma-separated category IDs
|
|
437
|
+
# @option opts [String] :sizes Comma-separated size IDs
|
|
438
|
+
# @option opts [String] :conditions Comma-separated condition slugs (brand_new, used_excellent, ...)
|
|
439
|
+
# @option opts [String] :gender male | female
|
|
440
|
+
# @option opts [String] :sort relevance | newlyListed | priceAscending | priceDescending
|
|
441
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
442
|
+
def depop_search_depop_products_with_http_info(query, opts = {})
|
|
443
|
+
if @api_client.config.debugging
|
|
444
|
+
@api_client.config.logger.debug 'Calling API: DepopApi.depop_search_depop_products ...'
|
|
445
|
+
end
|
|
446
|
+
# verify the required parameter 'query' is set
|
|
447
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
448
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling DepopApi.depop_search_depop_products"
|
|
449
|
+
end
|
|
450
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
|
451
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DepopApi.depop_search_depop_products, must be smaller than or equal to 100.'
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
|
455
|
+
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DepopApi.depop_search_depop_products, must be greater than or equal to 1.'
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
if @api_client.config.client_side_validation && !opts[:'price_min'].nil? && opts[:'price_min'] < 0
|
|
459
|
+
fail ArgumentError, 'invalid value for "opts[:"price_min"]" when calling DepopApi.depop_search_depop_products, must be greater than or equal to 0.'
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
if @api_client.config.client_side_validation && !opts[:'price_max'].nil? && opts[:'price_max'] < 0
|
|
463
|
+
fail ArgumentError, 'invalid value for "opts[:"price_max"]" when calling DepopApi.depop_search_depop_products, must be greater than or equal to 0.'
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# resource path
|
|
467
|
+
local_var_path = '/v1/depop/search'
|
|
468
|
+
|
|
469
|
+
# query parameters
|
|
470
|
+
query_params = opts[:query_params] || {}
|
|
471
|
+
query_params[:'query'] = query
|
|
472
|
+
query_params[:'market'] = opts[:'market'] if !opts[:'market'].nil?
|
|
473
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
474
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
475
|
+
query_params[:'price_min'] = opts[:'price_min'] if !opts[:'price_min'].nil?
|
|
476
|
+
query_params[:'price_max'] = opts[:'price_max'] if !opts[:'price_max'].nil?
|
|
477
|
+
query_params[:'brands'] = opts[:'brands'] if !opts[:'brands'].nil?
|
|
478
|
+
query_params[:'categories'] = opts[:'categories'] if !opts[:'categories'].nil?
|
|
479
|
+
query_params[:'sizes'] = opts[:'sizes'] if !opts[:'sizes'].nil?
|
|
480
|
+
query_params[:'conditions'] = opts[:'conditions'] if !opts[:'conditions'].nil?
|
|
481
|
+
query_params[:'gender'] = opts[:'gender'] if !opts[:'gender'].nil?
|
|
482
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
483
|
+
|
|
484
|
+
# header parameters
|
|
485
|
+
header_params = opts[:header_params] || {}
|
|
486
|
+
# HTTP header 'Accept' (if needed)
|
|
487
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
488
|
+
|
|
489
|
+
# form parameters
|
|
490
|
+
form_params = opts[:form_params] || {}
|
|
491
|
+
|
|
492
|
+
# http body (model)
|
|
493
|
+
post_body = opts[:debug_body]
|
|
494
|
+
|
|
495
|
+
# return_type
|
|
496
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
497
|
+
|
|
498
|
+
# auth_names
|
|
499
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
500
|
+
|
|
501
|
+
new_options = opts.merge(
|
|
502
|
+
:operation => :"DepopApi.depop_search_depop_products",
|
|
503
|
+
:header_params => header_params,
|
|
504
|
+
:query_params => query_params,
|
|
505
|
+
:form_params => form_params,
|
|
506
|
+
:body => post_body,
|
|
507
|
+
:auth_names => auth_names,
|
|
508
|
+
:return_type => return_type
|
|
509
|
+
)
|
|
510
|
+
|
|
511
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
512
|
+
if @api_client.config.debugging
|
|
513
|
+
@api_client.config.logger.debug "API called: DepopApi#depop_search_depop_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
514
|
+
end
|
|
515
|
+
return data, status_code, headers
|
|
516
|
+
end
|
|
517
|
+
end
|
|
518
|
+
end
|