JSPM

mzr-api

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q35511F
  • License MIT

Simplify a lot of your code using MZR-API

Package Exports

  • mzr-api
  • mzr-api/file/export.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mzr-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MZR-API

The main purpose of this module is to simplify sending requests to the MZR API and reduce the error rate. It is completely based on the MZR API.

- ❓ Support

- 🌐 Website

- 📚 Document's

- 🖥 Github

Installation

npm install mzr-api
pnpm add mzr-api
yarn add mzr-api

Documentation & Examples

We cannot write here as we show everything in the most detailed way in our document. We will only add small NPM related examples in the README. For detailed information you can check documentation.

Example Get Version For CommonJS;

const { version } = require('mzr-api');

console.log(version);

Example Crypto;

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const coins = ['BTC', 'ETH'];
    const currencies = ['USD', 'EUR', 'TRY']; 

    const data = await mzrapi.crypto(coins, currencies);
    console.log(data);
})()

Example Fun;

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.fun('wasted', 'image_url.png');
    console.log(data);
})()

Example Minecraft Server Info;

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.minecraftServer('mc.hypixel.net');
    console.log(data);
})()
const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.steam('ETS 2'); // Euro Truck Simulator 2
    console.log(data);
})()

Example Translate;

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.translate('Hello! How are you', 'tr');
    console.log(data);
})()

Example Discord User Info;

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.users('701518625760346172');
    console.log(data);
})()
const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.wikipedia('Yusuf Dikeç');
    console.log(data);
})()

Example Gold Price (Only Turkiye);

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.altin();
    console.log(data);
})()

Example Earthquakes (Only Turkiye);

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.depremler(2);
    console.log(data);
})()

Example Currency (Only Turkiye);

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.doviz();
    console.log(data);
})()

Example News (Only Turkiye);

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.haberler('dunya', 2);
    console.log(data);
})()

Example Prayer Times (Only Turkiye);

const { Api } = require('mzr-api');
const mzrapi = new Api('YOUR_API_KEY');

(async () => {
    const data = await mzrapi.namazVakitleri('İstanbul', 'Esenyurt');
    console.log(data);
})()