reefmobile-api
v1.2.0
Published
A wrapper around Free Mobile API.
Downloads
57
Maintainers
Readme
Free Mobile API Wrapper
This project is a React Native wrapper for the Free Mobile API, providing seamless integration and interaction with Free Mobile services, managed by Laystral.
Table of Contents
Installation
To install the package, use the following command:
npm install reefmobile-api
Usage
Here's a basic example of how to use the wrapper in a React Native application:
import {
LoginWithoutTrustedUuid,
LoginWithTrustedUuid,
VerifySMSCode,
FetchCompleteUserData,
FetchPeriodUsageDetails,
FetchInvoiceData,
FetchUnpaidInvoices,
FetchPlanAndDiscountInfo
} from 'freemobileapi';
// Example usage
const login = async () => {
const response = await LoginWithoutTrustedUuid('your_login', 'your_password');
const data = await response.json();
console.log(data);
};
API Methods
Authentication
LoginWithoutTrustedUuid(login: string, password: string)
LoginWithTrustedUuid(login: string, password: string, trustedUuid: string)
VerifySMSCode(otpID: string, codeOtp: string, isTrusted: boolean, token: string)
User Data
FetchCompleteUserData(login: string, token: string)
Usage Details
FetchPeriodUsageDetails(login: string, token: string)
Invoices
FetchInvoiceData(login: string, token: string)
FetchUnpaidInvoices(login: string, token: string)
Plan and Discounts
FetchPlanAndDiscountInfo(login: string, token: string)
Contributing
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
For more details, visit the repository.