lotus-typescript
TypeScript icon, indicating that this package has built-in type declarations

1.2.7 • Public • Published

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://api.uselotus.io/", // You can omit this line if using Lotus Cloud
});

Currently Supported Methods

1. trackEvent
2. listCustomers
3. getCustomer
4. createCustomer
5. createSubscription
6. cancelSubscription
7. updateSubscription
8. switchSubscriptionPlan
9. listSubscriptions
10. attachAddon
11. cancelAddon
12. changePrepaidUnits
13. listPlans
14. getPlan
15. checkFeatureAccess
16. checkMetricAccess
17. listInvoices
18. getInvoice
19. listCredits
20. createCredit
21. voidCredit
22. updateCredit

Making calls

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

All parameters and return types are defined in snake_case. This is consistent across all Lotus SDKs. Method names are in camelCase.

Questions?

Join our Slack community.

Thank you

Readme

Keywords

none

Package Sidebar

Install

npm i lotus-typescript

Weekly Downloads

2

Version

1.2.7

License

none

Unpacked Size

274 kB

Total Files

26

Last publish

Collaborators

  • mnida
  • hardik-uselotus