Socket
Socket
Sign inDemoInstall

genshin-db

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genshin-db

Genshin Impact v1.4 JSON database. Search and get results in all in-game languages! Sources from the fandom wiki and GenshinData repo.


Version published
Weekly downloads
1.7K
decreased by-7.37%
Maintainers
1
Weekly downloads
 
Created
Source

genshin-db

Genshin Impact JSON database with a robust searching API! Updated to version 1.4. Sources from the fandom wiki and GenshinData repo.


Flexibly search and get the information of characters, talents, constellations, weapons, weapon material, talent material, artifacts, food recipes.

All in-game languages are supported for query and result. (translations available only for characters, talents, constellations, weapons currently).

Start with:

const genshinDb = require('genshin-db');

REFER TO EXAMPLES.md since the readme below isn't detailed.

Every input string to the query parameter will be autocompleted to match possible values. This means doing something like genshin.characters('amb') will give the same results as genshin.characters('amber'). If there are no results, then undefined will be returned.

Every update will probably change the format for some data. If you need to know the data format for some specific version of this library, you can go to the github and switch to the tag version you're on. Then go into the data folder and look at the data to find the format. Don't look into the template folder since it isn't up-to-date.

Please join my discord and talk to me.

Table of Contents

genshinDb.setOptions(opts)

Default options

{
    verbose: false, // used for replacing string names from categories with data object
    nameonly: false, // set this to true if you don't want your query to match any categories or aliases
    querylanguages: ["English"], // array of languages that your query will be searched in
    resultlanguage: "English"
}

If the query matches a category where there may be multiple results like genshinDb.characters('Geo'), then an array of names will be returned. If verbose is set to true, then an array of objects will be returned instead. If nameonly is set to true, then the query search will be limited to only matching names instead.

Supported languages options are: ChineseSimplified, ChineseTraditional, English, French, German, Indonesian, Japanese, Korean, Portuguese, Russian, Spanish, Thai, Vietnamese.

genshinDb.getOptions()

genshinDb.characters(query[, opts])

Returns the profile info for characters.

Possible query inputs include: character names, character titles, constellation names, birthday months, elements, substats, weapon types, talent level-up material types, genders, regions, rarities, and 'name' for the list of all characters.

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.talents(query[, opts])

Returns the combat skills and passive skills for characters.

Possible query inputs include: character names.

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.constellations(query[, opts])

Returns the constellation information for characters.

Possible query inputs include: character names.

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.weapons(query[, opts])

Possible inputs for query parameter are:

  • all weapon names
  • all weapon types
  • all rarities
  • all weapon ascension material types
  • "names"

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.weaponmaterialtypes(query[, opts])

Possible inputs for query parameter are:

  • all weapon ascension material names
  • all days of the week
  • all regions
  • all domains of forgery
  • "names"

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.talentmaterialtypes(query[, opts])

Possible inputs for query parameter are:

  • all talent book names
  • all days of the week
  • all regions
  • all domains of mastery
  • "names"

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.artifacts(query[, opts])

Possible inputs for query parameter are:

  • all artifact set names
  • all rarities
  • "names"

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.recipes(query[, opts])

Possible inputs for query parameter are:

  • all recipe names
  • all rarities
  • all recipe types
  • all ingredients
  • all buffs
  • all characters with specialty dishes

Check out categories.json file to see choices for each category.
Check out examples.md to see example inputs and outputs for this function.

genshinDb.elements(query[, opts])

Input the name of an element

genshinDb.rarity(query[, opts])

dunno about this


"Robust" makes the description sound cooler doesn't it?

My ambition for this library is to include most of the relevant genshin data so it can be downloaded and used easily with any project. Currently the data is manually entered. I would appreciate it a lot if someone could provide me datamined files of the live version.

Webpack

If you want to build a webpack just do npm run build and it'll appear in the dist/genshindb.js. Then you can call all the query functions from above using GenshinDB as the variable. Or you can change the options in webpack.config.js to better fit how you want to use it.

Keywords

FAQs

Package last updated on 19 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc