Skip to content

groupby/gb-retailapi-python-client

Repository files navigation

gb-retailapi-client

GroupBy Retail API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/groupby/gb-retailapi-python-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/groupby/gb-retailapi-python-client.git)

Then import the package:

import gb_retailapi_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import gb_retailapi_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import gb_retailapi_client
from gb_retailapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = gb_retailapi_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: GroupByIncEmployee
configuration = gb_retailapi_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: ClientKey
configuration.api_key['ClientKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ClientKey'] = 'Bearer'


# Enter a context with an instance of the API client
with gb_retailapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = gb_retailapi_client.AutocompleteApi(api_client)
    x_groupby_customer_id = 'x_groupby_customer_id_example' # str | Header on incoming HTTP requests that is populated by the API gateway and indicates the customer ID.
    identity = gb_retailapi_client.Identity() # Identity | 
    merchandiser = gb_retailapi_client.Merchandiser() # Merchandiser | 
    request = gb_retailapi_client.Request() # Request | Object which is represent autocomplete request and encapsulate all passed parameters.  (optional)

    try:
        api_response = api_instance.autocompletesearch(x_groupby_customer_id, identity, merchandiser, request=request)
        print("The response of AutocompleteApi->autocompletesearch:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AutocompleteApi->autocompletesearch: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AutocompleteApi autocompletesearch GET /api/request
ProductApi get_by_product_ids GET /api/search/product Provided product search functionality
RecommendationsAPIApi predict POST /api/predict Provide Recommendations AI functionality.
RecommendationsAPIApi predict_v2 POST /api/recommendation Provide Recommendations AI functionality.
SearchApi facet_search POST /api/search/facet Provided search functionality
SearchApi search POST /api/search Provided search functionality

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ClientKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

GroupByIncEmployee

  • Type: HTTP basic authentication

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published