airalo-sdk-type
v0.0.7
Published
UNOFFICIAL AIRALO API INTEGRATION FOR JAVASCRIPT/TYPESCRIPT
Readme
CloudHub
CloudHub is an API wrapper for managing authentication, products, and orders seamlessly. It is built with TypeScript and designed for flexibility and scalability.
Installation
Install the package using npm or yarn:
npm install cloudhub.mnUsage
Import CloudHub and configure it for your application:
import CloudHub from "cloudhub";
// Set host and logger
await CloudHub.setHost("https://api.example.com");
await CloudHub.setLogger(true);
// Authenticate
const authResult = await CloudHub.auth.LOGIN({
email: "[email protected]",
password: "password123",
});
console.log(authResult);Features
- Authentication: Login and manage tokens.
- Item Management: Retrieve and manage items.
- Product Management: Retrieve products and details.
- Order Verification: Verify orders by ID.
API
CloudHub.setHost(url: string)
Set the API host URL.
CloudHub.setLogger(status: boolean)
Enable or disable logging.
CloudHub.auth.LOGIN(body: { email: string; password: string })
Authenticate a user and retrieve an access token.
CloudHub.auth.getToken()
Retrieve a new authentication token using stored credentials.
License
MIT License
