UNPKG

valorant-info

Version:

A Node.js wrapper for retrieving Valorant game data, including agents, weapons, and maps. Supports multi-language translation!

154 lines (109 loc) โ€ข 4.19 kB
# Valorant Info - Unofficial Valorant API Wrapper for Node.js ๐ŸŽฎ โœ… **Free to use!** ๐Ÿ”ฅ Retrieve **Valorant** agent, weapon, and map data with ease! **Multi-language** support included. ![NPM Version](https://img.shields.io/npm/v/valorant-info?color=blue&style=flat-square) ![Downloads](https://img.shields.io/npm/dt/valorant-info?color=green&style=flat-square) ![License](https://img.shields.io/npm/l/valorant-info?style=flat-square) > **Valorant Info** is a simple and efficient Node.js wrapper for fetching Valorant game data such as agents, weapons, and maps. Now with full language support (`en`, `tr`, and more)! ๐Ÿš€ --- ## ๐Ÿ“Œ Features โœ… Fetch **Weapon Information** (e.g., Phantom, Vandal, Operator) ๐Ÿ”ซ โœ… Retrieve **Map Information** (e.g., Breeze, Bind, Haven) ๐Ÿ—บ๏ธ โœ… Get **Agent Details** with **Abilities** (e.g., Jett, Reyna, Phoenix) ๐ŸŽญ โœ… **Multi-Language Support** (`en`, `tr`, and any other language) ๐ŸŒ โœ… **Structured and Clean JSON Responses** ๐Ÿงน โœ… No need for authentication or API keys ๐Ÿ”‘ โœ… Works with **Node.js** and supports **Promises & Async/Await** โšก --- ## ๐Ÿ“ฆ Installation Install via **npm**: ```sh npm install valorant-info ``` Or using **yarn**: ```sh yarn add valorant-info ``` --- ## ๐Ÿš€ Usage ### Import the package ```js const valorantInfo = require("valorant-info"); ``` ### Get Weapon Information ```js valorantInfo.getWeaponInfo("phantom", "tr") .then(data => console.log(data)) .catch(err => console.error(err)); ``` ### Get Map Information ```js valorantInfo.getMapInfo("breeze", "fr") .then(data => console.log(data)) .catch(err => console.error(err)); ``` ### Get Agent Information with Abilities ```js valorantInfo.getAgentInfo("jett", "es") .then(data => console.log(data)) .catch(err => console.error(err)); ``` --- ## ๐Ÿ“œ API Reference ### `getWeaponInfo(weaponName, language)` - Fetches details of a specified weapon. - **Parameters:** - `weaponName` _(string)_ โ†’ Name of the weapon (e.g., "phantom", "vandal"). - `language` _(string, optional)_ โ†’ Language code (`"en"`, `"tr"`, or any other language). Defaults to `"en"`. - **Returns:** `Promise<object>` โ†’ Weapon details in JSON format. ### `getMapInfo(mapName, language)` - Fetches details of a specified map. - **Parameters:** - `mapName` _(string)_ โ†’ Name of the map (e.g., "breeze", "bind"). - `language` _(string, optional)_ โ†’ Language code (`"en"`, `"tr"`, or any other language). Defaults to `"en"`. - **Returns:** `Promise<object>` โ†’ Map details in JSON format. ### `getAgentInfo(agentName, language)` - Fetches details of a specified agent, including abilities. - **Parameters:** - `agentName` _(string)_ โ†’ Name of the agent (e.g., "jett", "reyna"). - `language` _(string, optional)_ โ†’ Language code (`"en"`, `"tr"`, or any other language). Defaults to `"en"`. - **Returns:** `Promise<object>` โ†’ Agent details with abilities in JSON format. --- ## ๐ŸŒ Language Support Example ### English (Default) ```js valorantInfo.getAgentInfo("breach") .then(data => console.log(data)) .catch(err => console.error(err)); ``` ### Turkish ```js valorantInfo.getAgentInfo("breach", "tr") .then(data => console.log(data)) .catch(err => console.error(err)); ``` ### French ```js valorantInfo.getAgentInfo("breach", "fr") .then(data => console.log(data)) .catch(err => console.error(err)); ``` --- ## โš™๏ธ Requirements - **Node.js v14+** recommended --- ## ๐Ÿ› ๏ธ Contributing Contributions are welcome! If you want to add features or fix bugs: 1. Fork the repository ๐Ÿ“Œ 2. Create a new branch ๐Ÿ”ง 3. Commit your changes โœ… 4. Push and submit a PR ๐Ÿš€ --- ## ๐Ÿ“œ License This project is licensed under the **MIT License**. --- ## ๐ŸŒŸ Support & Contact If you find this package useful, consider giving it a **GitHub star โญ**! For any questions or issues, you can reach out via **[GitHub Issues](https://github.com/utkuberkaykoc/valorant-info/issues)**. --- **Happy Coding! ๐ŸŽฎ๐Ÿš€**