1.4.0 • Published 3 years ago

@datenkraft/bb-frontend-api-ts-client v1.4.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
3 years ago

Backbone - Frontend API TS Client

Introduction

The Frontend API TS Client enables you to work with the Frontend API.

Prerequisites

  • npm

Installation

You can use npm to install the package.

npm install @datenkraft/bb-frontend-api-ts-client

Using the package

The package can be used to communicate with the Frontend API. The Client includes functionalities for every endpoint defined in the openapi.json. The Client is auto-generated with ferdikoomen/openapi-typescript-codegen using an openapi.json file.

Initializing the Client

import { ConfigOptions } from '@datenkraft/bb-base-api-ts-client';
import { FrontendApiClient } from '@datenkraft/bb-frontend-api-ts-client';

const configOptions: ConfigOptions = {
  clientId: 'clientId',
  clientSecret: 'clientSecret',
  oAuthTokenHost: 'oAuthTokenHost',
  tokenTradeInPath: 'tokenTradeInPath',
  externalIdToken: 'externalIdToken',
  useExternalIdToken: true,
};

FrontendApiClient.init(configOptions).then(() => {
  // Client is initialized
});

Example Endpoint: Get DebtLineItemCollection

FrontendApiClient.Generated.SkuService.getSku('skuCode')
  .then((sku) => {
    // Request succeeded
  })
  .catch((error) => {
    // An error occured
  });

License

This repository is available under the MIT license.

1.4.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago