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

feat(provider)!: add provider abstract classes and interfaces #162

Merged
merged 15 commits into from
Jun 20, 2024

Conversation

barrientosvctor
Copy link
Collaborator

BREAKING CHANGE: This pull request change the way you create new providers. Now, all scraper models must be created by inheriting a base scraper model class. Only when creating a new class of a new type of provider.

This pull request causes changes on the interfaces name, classes name and properties name. All name changes will be listed here:

Interfaces

  • IAnime -> IAnimeMedia
  • IManga -> IMangaMedia
  • IAnimeSearch -> IAnimeResult

Classes

  • Anime -> AnimeMedia
  • Manga -> MangaMedia
  • AnimeSearch -> AnimeResult

Base providers

Also, this pull request contains base interfaces and classes for the creation of new type of provider class. Listed here:

Interfaces

  • IBaseMedia
  • IBaseChapter
  • IBaseResult

Classes

  • BaseMedia
  • BaseChapter
  • BaseResult

Resolves #161

BREAKING CHANGE: This will be the base class of all type of providers.
BREAKING CHANGE: Some properties of anime class has changed its name.
BREAKING CHANGE: Some properties of manga class has changed its name.
BREAKING CHANGE: The 'url' property was removed from base interfaces and classes. Now, the 'url' property should be created individually for every interface. This allows us to not to set urls of wrong type of provider.
BREAKING CHANGE: Some properties of the new inherited chapters interfaces will change.
BREAKING CHANGE: Some old properties of the episode interface was renamed to the base properties name.
BREAKING CHANGE: Some old properties of the Manga chapter interface was renamed to the base properties name.
This change allow us to only pass interfaces inherited from the base interfaces.
Copy link

vercel bot commented May 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jimov-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 10:51pm
jimov-api-hf2p ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 10:51pm

BREAKING CHANGE: Now, MangaVolume has been inherited from the base BaseChapter class.
Copy link

grafbase bot commented Jun 13, 2024

Graph was successfully deployed.

View Deployment

@koikiss-dev koikiss-dev merged commit 079c249 into dev Jun 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change fix improve codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abstractions to provider classes and types to make codebase more maintainable
5 participants