Class: PinterestSdkClient::CatalogsApi
- Inherits:
-
Object
- Object
- PinterestSdkClient::CatalogsApi
- Defined in:
- lib/pinterest_sdk/api/catalogs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#catalogs_product_groups_create(catalogs_product_group_create_request, opts = {}) ⇒ Object
Create product group <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_create_with_http_info(catalogs_product_group_create_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Create product group <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_delete(product_group_id, opts = {}) ⇒ nil
Delete product group <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_delete_with_http_info(product_group_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete product group <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_list(feed_id, opts = {}) ⇒ Paginated
Get product groups list <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_list_with_http_info(feed_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
Get product groups list <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request, opts = {}) ⇒ CatalogsProductGroup
Update product group <strong>This endpoint is currently in beta and not available to all apps.
-
#catalogs_product_groups_update_with_http_info(product_group_id, catalogs_product_group_update_request, opts = {}) ⇒ Array<(CatalogsProductGroup, Integer, Hash)>
Update product group <strong>This endpoint is currently in beta and not available to all apps.
-
#feed_processing_results_list(feed_id, opts = {}) ⇒ Paginated
List processing results for a given feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feed_processing_results_list_with_http_info(feed_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List processing results for a given feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_create(catalogs_feeds_create_request, opts = {}) ⇒ CatalogsFeed
Create feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_create_with_http_info(catalogs_feeds_create_request, opts = {}) ⇒ Array<(CatalogsFeed, Integer, Hash)>
Create feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_delete(feed_id, opts = {}) ⇒ nil
Delete feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_delete_with_http_info(feed_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_get(feed_id, opts = {}) ⇒ CatalogsFeed
Get feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_get_with_http_info(feed_id, opts = {}) ⇒ Array<(CatalogsFeed, Integer, Hash)>
Get feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_list(opts = {}) ⇒ Paginated
List feeds <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_list_with_http_info(opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List feeds <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_update(feed_id, catalogs_feeds_update_request, opts = {}) ⇒ CatalogsFeed
Update feed <strong>This endpoint is currently in beta and not available to all apps.
-
#feeds_update_with_http_info(feed_id, catalogs_feeds_update_request, opts = {}) ⇒ Array<(CatalogsFeed, Integer, Hash)>
Update feed <strong>This endpoint is currently in beta and not available to all apps.
-
#initialize(api_client = ApiClient.default) ⇒ CatalogsApi
constructor
A new instance of CatalogsApi.
-
#items_batch_get(batch_id, opts = {}) ⇒ CatalogsItemsBatch
Get catalogs items batch <strong>This endpoint is currently in beta and not available to all apps.
-
#items_batch_get_with_http_info(batch_id, opts = {}) ⇒ Array<(CatalogsItemsBatch, Integer, Hash)>
Get catalogs items batch <strong>This endpoint is currently in beta and not available to all apps.
-
#items_batch_post(catalogs_items_batch_request, opts = {}) ⇒ CatalogsItemsBatch
Perform an operation on an item batch <strong>This endpoint is currently in beta and not available to all apps.
-
#items_batch_post_with_http_info(catalogs_items_batch_request, opts = {}) ⇒ Array<(CatalogsItemsBatch, Integer, Hash)>
Perform an operation on an item batch <strong>This endpoint is currently in beta and not available to all apps.
-
#items_get(country, item_ids, language, opts = {}) ⇒ CatalogsItems
Get catalogs items Get the items of the catalog created by the "operating user_account".
-
#items_get_with_http_info(country, item_ids, language, opts = {}) ⇒ Array<(CatalogsItems, Integer, Hash)>
Get catalogs items Get the items of the catalog created by the "operating user_account".
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CatalogsApi
Returns a new instance of CatalogsApi.
19 20 21 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#catalogs_product_groups_create(catalogs_product_group_create_request, opts = {}) ⇒ Object
Create product group <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Create product group to use in Catalogs.
27 28 29 30 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 27 def catalogs_product_groups_create(catalogs_product_group_create_request, opts = {}) data, _status_code, _headers = catalogs_product_groups_create_with_http_info(catalogs_product_group_create_request, opts) data end |
#catalogs_product_groups_create_with_http_info(catalogs_product_group_create_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Create product group <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Create product group to use in Catalogs.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 37 def catalogs_product_groups_create_with_http_info(catalogs_product_group_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_create ...' end # verify the required parameter 'catalogs_product_group_create_request' is set if @api_client.config.client_side_validation && catalogs_product_group_create_request.nil? fail ArgumentError, "Missing the required parameter 'catalogs_product_group_create_request' when calling CatalogsApi.catalogs_product_groups_create" end # resource path local_var_path = '/catalogs/product_groups' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_product_group_create_request) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.catalogs_product_groups_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#catalogs_product_groups_delete(product_group_id, opts = {}) ⇒ nil
Delete product group <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Delete a product group from being in use in Catalogs.
95 96 97 98 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 95 def catalogs_product_groups_delete(product_group_id, opts = {}) catalogs_product_groups_delete_with_http_info(product_group_id, opts) nil end |
#catalogs_product_groups_delete_with_http_info(product_group_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete product group <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Delete a product group from being in use in Catalogs.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 105 def catalogs_product_groups_delete_with_http_info(product_group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_delete ...' end # verify the required parameter 'product_group_id' is set if @api_client.config.client_side_validation && product_group_id.nil? fail ArgumentError, "Missing the required parameter 'product_group_id' when calling CatalogsApi.catalogs_product_groups_delete" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && product_group_id !~ pattern fail ArgumentError, "invalid value for 'product_group_id' when calling CatalogsApi.catalogs_product_groups_delete, must conform to the pattern #{pattern}." end # resource path local_var_path = '/catalogs/product_groups/{product_group_id}'.sub('{' + 'product_group_id' + '}', CGI.escape(product_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.catalogs_product_groups_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#catalogs_product_groups_list(feed_id, opts = {}) ⇒ Paginated
Get product groups list <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Get a list of product groups for a given Catalogs Feed Id.
165 166 167 168 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 165 def catalogs_product_groups_list(feed_id, opts = {}) data, _status_code, _headers = catalogs_product_groups_list_with_http_info(feed_id, opts) data end |
#catalogs_product_groups_list_with_http_info(feed_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
Get product groups list <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a list of product groups for a given Catalogs Feed Id.
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 177 def catalogs_product_groups_list_with_http_info(feed_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_list ...' end # verify the required parameter 'feed_id' is set if @api_client.config.client_side_validation && feed_id.nil? fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.catalogs_product_groups_list" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && feed_id !~ pattern fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.catalogs_product_groups_list, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.catalogs_product_groups_list, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.catalogs_product_groups_list, must be greater than or equal to 1.' end # resource path local_var_path = '/catalogs/product_groups' # query parameters query_params = opts[:query_params] || {} query_params[:'feed_id'] = feed_id query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.catalogs_product_groups_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request, opts = {}) ⇒ CatalogsProductGroup
Update product group <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Update product group to use in Catalogs.
247 248 249 250 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 247 def catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request, opts = {}) data, _status_code, _headers = catalogs_product_groups_update_with_http_info(product_group_id, catalogs_product_group_update_request, opts) data end |
#catalogs_product_groups_update_with_http_info(product_group_id, catalogs_product_group_update_request, opts = {}) ⇒ Array<(CatalogsProductGroup, Integer, Hash)>
Update product group <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Update product group to use in Catalogs.
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 258 def catalogs_product_groups_update_with_http_info(product_group_id, catalogs_product_group_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_update ...' end # verify the required parameter 'product_group_id' is set if @api_client.config.client_side_validation && product_group_id.nil? fail ArgumentError, "Missing the required parameter 'product_group_id' when calling CatalogsApi.catalogs_product_groups_update" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && product_group_id !~ pattern fail ArgumentError, "invalid value for 'product_group_id' when calling CatalogsApi.catalogs_product_groups_update, must conform to the pattern #{pattern}." end # verify the required parameter 'catalogs_product_group_update_request' is set if @api_client.config.client_side_validation && catalogs_product_group_update_request.nil? fail ArgumentError, "Missing the required parameter 'catalogs_product_group_update_request' when calling CatalogsApi.catalogs_product_groups_update" end # resource path local_var_path = '/catalogs/product_groups/{product_group_id}'.sub('{' + 'product_group_id' + '}', CGI.escape(product_group_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_product_group_update_request) # return_type return_type = opts[:debug_return_type] || 'CatalogsProductGroup' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.catalogs_product_groups_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#feed_processing_results_list(feed_id, opts = {}) ⇒ Paginated
List processing results for a given feed <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Fetch a feed processing results owned by the owner user account.
327 328 329 330 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 327 def feed_processing_results_list(feed_id, opts = {}) data, _status_code, _headers = feed_processing_results_list_with_http_info(feed_id, opts) data end |
#feed_processing_results_list_with_http_info(feed_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List processing results for a given feed <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Fetch a feed processing results owned by the owner user account.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 339 def feed_processing_results_list_with_http_info(feed_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.feed_processing_results_list ...' end # verify the required parameter 'feed_id' is set if @api_client.config.client_side_validation && feed_id.nil? fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feed_processing_results_list" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && feed_id !~ pattern fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feed_processing_results_list, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feed_processing_results_list, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feed_processing_results_list, must be greater than or equal to 1.' end # resource path local_var_path = '/catalogs/feeds/{feed_id}/processing_results'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.feed_processing_results_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#feed_processing_results_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#feeds_create(catalogs_feeds_create_request, opts = {}) ⇒ CatalogsFeed
Create feed <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Create a new feed owned by the "operating user_account".
407 408 409 410 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 407 def feeds_create(catalogs_feeds_create_request, opts = {}) data, _status_code, _headers = feeds_create_with_http_info(catalogs_feeds_create_request, opts) data end |
#feeds_create_with_http_info(catalogs_feeds_create_request, opts = {}) ⇒ Array<(CatalogsFeed, Integer, Hash)>
Create feed <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Create a new feed owned by the "operating user_account".
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 417 def feeds_create_with_http_info(catalogs_feeds_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_create ...' end # verify the required parameter 'catalogs_feeds_create_request' is set if @api_client.config.client_side_validation && catalogs_feeds_create_request.nil? fail ArgumentError, "Missing the required parameter 'catalogs_feeds_create_request' when calling CatalogsApi.feeds_create" end # resource path local_var_path = '/catalogs/feeds' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_feeds_create_request) # return_type return_type = opts[:debug_return_type] || 'CatalogsFeed' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.feeds_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#feeds_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#feeds_delete(feed_id, opts = {}) ⇒ nil
Delete feed <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Delete a feed owned by the "operating user_account".
475 476 477 478 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 475 def feeds_delete(feed_id, opts = {}) feeds_delete_with_http_info(feed_id, opts) nil end |
#feeds_delete_with_http_info(feed_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete feed <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Delete a feed owned by the "operating user_account".
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 485 def feeds_delete_with_http_info(feed_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_delete ...' end # verify the required parameter 'feed_id' is set if @api_client.config.client_side_validation && feed_id.nil? fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feeds_delete" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && feed_id !~ pattern fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feeds_delete, must conform to the pattern #{pattern}." end # resource path local_var_path = '/catalogs/feeds/{feed_id}'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.feeds_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#feeds_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#feeds_get(feed_id, opts = {}) ⇒ CatalogsFeed
Get feed <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Get a single feed owned by the "operating user_account".
543 544 545 546 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 543 def feeds_get(feed_id, opts = {}) data, _status_code, _headers = feeds_get_with_http_info(feed_id, opts) data end |
#feeds_get_with_http_info(feed_id, opts = {}) ⇒ Array<(CatalogsFeed, Integer, Hash)>
Get feed <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a single feed owned by the "operating user_account".
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 553 def feeds_get_with_http_info(feed_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_get ...' end # verify the required parameter 'feed_id' is set if @api_client.config.client_side_validation && feed_id.nil? fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feeds_get" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && feed_id !~ pattern fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feeds_get, must conform to the pattern #{pattern}." end # resource path local_var_path = '/catalogs/feeds/{feed_id}'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CatalogsFeed' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.feeds_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#feeds_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#feeds_list(opts = {}) ⇒ Paginated
List feeds <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Fetch feeds owned by the "operating user_account".
612 613 614 615 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 612 def feeds_list(opts = {}) data, _status_code, _headers = feeds_list_with_http_info(opts) data end |
#feeds_list_with_http_info(opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List feeds <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Fetch feeds owned by the "operating user_account".
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 623 def feeds_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_list ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feeds_list, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feeds_list, must be greater than or equal to 1.' end # resource path local_var_path = '/catalogs/feeds' # query parameters query_params = opts[:query_params] || {} query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.feeds_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#feeds_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#feeds_update(feed_id, catalogs_feeds_update_request, opts = {}) ⇒ CatalogsFeed
Update feed <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Update a feed owned by the "operating user_account".
683 684 685 686 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 683 def feeds_update(feed_id, catalogs_feeds_update_request, opts = {}) data, _status_code, _headers = feeds_update_with_http_info(feed_id, catalogs_feeds_update_request, opts) data end |
#feeds_update_with_http_info(feed_id, catalogs_feeds_update_request, opts = {}) ⇒ Array<(CatalogsFeed, Integer, Hash)>
Update feed <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Update a feed owned by the "operating user_account".
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 694 def feeds_update_with_http_info(feed_id, catalogs_feeds_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_update ...' end # verify the required parameter 'feed_id' is set if @api_client.config.client_side_validation && feed_id.nil? fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feeds_update" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && feed_id !~ pattern fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feeds_update, must conform to the pattern #{pattern}." end # verify the required parameter 'catalogs_feeds_update_request' is set if @api_client.config.client_side_validation && catalogs_feeds_update_request.nil? fail ArgumentError, "Missing the required parameter 'catalogs_feeds_update_request' when calling CatalogsApi.feeds_update" end # resource path local_var_path = '/catalogs/feeds/{feed_id}'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_feeds_update_request) # return_type return_type = opts[:debug_return_type] || 'CatalogsFeed' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.feeds_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#feeds_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#items_batch_get(batch_id, opts = {}) ⇒ CatalogsItemsBatch
Get catalogs items batch <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> Get a single catalogs items batch created by the "operating user_account".
761 762 763 764 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 761 def items_batch_get(batch_id, opts = {}) data, _status_code, _headers = items_batch_get_with_http_info(batch_id, opts) data end |
#items_batch_get_with_http_info(batch_id, opts = {}) ⇒ Array<(CatalogsItemsBatch, Integer, Hash)>
Get catalogs items batch <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a single catalogs items batch created by the "operating user_account".
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 771 def items_batch_get_with_http_info(batch_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.items_batch_get ...' end # verify the required parameter 'batch_id' is set if @api_client.config.client_side_validation && batch_id.nil? fail ArgumentError, "Missing the required parameter 'batch_id' when calling CatalogsApi.items_batch_get" end # resource path local_var_path = '/catalogs/items/batch/{batch_id}'.sub('{' + 'batch_id' + '}', CGI.escape(batch_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CatalogsItemsBatch' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.items_batch_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#items_batch_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#items_batch_post(catalogs_items_batch_request, opts = {}) ⇒ CatalogsItemsBatch
Perform an operation on an item batch <strong>This endpoint is currently in beta and not available to all apps. <a href=‘/docs/api/v5/#tag/Understanding-catalog-management’>Learn more</a>.</strong> This endpoint supports multiple operations on a set of one or more catalog items.
824 825 826 827 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 824 def items_batch_post(catalogs_items_batch_request, opts = {}) data, _status_code, _headers = items_batch_post_with_http_info(catalogs_items_batch_request, opts) data end |
#items_batch_post_with_http_info(catalogs_items_batch_request, opts = {}) ⇒ Array<(CatalogsItemsBatch, Integer, Hash)>
Perform an operation on an item batch <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> This endpoint supports multiple operations on a set of one or more catalog items.
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 834 def items_batch_post_with_http_info(catalogs_items_batch_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.items_batch_post ...' end # verify the required parameter 'catalogs_items_batch_request' is set if @api_client.config.client_side_validation && catalogs_items_batch_request.nil? fail ArgumentError, "Missing the required parameter 'catalogs_items_batch_request' when calling CatalogsApi.items_batch_post" end # resource path local_var_path = '/catalogs/items/batch' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_items_batch_request) # return_type return_type = opts[:debug_return_type] || 'CatalogsItemsBatch' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.items_batch_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#items_batch_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#items_get(country, item_ids, language, opts = {}) ⇒ CatalogsItems
Get catalogs items Get the items of the catalog created by the "operating user_account"
894 895 896 897 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 894 def items_get(country, item_ids, language, opts = {}) data, _status_code, _headers = items_get_with_http_info(country, item_ids, language, opts) data end |
#items_get_with_http_info(country, item_ids, language, opts = {}) ⇒ Array<(CatalogsItems, Integer, Hash)>
Get catalogs items Get the items of the catalog created by the "operating user_account"
906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/pinterest_sdk/api/catalogs_api.rb', line 906 def items_get_with_http_info(country, item_ids, language, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CatalogsApi.items_get ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling CatalogsApi.items_get" end # verify the required parameter 'item_ids' is set if @api_client.config.client_side_validation && item_ids.nil? fail ArgumentError, "Missing the required parameter 'item_ids' when calling CatalogsApi.items_get" end # verify the required parameter 'language' is set if @api_client.config.client_side_validation && language.nil? fail ArgumentError, "Missing the required parameter 'language' when calling CatalogsApi.items_get" end # resource path local_var_path = '/catalogs/items' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = country query_params[:'item_ids'] = @api_client.build_collection_param(item_ids, :multi) query_params[:'language'] = language # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CatalogsItems' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"CatalogsApi.items_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CatalogsApi#items_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |