I am a versatilist and easily adapt to different hats (Full Stack Web Developer π beginner level Designer π¨) depending on what the project requires. I love exploring new tech stack π» and leveraging them to build cool stuffs π οΈ.
HoYoAPI is an unofficial API Wrapper library developed to facilitate communication with the official HoYoLab API.
Home Page: https://vermaysha.github.io/hoyoapi/
License: MIT License
It seems that while GenshinImpact has everything working properly, for Star Rail, only the daily API works. Once you can something like hsr.record.records(), hsr.record.characters()
etc., you get a HoyoAPIError: param error
, note that this does not occur for Genshin with the same cookie.
Hello, can you please add method to retrieve genshin TCG data (https://bbs-api-os.hoyolab.com/game_record/genshin/api/gcg/basicInfo)?
People who have recently made an HoYoLab account don't have a v1 cookie, only ltuid_v2 and ltoken_v2 but the module only supports v1.
how/where do you obtain cookieTokenV2? for the HSR stuff ( mainly HonkaiStarRail.create() )
since it doesn't appear in the cookies for me, on PC and mobile browsers.
There is a chance of triggering geetest (captcha) during daily check-in. Although the retcode
is 0 and message
is 'ok', gt_result
object is returned by the API. It is pretty obvious that the library can't solve captcha but it will be really cool if geetest data was returned by genshin.daily.claim() and there was a way to retry this method with solved (manually) geetest.
Here is an example response of the request sent to DAILY_CLAIM_API
(Genshin) endpoint when geetest was triggered:
{
data: {
code: 'ok',
first_bind: false,
gt_result: {
risk_code: 5001,
gt: 'a280f1e34s45a37ae91c65fc745fba71c',
challenge: 'ef74ab0042086a343ba869f5e29dab6e',
success: 1,
is_risk: true
}
},
message: 'OK',
retcode: 0
}
Note: Looks like success
in gt_result
is 0 if API accepted solved geetest.
Hello,
When using my V1 cookie to check in like so:
const account = new GenshinImpact({
cookie: {
ltuid: parseInt(ltuid),
ltoken,
},
lang: LanguageEnum.ENGLISH,
});
const result = await account.daily.claim();
It worked initially (check-in once but then said I had already checked in if I tried again) but after a while it allows me to check in multiple times in a row - returning a code of 0
and OK
each time, even though I had already checked in today. Also, it sends the wrong item in result.reward.award
. It said I had claimed 5000 Mora (day 3 of check-in for July) but when I checked in-game, I had got 3 Adventurer's Experience (day 1 of check-in). Do I need to use the V2 cookie instead or am I doing something wrong?
Recently more and more users can only obtain v2 cookies. I hope this package can be updated as soon as possible and the previous bugs can be fixed.
title
I was able to use the cookie normally a little earlier. After the cookie expired, I tried to change the cookie, but I found that no matter whether I set the v1 or v2 cookie, the error HoyoAPIError: Cookie key ltuid or ltoken doesnβt exist !
I would suggest that the documentation for this package say the user should run the cookie extraction script by opening the dev console in their web browser instead of just pasting the script into their address bar, to avoid confusion. Most browsers don't allow you to paste and run JavaScript code from your address bar anymore, to prevent genuinely malicious XSS attacks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.