Skip to content

groupby/gb-retailapi-ruby-client

Repository files navigation

gb_retailapi_client

GbRetailapiClient - the Ruby gem for the GroupBy Retail

GroupBy Retail API

This SDK is automatically generated by the OpenAPI Generator project:

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

Installation

Build a gem

To build the Ruby code into a gem:

gem build gb_retailapi_client.gemspec

Then either install the gem locally:

gem install ./gb_retailapi_client-1.0.0.gem

(for development, run gem install --dev ./gb_retailapi_client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'gb_retailapi_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/groupby/gb-retailapi-ruby-client, then add the following in the Gemfile:

gem 'gb_retailapi_client', :git => 'https://github.com/groupby/gb-retailapi-ruby-client.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'gb_retailapi_client'

# Setup authorization
GbRetailapiClient.configure do |config|
  # Configure HTTP basic authorization: GroupByIncEmployee
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'

  # Configure API key authorization: ClientKey
  config.api_key['ClientKey'] = '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['ClientKey'] = 'Bearer'
end

api_instance = GbRetailapiClient::AutocompleteApi.new
x_groupby_customer_id = 'x_groupby_customer_id_example' # String | Header on incoming HTTP requests that is populated by the API gateway and indicates the customer ID.
identity = GbRetailapiClient::Identity.new({subject: 'subject_example', company: 'company_example', roles: [GbRetailapiClient::Role.new({name: 'name_example'})]}) # Identity | 
merchandiser = GbRetailapiClient::Merchandiser.new({merchandiser_id: 'merchandiser_id_example'}) # Merchandiser | 
opts = {
  request: GbRetailapiClient::Request.new({area: 'area_example', collection: 'collection_example', search_items: 37, query: 'query_example'}) # Request | Object which is represent autocomplete request and encapsulate all passed parameters. 
}

begin
  result = api_instance.autocompletesearch(x_groupby_customer_id, identity, merchandiser, opts)
  p result
rescue GbRetailapiClient::ApiError => e
  puts "Exception when calling AutocompleteApi->autocompletesearch: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
GbRetailapiClient::AutocompleteApi autocompletesearch GET /api/request
GbRetailapiClient::ProductApi get_by_product_ids GET /api/search/product Provided product search functionality
GbRetailapiClient::RecommendationsAPIApi predict POST /api/predict Provide Recommendations AI functionality.
GbRetailapiClient::RecommendationsAPIApi predict_v2 POST /api/recommendation Provide Recommendations AI functionality.
GbRetailapiClient::SearchApi facet_search POST /api/search/facet Provided search functionality
GbRetailapiClient::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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors