This repository has been archived by the owner on Dec 28, 2024. It is now read-only.
EnkaAPI // Add MiHoMoAPI mirror server support. #172
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EnkaAPI 会借由自己的境外伺服器自己计算武器与圣遗物面板参数。
国服资料到了这个海外伺服器之后计算完毕再传回国内,要走两遍国际网关。
这使得 EnkaAPI 在查询国服资料的时候出现了大量的时间延迟,已经明显影响到了面板的使用体验。
万幸的是,EnkaAPI 的查询结果的 JSON 结构是「MiHoMoAPI 的 ORIGIN 查询结果 JSON 结构」的超集。
这样一来,使用 MiHoMoAPI 作为分流查询服务器(专门用来查询国服 UID 的面板)就显得有必要了。
这个 PR 完成了对 MiHoMoAPI 的查询支持。
因为这样一来势必要在用户设备上单独计算武器与圣遗物面板的具体参数,
所以这个 PR 也完善了仅利用 EnkaDB 就地计算武器与圣遗物面板参数的方法。
特此感谢 Enka Networks 私下提供的算法技术支持。
EnkaAPI server is situated outside of Mainland China, calculating Weapon and Artifact parameters.
For all HSR game accounts hosted in Celestia and Irminsul servers, these account's Enka Showcase data runs through the cross-border internet gate twice, resulting in significant time delays.
Fortunately, EnkaAPI Query Result JSON structure is a superset of the one used in the MiHoMo Origin Query Result. However, this results in the needs of calculating Weapon and Artifact parameters on users' device instead.
This PR allows the HBEnkaAPI Swift Package to treat MiHoMo as a mirror server, plus offline calculation of Weapon and Artifact parameters on the users' devices instead. Special thanks to Enka Networks for their help regarding the calculation methods.