🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@epilot/user-client

Package Overview
Dependencies
Maintainers
15
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epilot/user-client

JavaScript client library for the epilot User API

Source
npmnpm
Version
2.9.1
Version published
Weekly downloads
745
11.69%
Maintainers
15
Weekly downloads
 
Created
Source

@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:

https://docs.api.epilot.io/user

FAQs

Package last updated on 23 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts