1.0.17 • Published 1 month ago

togai-client v1.0.17

Weekly downloads
-
License
Unlicense
Repository
github
Last release
1 month ago

Togai Client

npm

Togai is an end to end pricing infrastructure that enable you with metering, aggregating, pricing and billing for your application.

This is an official Typescript client library for using Togai APIs.

Installation

To install the library, run:

npm install togai-client

Usage

To get started with the library, you need to create a api token from your Togai Account

import { Configuration, CustomersApi, CreateCustomerRequest } from 'togai-client';

const API_TOKEN = "YOUR_API_TOKEN";
const BASE_PATH = "https://sandbox-api.togai.com"

const configuration = new Configuration({
    basePath: BASE_PATH,
    accessToken: API_TOKEN,
});
const createCustomerRequest:CreateCustomerRequest = {
    name: "customer1",
    id: "1",
    address: {line1: "house 221B", line2: "Baker Street", city: "London", state: "London", country: "GB"},
    primaryEmail: "email@togai.com"
} 
const customersApi = new CustomersApi(configuration);
const customer = (await customersApi.createCustomer(createCustomerRequest)).data;
console.log("Customer created", customer);

You can get a detailed step-by-step guide for a sample ingestion and metering at examples.

1.0.17

1 month ago

1.0.16

9 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

12 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.12

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago