@epilot/journey-client
v0.4.6
Published
API Client for epilot Journey API
Maintainers
Keywords
Readme
@epilot/journey-client
API Client for epilot journey API.
Uses openapi-client-axios
Getting Started
Install the package:
npm install --save-dev @epilot/journey-clientImport the package:
import { getClient } from '@epilot/journey-client';Use the client:
// get typed client
const client = await getClient();
// call an operation
const res = await client.getJourney('123');BaseURL & Authorization
To pass an authorization header and set up the API url, you can use axios defaults:
const client = getClient();
client.defaults.baseURL = config.API_URL;
client.defaults.headers['authorization'] = `Bearer ${token}`;API Docs:
https://docs.epilot.io/api/journey
