A unofficial Node.js library for HoYoWiki API, can get the details of Genshin Impact items!

Overview

HoYoWiki API (Node.js Library)

English | 繁體中文 | 简体中文

A unofficial Node.js library for HoYoWiki API, can get the details of Genshin Impact items!

Report Issues

Please report any bugs you discover at https://github.com/GoneTone/node-hoyowiki-api/issues.

Installation

Node.js 14.0.0 or newer is required.

npm install @gonetone/hoyowiki-api

Example usage

Get a list of all data:

const {
  Character, // Character
  // Weapon, // Weapons
  // Artifact, // Artifacts
  // Enemy, // Enemies and Monsters
  // Material, // Teyvat's Resources
  CharacterFilters, // Character Filters
  // WeaponFilters, // Weapons Filters
  // ArtifactFilters, // Artifacts Filters
  // MaterialFilters, // Teyvat's Resources Filters
  setLanguage,
  Language
} = require('@gonetone/hoyowiki-api')

setLanguage(Language.ChineseTW).then(async () => {
  const character = new Character() // Character
  // const weapon = new Weapon() // Weapons
  // const artifact = new Artifact() // Artifacts
  // const enemy = new Enemy() // Enemies and Monsters
  // const material = new Material() // Teyvat's Resources

  /* All Genshin Impact character data list */
  const result = await character.getList()
  console.log(result)

  /* All Genshin Impact character data list (Apply "Pyro, 5-Star" filters) */
  const result2 = await character.getList(CharacterFilters.ElementalType.Pyro, CharacterFilters.Quality.Star5)
  console.log(result2)

  /* Total number of data */
  const result3 = await character.getTotal()
  console.log(result3)

  /* Total number of data (Apply "Pyro, 5-Star" filters) */
  const result4 = await character.getTotal(CharacterFilters.ElementalType.Pyro, CharacterFilters.Quality.Star5)
  console.log(result4)

  /* Search list by character name */
  const result5 = await character.searchListByName('Yelan')
  console.log(result5)
})

Get specific item details:

const {
  Entry,
  setLanguage,
  Language
} = require('@gonetone/hoyowiki-api')

setLanguage(Language.ChineseTW).then(async () => {
  const entry = new Entry()

  const result = await entry.get(2252) // "2252" is the ID of the character "Yelan"
  console.log(result)

  const result2 = await entry.get(2254) // "2254" is the ID of the weapon "Aqua Simulacra"
  console.log(result2)

  const result3 = await entry.get(1319) // "1319" is the ID of the character level-up material "Runic Fang"
  console.log(result3)
})

Change API language:

  • Language.EnglishUS - English
  • Language.ChineseTW - 繁體中文
  • Language.ChineseCN - 简体中文
  • Language.German - Deutsch
  • Language.SpanishES - Español
  • Language.French - Français
  • Language.Indonesia - Indonesia
  • Language.Japanese - 日本語
  • Language.Korean - 한국어
  • Language.Portuguese - Português
  • Language.Russian - Pусский
  • Language.Thai - ภาษาไทย
  • Language.Vietnamese - Tiếng Việt
const {
  Entry,
  setLanguage,
  Language
} = require('@gonetone/hoyowiki-api')

setLanguage(Language.Japanese).then(async () => {
  const entry = new Entry()

  const result = await entry.get(2252)
  console.log(result)
})

License

MIT

You might also like...

The high-impact (popular) packages of npm

npm-high-impact The high-impact (popular) packages of npm. Contents What is this? When should I use this? Install Use API npmHighImpact npmTopDependen

Dec 21, 2022

AweSome Book App displays the book details entered by user and saves the information in Local storage. User can add and remove a book title/author to the library and from the library.

Awesome Book App with ES6 Used npm init -y command to create package.json file. Created the entry point for the JavaScript code called index.js Create

Aug 15, 2022

A single-page application that allows users to keep track of their books. Users can add the book details (book title and author) and also, and the books can also be removed. Built with JavaScript, HTML, and CSS

Project Name Awesome book with ES6 Description the project. This is a single page application that allows users to keep track of their books. Users ca

Oct 13, 2022

Get Your Weather Details Now.

Get Your Weather Details Now.

Weatherly React WebApp to Get Your Weather Now Local Installation : Clone the repository: git clone https://github.com/PrajjwalDatir/Weatherly.git cd

Nov 25, 2022

Get event details of competitive programming contests, hackathons etc.

Get event details of competitive programming contests, hackathons etc.

UpCoding Mobile App: (https://github.com/sahanmndl/UpCoding-Demo) This project was bootstrapped with Create React App. Available Scripts In the projec

Nov 4, 2022

An unofficial wrapper for the Bloxlink API using Node.js

Bloxlink API wrapper 🧬 Bloxlink-sdk is a simple, easy to use API wrapper for Bloxlinks API using Node.js. Anyone who can use code should be fairly co

Oct 21, 2022

The awesomebooks project is a simple list, but separated into 3 parts and given a retro feel. The main page is where we can add books, and on another page we can see the list, and remove items. There is also a "contact-us" page.

Awesome Books This is the restructured version of the famous awesome-books project! Here you can find JavaScript broken into modules, using import-exp

Nov 15, 2022

Unofficial API client for the Tidbyt API. Use this client to control Tidbyt devices and integrate with other services.

Tidbyt Client for Node.js Unofficial API client for the Tidbyt API. Use this client to control Tidbyt devices and integrate with other services. Insta

Dec 17, 2022

An API 📦 for the the unofficial MyAnimeList API jikan.moe v4

An API 📦 for the the unofficial MyAnimeList API jikan.moe v4

Marika A promise based API wrapper for the unofficial MyAnimeList API Installation npm i @shineiichijo/marika yarn add @shineiichijo/marika 🚀 Import

Nov 4, 2022
Releases(v1.3.1)
Owner
張文相 Wenxiang Zhang (旋風之音 GoneTone)
I’m a student who from Taiwan. I enjoy coding and I have developed a few projects. | Website: https://blog.reh.tw | Teams: @GoneToneStudio, @MCNewsTools
張文相 Wenxiang Zhang (旋風之音 GoneTone)
Elizabeth Oyinlade Ojesanmi 10 Sep 14, 2022
A secondhand marketplace where you can post items for sale, interact with sellers, save items you are interested in.

Curbside - the secondhand market place that's actually pleasant to use Post items for sale, interact with sellers, save items you are interested in. A

Curbside 14 Sep 9, 2022
A single-page application that allow users to add their To Do items. The items could be checked as completed and the completed task can be removed. Built with JavaScript, HTML and CSS

To Do list Application This is a single page application that allows users to keep track of their tasks. Users can add the task and also check the che

Micheal Oguntayo 4 Oct 14, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A Zotero add-on that scans your Markdown reading notes, tags the associated Zotero items, and lets you open notes for the Zotero items in Obsidian.

Zotero Obsidian Citations Adds colored tags to Zotero items that have associated Markdown notes stored in an external folder. Open an associated Markd

Dae 210 Jan 4, 2023
The app helps you to add todo items to your list, mark completed ones and also delete finished items. Its a handy tool for your day today activies. Check out the live demo.

Todo List App The app helps you to add todo items to your list, mark completed ones and also delete finished items. Its a handy tool for your day toda

Atugonza ( Billions ) Joel 14 Apr 22, 2022
Minimal versions of popular analytics libraries. Reduce the impact of third-party scripts on your application.

minimal-analytics This project aims to provide minimal implementations of popular analytics libraries. It's aimed at users who want to reduce the impa

James Hill 32 Dec 25, 2022