pryngtime-analytics-sdk
v1.1.1
Published
Client for Spryngtime Usage Analytics & Billing API
Downloads
3
Maintainers
Readme
pryngtime-analytics-sdk
Spryngtime Usage Analytics & Billing API
Table of Contents
Installation
npm i pryngtime-analytics-sdk
pnpm i pryngtime-analytics-sdk
yarn add pryngtime-analytics-sdk
Getting Started
import { SpryngtimeAnalyticsSdk } from "pryngtime-analytics-sdk";
const spryngtimeanalyticssdk = new SpryngtimeAnalyticsSdk({
// Defining the base path is optional and defaults to http://localhost
// basePath: "http://localhost",
apiKey: "API_KEY",
});
const trackUsageResponse =
await spryngtimeanalyticssdk.usageTracking.trackUsage({
key: "key_example",
});
console.log(trackUsageResponse);
Reference
spryngtimeanalyticssdk.usageTracking.trackUsage
Track usage data
🛠️ Usage
const trackUsageResponse =
await spryngtimeanalyticssdk.usageTracking.trackUsage({
key: "key_example",
});
⚙️ Parameters
key: string
conversationId: string
openAiResponse: OpenAiResponse
usage: UsageDetail
🌐 Endpoint
/trackUsage
POST
spryngtimeanalyticssdk.default.rootGet
Home
🛠️ Usage
const rootGetResponse = await spryngtimeanalyticssdk.default.rootGet();
🌐 Endpoint
/
GET
spryngtimeanalyticssdk.default.usersPost
Adds a new user
🛠️ Usage
const usersPostResponse = await spryngtimeanalyticssdk.default.usersPost({
id: 10,
name: "Jessica Smith",
});
⚙️ Parameters
id: number
name: string
🌐 Endpoint
/users
POST
Author
This TypeScript package is automatically generated by Konfig