Obtain PNID data directly from account.pretendo.cc + un-hardcode Mii image URL#3
Open
ariankordi wants to merge 4 commits into
Open
Obtain PNID data directly from account.pretendo.cc + un-hardcode Mii image URL#3ariankordi wants to merge 4 commits into
ariankordi wants to merge 4 commits into
Conversation
…+ handle image request in title.ts
…ing with upcoming Bun update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, the mii-unsecure.ariankordi.net/mii_data/ API was used for PNID data. I have changed this to use Pretendo directly, because my site is unreliable and I am considering changing my API.
I have also put the Mii render URL in .env and made a method to obtain it cleanly. This makes self-hosting easier. Another minor detail is that title.ts now handles if the Mii image request fails, so that's good.
Hopefully these changes can also make their way into Roseverse along with self-hosting the server so that I won't cause it to go down again.
All of my changes are UNTESTED, and I would appreciate if one of you gave this a try when possible.
Edit 05/11: I just split the PNID fetching functionality into a class that I posted publicly. I've confirmed this to work with the upcoming Bun update that enables HTTP/2 (which Pretendo blocks)
That class is meant to work with other JS projects as well, so I pasted it in the repo as-is. It is still fully typed and can be ported to .ts easily, though.