Git Product home page Git Product logo

anusic-api's Introduction

anusic-api's People

Contributors

dependabot[bot] avatar eoussama avatar hilolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

anusic-api's Issues

Semantic responses for errors

There needs to be a constant, predictable object that contains the data and some additional info.
Something like this:

{
    "hasError": false,
    "error": { "name": "", "description": "" },
    "data": {}
}

Errors:

  • Invalid route
  • Invalid ID (Invalid data type passed as an ID)
  • Unknown ID (MAL ID does not match anything cached.

Open a model on click

When an Anime title is clicked, a model containing all info and themes should be opened.

  • Modal
  • Loader feedback
  • Anime info
  • Themes

Logs

[ ] Console logs
[ ] Log dumps

Scrap on demand

If no requested info was found, attempt scrapping, if anything was found update the cache.

  • Add GetAnimeInfoByID
  • Added a timestamp for when the entry was last scraped
  • Add creation and last update for scraped data

Lyrics

Lyrics should be:

  • Scraped from https://www.animesonglyrics.com/
  • Cached separately

๐Ÿ—ƒ๏ธ Issue with AnimetThemes subreddit API after removal of wiki

It appears that the AnimetThemes subreddit has removed their wiki, which has caused the API to stop working.
Fortunately, I had a sizable cache that was designed to help in situations like this. However, as long as we continue to rely on this cache, the content provided by the API will be limited to late 2022 and earlier.

I'm currently exploring other options to restore the full functionality of the API and will keep the community updated on any developments.

Franchise grouping

Add a franchise endpoint that returns said franchise with linked Anime titles.

Theme collections

Description
Certain Anime titles have several theme collections, a common case is dubbed themes.
In some other case, like One Piece, there are 3 different groups of themes (Original Japanese, Funimation, and 4Kids)

image

Analytics

Request analytics that can either be logged into a file to access from a third-party platform.

  • logs route
  • logs/:id route
  • Add auth
  • Log requests

Request timeout

Requests often exceed the timeout time and end up missing on a chunk of scraped data.

Hide empty tabs

Tabs that have nothing to display shouldn't be displayed in the first place.

Bug Report

Describe the bug
Logger always outputs the host file instead of the initiator file.

To Reproduce
Steps to reproduce the behavior:

  1. Call Log from any file

Add query params

Add query params to /anime that allows for searching by name and year.
searching by name should also take alt names into consideration.

Add a single global audio player

A single audio layer should be displayed in the footer of the modal.
This should decrease the strain and requests to the theme's repository.

Introduce a caching workaround

To avoid spamming the scrapping targets, there needs to exist a caching workaround that does not utilize any in-memory caching libraries. Dumping the data in a JSON file would do the trick.

The dump file should be updated frequently, based on a scheduler of a 1-day interval would be preferable.

  • Dumping the data into a JSON file
  • [ ] Frequent updates to the dump file

Theme count

Display the number of themes available for an Anime title given the type and the collection.

Log dumps

Logs should be dumped somewhere including all errors and warnings.

Refactor

Splitting code and asyncrpnizing calls

Feature request

Description
Raise a warning if the fetched info does not match the total scrapped Anime titles.

Year type parse

Anime titles pre-2000 are scrapped as XXs, thus parsing them into a number type backfires.

Example: http://anusic-api.herokuapp.com/api/v1/anime/21 returns {"id":21,"name":"One Piece","altNames":["Original Japanese Version"],"year":0}

  • Parse era
  • Emit the year entirely

Untitled theme tables

Treat theme tables that are missing headers as the whole table seems to be skipped if no title is found. e.g Naruto, id 20.

image

Memory caching

Now that the project switched languages, a memory caching solution would be more ideal, preferably Redis.
Rough sketch of the global lifecycle of the API:
image

Progression:

  • Dockerizing the API
  • Redis connection
  • Caching aware API
  • Memory dump

Themes

Description
Anime title themes

Structure

  • Name

The name of the theme

  • MALID

The associated Anime MAL ID

  • Type

The type of the theme (Opening or Ending)

  • Order

The chronological order of the opening (1, 2, ...)

List of the theme's link info

  • Link

The link to the theme song

  • Format

The format of the source (Webm...)

  • Resolution

The video resolution (1080, 480...)

  • Lyrics

Whether it has lyrics

  • Transition

Whether the episode transitions into the ending song

  • IsOver

Is the theme laid over the episode

  • Spoilers

Whether the theme contains spoilers

  • NSFW

Whether the theme has NSFW content

  • Episodes

The episodes in which this theme is featured

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.