Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.62 KB

File metadata and controls

48 lines (36 loc) · 1.62 KB

fivaldi-api-client

Fivaldi Api Client is a third party Fivaldi API client for NodeJS. It is a wrapper around an API client that has been automatically generated using the OpenAPI schema provided by Fivaldi.

Installation

Add to project's package.json:

npm install @rantalainen/fivaldi-api-client

Import

import { FivaldiApiClient } from '@rantalainen/fivaldi-api-client';

Setup client with options

In order to obtain partner ID and partner secret, please contact Fivaldi Support. Partner id and partner secret are needed to access API functions. More information from Fivaldi docs.

const fivaldi = new FivaldiApiClient(
  {
    partnerId: 'yourPartnerId',
    partnerSecret: 'yourPartnerSecret',
    // Optional arguments related to rate limiting
    replenishRate: 2,
    burstCapacity: 10
  },
  {
    // Optional config options
    baseURL: 'https://api.fivaldi.net/customer/api',
    timeout: 120000,
    keepAliveAgent: true,
    dnsCache: true
  }
);

Available methods can be found in the API documentation.

Resources