1.0.0 • Published 5 months ago

ceilr-node-sdk v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

CeilR Node.js SDK

šŸš€ CeilR SDK is a Node.js library for feature access management, usage tracking, and entitlement fetching.

šŸ“¦ Installation

Install the package in your project:

npm install ceilr-node-sdk

šŸ› ļø Setup

Initialize the SDK:

const CeilR = require("ceilr-node-sdk");

const ceilr = new CeilR("your-api-key", "customer-id");

šŸš€ Features

āœ… Check Feature Access

const hasAccess = await ceilr.checkFeature("premium_feature");
console.log("Feature Access:", hasAccess);

šŸ“Š Track Usage

await ceilr.trackUsage("api_calls", 1);

šŸ”‘ Get User Entitlements

const entitlements = await ceilr.getUserEntitlements();
console.log("User Entitlements:", entitlements);

šŸ“” Offline Support

  • Requests are queued when offline and retried when the device is back online.

šŸ›  Configuration

You can set custom API endpoints if needed:

ceilr.endpoint = "https://custom-api-url.com";

šŸ”„ Updating the SDK

To update to the latest version:

npm update ceilr-node-sdk

šŸ¤ Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature-name)
  3. Commit changes (git commit -m "Add new feature")
  4. Push to GitHub (git push origin feature-name)
  5. Open a Pull Request šŸš€

šŸ“œ License

This project is licensed under the MIT License.

šŸ“ž Support

For any issues or questions, reach out via:

1.0.0

5 months ago