JavaScript client library for the epilot User API

Usage no npm install needed!

<script type="module">
  import epilotUserClient from 'https://cdn.skypack.dev/@epilot/user-client';



API Client for epilot user API.

Uses openapi-client-axios

Getting Started

Install the package:

npm install --save-dev @epilot/user-client

Import the package:

import { getClient } from '@epilot/user-client';

Use the client:

// get typed client
const client = await getClient();

// call an operation
const res = await client.getMe();

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.USER_API_URL;
client.defaults.headers['authorization'] = `Bearer ${token}`;

API Docs: