Socket
Socket
Sign inDemoInstall

@vermaysha/hoyolab-api

Package Overview
Dependencies
13
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.4.0

dist/Interfaces/Wiki/WikiCharacterResponse.d.ts

2

dist/Interfaces/Wiki/index.d.ts
export * from './WikiCharactersResponse';
export * from './WikiCharacterResponse';
export * from './WikiCharacterFilter';
export * from './WikiWeaponFilter';
export * from './WikiWeaponResponse';
export * from './WikiDetailWeaponResponse';

@@ -19,4 +19,6 @@ "use strict";

__reExport(Wiki_exports, require("./WikiCharactersResponse"), module.exports);
__reExport(Wiki_exports, require("./WikiCharacterResponse"), module.exports);
__reExport(Wiki_exports, require("./WikiCharacterFilter"), module.exports);
__reExport(Wiki_exports, require("./WikiWeaponFilter"), module.exports);
__reExport(Wiki_exports, require("./WikiWeaponResponse"), module.exports);
__reExport(Wiki_exports, require("./WikiDetailWeaponResponse"), module.exports);

@@ -9,2 +9,3 @@ export declare class BaseURL {

static readonly wikiUrl = "https://sg-wiki-api.hoyolab.com/hoyowiki/genshin/wapi/get_entry_page_list";
static readonly wikiEntryUrl = "https://sg-wiki-api.hoyolab.com/hoyowiki/genshin/wapi/entry_page";
static wikiRefererUrl: string;

@@ -11,0 +12,0 @@ }

@@ -34,2 +34,3 @@ "use strict";

static wikiUrl = "https://sg-wiki-api.hoyolab.com/hoyowiki/genshin/wapi/get_entry_page_list";
static wikiEntryUrl = "https://sg-wiki-api.hoyolab.com/hoyowiki/genshin/wapi/entry_page";
static wikiRefererUrl = "https://wiki.hoyolab.com";

@@ -36,0 +37,0 @@ }

@@ -18,2 +18,8 @@ import * as Interface from './Interfaces/Wiki';

/**
* Get character detailed data
*
* @param entry_id number
*/
getCharacter(entry_id: number): Promise<Interface.WikiCharacterResponse>;
/**
* Get list of all weapons

@@ -25,2 +31,8 @@ *

/**
* Get detailed weapon
*
* @param entry_id number
*/
getWeapon(entry_id: number): Promise<Interface.WikiDetailWeaponResponse>;
/**
* Get data from HoyoWiki API

@@ -32,2 +44,8 @@ *

private getData;
/**
* Get entry data
*
* @param entry_id number
*/
private getEntry;
}

@@ -44,2 +44,10 @@ "use strict";

/**
* Get character detailed data
*
* @param entry_id number
*/
async getCharacter(entry_id) {
return (await this.getEntry(entry_id)).page;
}
/**
* Get list of all weapons

@@ -53,2 +61,10 @@ *

/**
* Get detailed weapon
*
* @param entry_id number
*/
async getWeapon(entry_id) {
return (await this.getEntry(entry_id)).page;
}
/**
* Get data from HoyoWiki API

@@ -86,2 +102,16 @@ *

}
/**
* Get entry data
*
* @param entry_id number
*/
async getEntry(entry_id) {
this.request.setReferer(import_Utils.BaseURL.wikiRefererUrl);
this.request.setParams({
entry_page_id: entry_id
});
this.request.withDS();
const res = await this.request.send(import_Utils.BaseURL.wikiEntryUrl);
return res.data;
}
}

@@ -88,0 +118,0 @@ // Annotate the CommonJS export names for ESM import in node:

2

package.json
{
"name": "@vermaysha/hoyolab-api",
"version": "2.3.0",
"version": "2.4.0",
"description": "Its unofficial HoYoLab API Wrapper for getting hoyoverse some in-game data, including Genshin Impact, Honkai Impact 3rd.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -22,3 +22,3 @@ <div align="center">

<p>
<a href="https://packagist.org/packages/vermaysha/hoyolab-api">
<a href="https://www.npmjs.com/package/@vermaysha/hoyolab-api">
<img src="https://img.shields.io/npm/v/@vermaysha/hoyolab-api.svg?style=flat-square" alt="Latest Version on Packagist">

@@ -44,2 +44,31 @@ </a>

## Features
### HoYoLab API
| Features | Status |
| ----------------------------------------------------------------------------------------------------------- | ---------------------- |
| Displays a list of owned HoYoVerse game accounts | :heavy_check_mark: |
| Displays the exploration history of the HoYoVerse game account that is owned according to the selected game | :heavy_check_mark: |
### Genshin Impact API
| Features | Status |
| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| Get detailed information of the selected account, including character, statistics and exploration history | :heavy_check_mark: |
| Get daily login information on the hoyolab page | :heavy_check_mark: |
| Get prize list information for daily login | :heavy_check_mark: |
| Make claims on daily login rewards | :heavy_check_mark: |
| Gets a full list of acquired characters, including weapons and artifacts used and constellations that have been acquired | :heavy_check_mark: |
| Get a list of daily resources including the daily resin that has been obtained, the status of transformation tools and teapot coins | :heavy_check_mark: |
| Get the history of obtaining primogems and mora through the Diary feature | :heavy_check_mark: |
| Obtain a complete history of the results of the current and previous Spiral Abyss challenge | :heavy_check_mark: |
| Claim the redeem code provided | :heavy_check_mark: |
### HoyoWiki (Genshin Impact)
| Features | Status |
| ------------------------------------------------------ | ------------------ |
| Get complete data for all characters in genshin impact | :heavy_check_mark: |
| Obtain complete data on all weapons in genshin impact | :heavy_check_mark: |
## How to obtain HoYoLab Cookie

@@ -46,0 +75,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc