Skip to content

Latest commit

 

History

History
341 lines (235 loc) · 10.5 KB

File metadata and controls

341 lines (235 loc) · 10.5 KB

swagger_client.BrandsApi

All URIs are relative to https://api.facestore.local/v1

Method HTTP request Description
add_brands POST /brands
delete_brand_by_id DELETE /brands/{id}/
get_brand_by_id GET /brands/{id}/
get_brands GET /brands
update_category_by_id PUT /brands/{id}/
update_category_by_id_0 PATCH /brands/{id}/

add_brands

InlineResponse201 add_brands(brand)

Creates a new brand in the store.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['APIToken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIToken'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BrandsApi(swagger_client.ApiClient(configuration))
brand = swagger_client.Brand() # Brand | Brand to add to the store

try:
    api_response = api_instance.add_brands(brand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BrandsApi->add_brands: %s\n" % e)

Parameters

Name Type Description Notes
brand Brand Brand to add to the store

Return type

InlineResponse201

Authorization

APIKeyHeader

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_brand_by_id

delete_brand_by_id(id)

Deletes a single brand based on the ID supplied

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['APIToken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIToken'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BrandsApi(swagger_client.ApiClient(configuration))
id = 789 # int | ID of brand to delete

try:
    api_instance.delete_brand_by_id(id)
except ApiException as e:
    print("Exception when calling BrandsApi->delete_brand_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id int ID of brand to delete

Return type

void (empty response body)

Authorization

APIKeyHeader

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_brand_by_id

InlineResponse201 get_brand_by_id(id, includes=includes, limit=limit)

Returns a brand based on a single ID ### Includes You can give the following values on includea parameter: routes, products

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['APIToken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIToken'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BrandsApi(swagger_client.ApiClient(configuration))
id = 789 # int | ID of brand to fetch
includes = ['includes_example'] # list[str] | Include associated objects within response (optional)
limit = 56 # int | max records to return (optional)

try:
    api_response = api_instance.get_brand_by_id(id, includes=includes, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BrandsApi->get_brand_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id int ID of brand to fetch
includes list[str] Include associated objects within response [optional]
limit int max records to return [optional]

Return type

InlineResponse201

Authorization

APIKeyHeader

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_brands

InlineResponse200 get_brands(includes=includes, limit=limit, order_by=order_by)

Returns all brands from the system that the user has access to ### Includes You can give the following values on includes parameter: routes, products

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['APIToken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIToken'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BrandsApi(swagger_client.ApiClient(configuration))
includes = ['includes_example'] # list[str] | Include associated objects within response (optional)
limit = 56 # int | max records to return (optional)
order_by = ['order_by_example'] # list[str] | Specify the field to be sorted, examples:  - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc`  (optional)

try:
    api_response = api_instance.get_brands(includes=includes, limit=limit, order_by=order_by)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BrandsApi->get_brands: %s\n" % e)

Parameters

Name Type Description Notes
includes list[str] Include associated objects within response [optional]
limit int max records to return [optional]
order_by list[str] Specify the field to be sorted, examples: - `?order_by=id desc` - `?order_by=updated_at

Return type

InlineResponse200

Authorization

APIKeyHeader

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_category_by_id

update_category_by_id(id, brand)

Update a single brand based on the ID supplied

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['APIToken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIToken'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BrandsApi(swagger_client.ApiClient(configuration))
id = 789 # int | ID of brand to update
brand = NULL # object | Brand to update in store

try:
    api_instance.update_category_by_id(id, brand)
except ApiException as e:
    print("Exception when calling BrandsApi->update_category_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id int ID of brand to update
brand object Brand to update in store

Return type

void (empty response body)

Authorization

APIKeyHeader

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_category_by_id_0

update_category_by_id_0(id, brand)

Update a single brand based on the ID supplied

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
configuration = swagger_client.Configuration()
configuration.api_key['APIToken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIToken'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.BrandsApi(swagger_client.ApiClient(configuration))
id = 789 # int | ID of brand to update
brand = NULL # object | Brand to update in store

try:
    api_instance.update_category_by_id_0(id, brand)
except ApiException as e:
    print("Exception when calling BrandsApi->update_category_by_id_0: %s\n" % e)

Parameters

Name Type Description Notes
id int ID of brand to update
brand object Brand to update in store

Return type

void (empty response body)

Authorization

APIKeyHeader

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]