Dru-Go / typescript-sdk

Typescript SDK for Lotus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lotus Typescript Library

MIT License

Official Lotus Typescript library to capture and send events to any Lotus instance (self-hosted or cloud).

Installing

Install the lotus-node package for use in your node.js based backend.

npm install lotus-typescript

Initializing

First grab a new api key from the Settings tab. Then change the host to wherever you want to send data to and omit the line if you are using Lotus Cloud.

const lotus = new Lotus(api_key, {
    host: 'https://www.uselotus.app/', // You can omit this line if using Lotus Cloud
})

Currently Supported Methods

1. TrackEvent
2. Get All Customers
3. Get Customer Details
4. Create Customer
5. Create Subscription
6. Cancel Subscription
7. Change Subscription
8. Get All Subscriptions
9. Get Subscription Details
10. Get All Plans
11. Get Customer Access

Making calls

Please refer to the Lotus documentation for more information on how to use the library.

Questions?

Thank you

About

Typescript SDK for Lotus

License:MIT License


Languages

Language:TypeScript 99.8%Language:JavaScript 0.2%