Using the Bizzkit SDKs
All Bizzkit applications utilize a default REST API, compliant with the Swagger/OpenAPI standards. This API allows you to experiment with various methods and observe the models for all requests and responses. To facilitate seamless integration, we offer NuGet packages, alongside a TypeScript NPM package specifically designed for Ecommerce Search, which assist you in interfacing with our APIs.
SDK packages
Our SDK packages can be acquired via our Bizzkit Partner feed. To gain access to these packages, credentials can be obtained from your Bizzkit contact.
NuGet packages
These packages primarily consist of auto-generated Swagger clients, and an factory class designed to streamline the authentication process.
All SDK package names start with the prefix Bizzkit.Sdk.
, and the SDK packages incorporate the following elements:
- A client factory
- A dedicated client
- Options to configure the client factory
Info
The package Bizzkit.Sdk.Search.Authenticated
contains tools for using the authentication in Bizzkit.Sdk.Search
.
Factory client
To simplify the authentication process, all NuGet packages associated with Bizzkit applications come with a factory class. This class streamlines the creation of an authenticated Swagger-generated client. Below is a demonstration of how to establish an SDK client:
The settings given are:
- BaseUrl: URL of the API.
- Authority: URL of Bizzkit Auth.
- Scope: Name of the API, should normally not be overwritten.
- ClientId: Id of the client.
- ClientSecret: Secret of the client.
Info
Read about IAM here.
Using the client
Clients should be created through the client factory.
Note
It's important to note that clients are not designed to be maintained for prolonged reuse. If held onto for later use, the client will ultimately reach its expiration.
Restoring packages from the feed
In order to restore NuGet packages from the Bizzkit partner feed you can use configuration file or Visual Studio.
Using a configuration file
Add a nuget.config file to your project, in the same folder as your .csproj or .sln file.
After that you can restore packages by running:
or
Using Visual Studio
On the Tools menu, select Options > NuGet Package Manager > Package Sources. Select the green plus in the upper-right corner and enter the name and source URL below.
Name
Source
Note
You need to do this on every machine that needs access to your packages. Use the configuration file instructions if you want to complete setup once and check it into your repository.
NPM packages
The Ecommerce Search SDK includes an automated TypeScript client. This client is designed to facilitate direct search capabilities on the frontend interface. To use it, visit the Bizzkit Partner feed. There, click on @bizzkit/ecommerce-search@[version]
and select 'Connect to Feed'. You'll find detailed instructions on how to obtain an access token.
Creating a client
Here is an example of using the Ecommerce Search Typescript client:
The baseUrl
is the URL of the Ecommerce Search API.
Using the client
After creating the client it can be used like:
Install the package
In order to install any of the Bizzkit packages the NPM registry should be configured.
To configure it on a project level create an .npmrc
file in the root of the project and add:
or place the file in the users directory %userprofile%
for Windows.
After the NPM registry is set, the Search client can be installed by running: