1.2.3 • Published 10 days ago

genshin-manager v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

GenshinManager

Overview

A Node.js Enka.network and Genshin Data wrapper for Genshin Impact

This is NOT the source code of Enka.Network or its API.

Description

  • User Data and Character Stats using EnkaNetwork.
  • All Characters and All Weapons Data. (Including More Advanced Info, such as Skill Attributes and Weapon Refinements.)
  • Cache Updater for the new update of Genshin Impact.
  • Easily instantiated using id

Installation

Node.js 18 or newer is required.

Install genshin-manager including genshin cache data.(download EN TextMap by default.)

npm install genshin-manager

You can specify which TextMap to download during installation.('ALL' can also be specified).

npm install genshin-manager --download-language="JP"

If you have already moved the cache to another folder, you can also install without downloading the cache.

npm install genshin-manager --nocache=true

About Genshin Cache Data

Genshin cache data is from Dimbreath/AnimeGameData.

This data contains data of characters, weapons, materials, and more structure information of Genshin Impact.

You can change your cache directory.

const { Client } = require('genshin-manager')

// Change the directory to store cache data.
// Default directory is node_modules/genshin-manager/cache.
const client = new Client({ assetCacheFolderPath: './cache' })
await client.deploy()

Updating

You can update your genshin cache data.

const { Client } = require('genshin-manager')

// showFetchCacheLog is true by default
const client = new Client({ showFetchCacheLog: true })
await client.deploy()

Also, you can activate auto cache updater.

const { Client } = require('genshin-manager')

// autoFetchLatestAssetsByCron is "0 0 0 * * 3" by default
// By default, it runs every Wednesday at 00:00:00
// downloadLanguages is All TextMap by default
const client = new Client({
  downloadLanguages: ['EN', 'JP'],
  autoFetchLatestAssetsByCron: '0 0 0 * * 3',
})
await client.deploy()

// deactivate
const client = new Client({ autoFetchLatestAssetsByCron: undefined })
await client.deploy()

Also Feature

Images can be cached.

const { Client } = require('genshin-manager')

// autoCacheImage is true by default
const client = new Client({ autoCacheImage: true })
await client.deploy()

Automatically fixes defects in TextMap & ExcelBinOutput when they occur.

const { Client } = require('genshin-manager')

// autoFixTextMap and autoFixExcelBin is true by default
// but, if autoFetchLatestAssetsByCron is undefined, it is forced to false.
const client = new Client({ autoFixTextMap: true, autoFixExcelBin: true })
await client.deploy()

How to use

Fetching Enka Data

EnkaManager#fetch

const { Client, EnkaManager } = require('genshin-manager')

// Loading cache
const client = new Client()
await client.deploy()

const enkaManager = new EnkaManager()

const enkaData = await enkaManager.fetchAll(800802278)
console.log(enkaData.uid)
console.log(enkaData.playerDetail)
console.log(enkaData.characterDetails)
console.log(enkaData.nextShowCaseDate)

Genshin Character from characterId

Character

const { Client, CharacterInfo } = require('genshin-manager')

// Loading cache
const client = new Client({ defaultLanguage: 'JP' })
await client.deploy()

const character = new CharacterInfo(10000002)
// print character name in language "jp"
console.log(character.name) // output: 神里綾華

Genshin Weapon from characterId

Weapon

const { Client, Weapon } = require('genshin-manager')

// Loading cache
const client = new Client({ defaultLanguage: 'JP' })
await client.deploy()

const weapon = new Weapon(13501)
// print weapon name in language "jp"
console.log(weapon.name) // output: 護摩の杖

You can see the examples, please check Examples

For more information, please check Documentation.

You can see the changelog here.

1.2.0

10 days ago

1.2.3

10 days ago

1.2.2

10 days ago

1.2.1

10 days ago

1.1.4

18 days ago

1.1.3

18 days ago

1.1.2

1 month ago

1.1.1

1 month ago

1.1.0

2 months ago

1.0.6

2 months ago

1.0.5

3 months ago

1.0.4

3 months ago

1.0.2

3 months ago

1.0.3

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago

0.5.0

4 months ago

0.4.10

4 months ago

0.4.9

4 months ago

0.4.8

4 months ago

0.4.7

4 months ago

0.4.6

4 months ago

0.4.5

4 months ago

0.4.4

5 months ago

0.4.3

5 months ago

0.4.1

5 months ago

0.4.0

5 months ago

0.4.2

5 months ago

0.3.7

5 months ago

0.2.15

6 months ago

0.2.14

6 months ago

0.2.13

6 months ago

0.2.12

7 months ago

0.2.11

7 months ago

0.3.0

6 months ago

0.3.6

5 months ago

0.3.5

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.3.4

6 months ago

0.3.3

6 months ago

0.2.10

7 months ago

0.1.0

8 months ago

0.2.1

8 months ago

0.1.2

8 months ago

0.2.0

8 months ago

0.1.1

8 months ago

0.2.7

7 months ago

0.2.6

7 months ago

0.2.9

7 months ago

0.2.8

7 months ago

0.2.3

8 months ago

0.1.4

8 months ago

0.2.2

8 months ago

0.1.3

8 months ago

0.2.5

7 months ago

0.2.4

7 months ago

0.0.18

9 months ago

0.0.17

9 months ago

0.0.16

9 months ago

0.0.15

9 months ago

0.0.14

9 months ago

0.0.13

9 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago