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.
This implements 5 new API endpoints and refactors how the news parser works.
Feature Tracker: #391
To do
getRecentNews
Description: Retrieves the latest news listing
URL: https://myanimelist.net/news?p=1
API Request:
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:
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:
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:
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:
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.