0.1.2 • Published 5 months ago

cloudhub.mn v0.1.2

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

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.mn

Usage

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: "user@example.com",
  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

0.1.2

5 months ago

0.1.1

7 months ago

0.1.0

8 months ago