Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to nekos v2 for Images #15

Merged
merged 12 commits into from
Apr 24, 2023
Merged

Migrate to nekos v2 for Images #15

merged 12 commits into from
Apr 24, 2023

Conversation

vexuas
Copy link
Owner

@vexuas vexuas commented Apr 23, 2023

Context

Holy smokes this feels like I'm at work, why the heck did this madman create a jsonapi spec on a personal project this huge. And why in the world did I go ahead in trying to consume this data smh. Jokes aside, it's great to see young peeps challenging themselves to more advanced implementation even if it means less users would be able to use it

Overall it's pretty neat, I was expecting the responses and resources returned would be filled with bugs but for the most part they're working as the spec intends it to be. There's a couple of inconsistencies with naming and a hell of a lot of missing resources but otherwise it's usable at least.

It's considerably slower tho than v1 and my goodness a hell of a lot more NSFW pics. Can't do much on the former since the optimisations have to go on their side but I can probably figure out a way to filter out the pics. I'm just worried that the quality of the images returned would plummet if I only filter in one ageRating; I don't really trust the tagging they did with the explicit content. (Some questionable ones return as legit NSFW)

Anyway this pr adds probably 80% of the Image resource with schemas and decorators. Also updated the image command to return a more advanced embed with relevant data. I wonder if it's a good idea to make an API wrapper to help out other peeps after I finish everything tho. Heck I do this for a living and I already struggle, I imagine most people would also go through the same. I'll sleep on it

image

v2 image command

Change

  • Create adapters and schemas for v2 random image
  • Add helpers for mapping relationships and included resources
  • Add mocks
  • Add v2 embed for image command

Considerations

I'll do tests after finishing up the schemas. This pr is already huge enough as it is and I'd probably lose my mind if I start trying to test before relying on typescript

@vexuas vexuas added the enhancement Increment the minor version when merged label Apr 23, 2023
@vexuas vexuas merged commit 577f2f2 into develop Apr 24, 2023
@vexuas vexuas deleted the feature/migrate-to-nekos-v2 branch April 24, 2023 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant