1.0.5 • Published 8 months ago

insemi v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

INSEMI (INFORMATION SERVER MINECRAFT)

This is a Node.js module that allows to get Minecraft server information from various API endpoints.

Example of usage

const fetchData = require('insemi');

async function main() {
    try {
        // Specify the required options you want to get from the Minecraft API.
        // Available options: ['online', 'maxplayers', 'version', 'favicon', 'response']
        const requiredOptions = ['online'];
        // fetchData(requiredOptions, server_ip, server_port);
        const minecraftData = await fetchData(requiredOptions, 'mc.haliacraft.com', '25565');
        console.dir(minecraftData);
    } catch (error) {
        console.error(`Error retrieving data from Minecraft API: ${error.message}`);
    }
}

main();
Installation
You can install this module through npm:

npm install insemi
Usage
fetchData(required)
Main function to obtain data from the Minecraft server.

required (Array): An array of options to get from the Minecraft API.
Options: ['online', 'maxplayers', 'version', 'favicon', 'response']
Returns an object with the requested Minecraft server data.


Example

const fetchData = require('insemi');

async function main() {
    try {
        // Specify the required options you want to get from the Minecraft API.
        // Available options: ['online', 'maxplayers', 'version', 'favicon', 'response']
        const requiredOptions = ['online'];
        // fetchData(requiredOptions, 'mc.haliacraft.com', '25565');
        // fetchData(requiredOptions, server_ip, server_port);
        const minecraftData = await fetchData(requiredOptions, 'mc.haliacraft.com', '25565');
        console.dir(minecraftData);
    } catch (error) {
        console.error(`Error retrieving data from Minecraft API: ${error.message}`);
    }
}

main();

Disclaimer: This module uses data from external sources and is subject to changes in those sources. The availability and accuracy of the data cannot be guaranteed.
1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago