1.0.3 ⢠Published 5 months ago
ceilr-rn-sdk v1.0.3
CeilR React Native SDK (ceilr-rn-sdk
)
š CeilR SDK is a React Native library for feature access management, usage tracking, and entitlement fetching.
š¦ Installation
Install the package in your React Native project:
npm install ceilr-rn-sdk
š ļø Setup
Initialize the SDK in your app:
import CeilR from 'ceilr-rn-sdk';
CeilR.init('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.
š Updating the SDK
To update to the latest version:
npm update ceilr-rn-sdk
š¤ Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feature-name
) - Commit changes (
git commit -m "Add new feature"
) - Push to GitHub (
git push origin feature-name
) - Open a Pull Request š
š License
This project is licensed under the MIT License.