@sharpe-labs/api@1.0.0
A TypeScript SDK client for the api.sharpe.ai API.
Usage
First, install the SDK from npm.
npm install @sharpe-labs/api --save
Next, try it out.
import {
Configuration,
AccountApi,
} from '@sharpe-labs/api';
import type { GetUsageRequest } from '@sharpe-labs/api';
async function example() {
console.log("🚀 Testing @sharpe-labs/api SDK...");
const config = new Configuration({
apiKey: "YOUR API KEY",
accessToken: "YOUR BEARER TOKEN",
});
const api = new AccountApi(config);
try {
const data = await api.getUsage();
console.log(data);
} catch (error) {
console.error(error);
}
}
example().catch(console.error);
Documentation
API Endpoints
All URIs are relative to https://api.sharpe.ai
Models
Authorization
Authentication schemes defined for the API:
BearerAuth
- Type: HTTP Bearer Token authentication
ApiKeyAuth
- Type: API key
- API key parameter name:
X-API-Key
- Location: HTTP header
About
This TypeScript SDK client supports the Fetch API
and is automatically generated by the
OpenAPI Generator project:
- API version:
1.0.0
- Package version:
1.0.0
- Generator version:
7.21.0
- Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
For more information, please visit https://sharpe.ai
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed.
After cloning the repository, navigate to the project directory and run:
npm install
npm run build
Publishing
Once you've built the package, you can publish it to npm:
npm publish
License