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
Python 3.7+
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
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
Execute pytest
to run the tests.
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)
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 |
- AdditionalInfo
- AttributeSuggestion
- Audience
- BiasDto
- BiasDtoStrengthDto
- BiasingProfileDto
- BoostedProductBucket
- ColorInfo
- CustomParameterDto
- CustomParameterTrigger
- DebugDto
- ErrorDto
- ErrorResponse
- Experiment
- ExperimentVariant
- Facet
- FacetSearchRequestDto
- FacetSearchResponseDto
- FieldMask
- Filter
- FilterParameter
- FulfillmentInfo
- Identity
- Image
- Interval
- Merchandiser
- MessageType
- Metadata
- NavigationDto
- NavigationType
- NavigationTypeDto
- Order
- Overwrites
- PageInfoDto
- PinnedRefinement
- PredictResults
- PriceInfo
- PriceInfoPriceEffectiveTime
- PriceInfoPriceExpireTime
- PriceInfoPriceRange
- PriceInfoPriceRangeOriginalPrice
- PriceInfoPriceRangePrice
- ProductCustomAttribute
- ProductDto
- ProductDtoAudience
- ProductDtoAvailableTime
- ProductDtoColorInfo
- ProductDtoPriceInfo
- ProductDtoPublishTime
- ProductDtoRating
- ProductDtoRetrievableFields
- Promotion
- QueryPatternTrigger
- QueryPatternTriggerType
- Range
- RangeFilter
- Rating
- RecommendationsErrorResponse
- RecommendationsRequest
- RecordDto
- Refinement
- RefinementDto
- Request
- Role
- RuleConfiguration
- RuleTemplate
- RuleTemplateSection
- RuleType
- RuleVariant
- SearchFilter
- SearchMetadataDto
- SearchRequestDto
- SearchRequestDtoOverwrites
- SearchResponseDto
- SearchResults
- SearchResultsStats
- SearchTerms
- SelectedRefinementDto
- SelectedRefinementTrigger
- SelectedRefinementTriggerType
- Sort
- SortDto
- SortDtoOrderDto
- SpellCorrectionMode
- Stats
- TemplateDto
- TemplateDtoTriggerSet
- Timestamp
- TriggerSet
- ValueFilter
- ValueFilterValueFilterType
- ZoneDto
- ZoneDtoType
- ZoneType
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
- Type: HTTP basic authentication