1.1.0 • Published 6 months ago

jmk-api v1.1.0

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

JMK API

JMK API is a Node.js module for interacting with the JMK API in a simple and efficient way.


🔥 Features

  • Seamless API requests with customizable methods.
  • Automatically handles responses for:
    • JSON data
    • Binary files (images, etc.)
    • Other content types.
  • Lightweight and powered by Axios.

📦 Installation

Install the package via npm:

npm install jmk-api

🚀 Usage

Import and Initialize

const JmkApi = require('jmk-api');

const api = new JmkApi();

Fetch Available Routes

(async () => {
  const routes = await api.route();
  console.log(routes);
})();

Send a Custom API Request

(async () => {
  const data = await api.run('example-route', {
    method: 'POST',
    key: 'value',
  });
  console.log(data);
})();

⚙️ Methods

run(route, payload)

  • route: The API endpoint to call.
  • payload: Object containing request configurations (e.g., method, params, or data).

route()

Fetches the list of available API routes.


🌟 License

This project is licensed under the MIT License.


🛠️ Author

1.1.0

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago