Skip to content

JimmyGaubert/nosranking-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@earlam/nosranking-module

NPM Downloads NPM Version

NosRanking Logo

A Node.js module to fetch data from the NosRanking API.

Table of Contents

Installation

To install the module, run the following command:

npm install @earlam/nosranking-module

Usage

Here’s how to use the module to get data from the NosRanking API:

const { fetchRanking } = require('@earlam/nosranking-module');

// Example usage
fetchRanking('fr', 1, 'Earlam')
    .then(data => {
        console.log(data);
    })
    .catch(error => {
        console.error('Error:', error);
    });

API

fetchRanking(region, server, nick)

This function retrieves player rankings from the NosRanking API.

Parameters

  • region: string - The region to use. Available options: fr, de, en, us, int.
  • server: number - The server to use (e.g., 1 for EU-Dragonveil, 2 for US-Cylloan).
  • nick: string - The player's nickname whose data you want to retrieve.

Example

To get the ranking of a player on the French server:

fetchRanking('fr', 1, 'Earlam')
    .then(data => {
        console.log(data);
    });

Contributing

Contributions are welcome! If you have ideas or improvements, feel free to open an issue or pull request.

License

Distributed under the MIT License. See LICENSE for more information.


Contact

For any questions, feel free to contact me via my GitHub profile.

About

A Node.js module to fetch data from the NosRanking API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published