Skip to content

Latest commit

 

History

History
385 lines (259 loc) · 13 KB

File metadata and controls

385 lines (259 loc) · 13 KB

EtsyApi::ShopSectionApi

All URIs are relative to https://openapi.etsy.com

Method HTTP request Description
create_shop_section POST /v3/application/shops/{shop_id}/sections
delete_shop_section DELETE /v3/application/shops/{shop_id}/sections/{shop_section_id}
get_shop_section GET /v3/application/shops/{shop_id}/sections/{shop_section_id}
get_shop_sections GET /v3/application/shops/{shop_id}/sections
update_shop_section PUT /v3/application/shops/{shop_id}/sections/{shop_section_id}

create_shop_section

create_shop_section(shop_id, title)

General ReleaseReport bug

This endpoint is ready for production use.

Creates a new section in a specific shop.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = EtsyApi::ShopSectionApi.new
shop_id = 56 # Integer | The unique positive non-zero numeric ID for an Etsy Shop.
title = 'title_example' # String | The title string for a shop section.

begin
  
  result = api_instance.create_shop_section(shop_id, title)
  p result
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->create_shop_section: #{e}"
end

Using the create_shop_section_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> create_shop_section_with_http_info(shop_id, title)

begin
  
  data, status_code, headers = api_instance.create_shop_section_with_http_info(shop_id, title)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ShopSection>
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->create_shop_section_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
shop_id Integer The unique positive non-zero numeric ID for an Etsy Shop.
title String The title string for a shop section.

Return type

ShopSection

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

delete_shop_section

delete_shop_section(shop_id, shop_section_id)

General ReleaseReport bug

This endpoint is ready for production use.

Deletes a section in a specific shop given a valid shop_section_id.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = EtsyApi::ShopSectionApi.new
shop_id = 56 # Integer | The unique positive non-zero numeric ID for an Etsy Shop.
shop_section_id = 56 # Integer | The numeric ID of a section in a specific Etsy shop.

begin
  
  api_instance.delete_shop_section(shop_id, shop_section_id)
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->delete_shop_section: #{e}"
end

Using the delete_shop_section_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_shop_section_with_http_info(shop_id, shop_section_id)

begin
  
  data, status_code, headers = api_instance.delete_shop_section_with_http_info(shop_id, shop_section_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->delete_shop_section_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
shop_id Integer The unique positive non-zero numeric ID for an Etsy Shop.
shop_section_id Integer The numeric ID of a section in a specific Etsy shop.

Return type

nil (empty response body)

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_shop_section

get_shop_section(shop_id, shop_section_id)

General ReleaseReport bug

This endpoint is ready for production use.

Retrieves a shop section, referenced by section ID and shop ID.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = EtsyApi::ShopSectionApi.new
shop_id = 56 # Integer | The unique positive non-zero numeric ID for an Etsy Shop.
shop_section_id = 56 # Integer | The numeric ID of a section in a specific Etsy shop.

begin
  
  result = api_instance.get_shop_section(shop_id, shop_section_id)
  p result
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->get_shop_section: #{e}"
end

Using the get_shop_section_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_shop_section_with_http_info(shop_id, shop_section_id)

begin
  
  data, status_code, headers = api_instance.get_shop_section_with_http_info(shop_id, shop_section_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ShopSection>
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->get_shop_section_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
shop_id Integer The unique positive non-zero numeric ID for an Etsy Shop.
shop_section_id Integer The numeric ID of a section in a specific Etsy shop.

Return type

ShopSection

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_shop_sections

get_shop_sections(shop_id)

General ReleaseReport bug

This endpoint is ready for production use.

Retrieves the list of shop sections in a specific shop identified by shop ID.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = EtsyApi::ShopSectionApi.new
shop_id = 56 # Integer | The unique positive non-zero numeric ID for an Etsy Shop.

begin
  
  result = api_instance.get_shop_sections(shop_id)
  p result
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->get_shop_sections: #{e}"
end

Using the get_shop_sections_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_shop_sections_with_http_info(shop_id)

begin
  
  data, status_code, headers = api_instance.get_shop_sections_with_http_info(shop_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ShopSections>
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->get_shop_sections_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
shop_id Integer The unique positive non-zero numeric ID for an Etsy Shop.

Return type

ShopSections

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

update_shop_section

update_shop_section(shop_id, shop_section_id, title)

General ReleaseReport bug

This endpoint is ready for production use.

Updates a section in a specific shop given a valid shop_section_id.

Examples

require 'time'
require 'etsy_api'
# setup authorization
EtsyApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'

  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = EtsyApi::ShopSectionApi.new
shop_id = 56 # Integer | The unique positive non-zero numeric ID for an Etsy Shop.
shop_section_id = 56 # Integer | The numeric ID of a section in a specific Etsy shop.
title = 'title_example' # String | The title string for a shop section.

begin
  
  result = api_instance.update_shop_section(shop_id, shop_section_id, title)
  p result
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->update_shop_section: #{e}"
end

Using the update_shop_section_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> update_shop_section_with_http_info(shop_id, shop_section_id, title)

begin
  
  data, status_code, headers = api_instance.update_shop_section_with_http_info(shop_id, shop_section_id, title)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ShopSection>
rescue EtsyApi::ApiError => e
  puts "Error when calling ShopSectionApi->update_shop_section_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
shop_id Integer The unique positive non-zero numeric ID for an Etsy Shop.
shop_section_id Integer The numeric ID of a section in a specific Etsy shop.
title String The title string for a shop section.

Return type

ShopSection

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json