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

Industry News #543

Merged
merged 15 commits into from
May 31, 2024
Merged

Industry News #543

merged 15 commits into from
May 31, 2024

Conversation

irfan-dahir
Copy link
Collaborator

@irfan-dahir irfan-dahir commented Feb 1, 2024

This implements 5 new API endpoints and refactors how the news parser works.
Feature Tracker: #391

To do

  • getRecentNews
  • getNewsByTag
  • getNewsSearch
  • getNewsTags
  • getNews
  • Unit Tests

getRecentNews

Description: Retrieves the latest news listing
URL: https://myanimelist.net/news?p=1

API Request:

(new \Jikan\MyAnimeList\MalClient())
    ->getRecentNews(
        new \Jikan\Request\News\RecentNewsRequest(1)
    );

REST API Remarks: It would probably be best to use this method to loop through each ID, fetch their details via getNews and index/populate them directly into MongoDB/TypeSense. This would allow us to provide a better search experience.

getNewsByTag

Description: Retrieves news listing by tag
URL: https://myanimelist.net/news/tag/new_anime

API Request:

(new \Jikan\MyAnimeList\MalClient())
    ->getNewsByTag(
        new \Jikan\Request\News\NewsByTagRequest('new_anime', 1)
    );

REST API Remarks: Won't need this scraper API call on the REST API because we'll have custom search.

getNewsSearch

Description: Retrieves news listing by query
URL: https://myanimelist.net/news/search?q=bleach&p=1

API Request:

(new \Jikan\MyAnimeList\MalClient())
    ->getNewsSearch(
        new \Jikan\Request\Search\NewsSearchRequest('bleach', 1)
    );

REST API Remarks: Won't need this scraper API call on the REST API because we'll have custom search.

getNewsTags

Description: Retrieves all news tags and their respective types
URL: https://myanimelist.net/news/tag

API Request:

(new \Jikan\MyAnimeList\MalClient())
    ->getNewsTags(
        new \Jikan\Request\News\NewsTagsRequest()
    );

REST API Remarks: Periodic sync and overwrite like we have for Anime and Manga Genres. There are 100+ entries and type available so we could paginate, provide basic name search (use case: auto completion), and type filter.

getNews

Description: Retrieves news resource
URL: https://myanimelist.net/news/70500055

Warning

Work in progress

API Request:

(new \Jikan\MyAnimeList\MalClient())
    ->getNews(
        new \Jikan\Request\News\News("70500055")
    );

REST API Remarks: We'll use a periodic sync strategy with getRecentNews to get all new entries in one go and keep the list updates.

@irfan-dahir irfan-dahir added this to the 5.0.0 milestone Feb 1, 2024
@irfan-dahir irfan-dahir self-assigned this Feb 1, 2024
Copy link

github-actions bot commented May 5, 2024

This pull request will be closed and archived in 18 days, as there has been no activity in the last 60 days. If this is still being worked on, please respond and we will re-open this pull request.

@irfan-dahir irfan-dahir added in progress Features/Issues that are in progress of being completed/fixed and removed archived labels May 5, 2024
@irfan-dahir irfan-dahir marked this pull request as ready for review May 31, 2024 08:59
@irfan-dahir irfan-dahir merged commit 65b89ea into 5.0.0 May 31, 2024
3 checks passed
@irfan-dahir irfan-dahir removed the in progress Features/Issues that are in progress of being completed/fixed label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant