Giter Club home page Giter Club logo

jikan-rest's Introduction

Jikan

Jikan - Unofficial MyAnimeList.net REST API

Average time to resolve an issue Percentage of issues still open stable Discord Server

Jikan is a REST API for MyAnimeList.net. It scrapes the website to satisfy the need for an API - which MyAnimeList lacks.

The raison d'être of Jikan is to assist developers easily get the data they need for their apps and projects without having to depend on the lackluster official API, unstable APIs, or sidetracking their projects to develop parsers.

The word Jikan literally translates to Time in Japanese (時間). And that's what this API saves you of. ;)

Notice: Jikan does not support authenticated requests. You can not update your lists.

Getting Started

Requirements

Installation

🐳 Docker

Linux

This is specifically for Ubuntu, but other distributions should work similarly.

  1. Install requirements:
  • Add PHP related packages: sudo add-apt-repository -y ppa:ondrej/php
    • If add-apt-repository is not installed, you can install it by doing sudo apt install python-software-properties or sudo apt install software-properties-common
  • sudo apt update && sudo apt upgrade
  • Install requirements: sudo apt install curl git php redis-server unzip supervisor
  • Verify that PHP 7.1+ is installed: php -v
  • Install the corresponding php-xml and php-mbstring packages for your version, e.g:
    • PHP 7.1: sudo apt install php7.1-xml php7.1-mbstring
    • PHP 7.3: sudo apt install php7.3-xml php7.3-mbstring
  • Install composer: curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
  1. Start the redis server: sudo service redis start

Mac

  1. Install brew
  2. Install requirements: brew install php composer redis supervisor
  3. Start the redis server: brew services start redis

Setting Up

  1. git clone https://github.com/jikan-me/jikan-rest.git
  2. cd jikan-rest
  3. cp .env.dist .env
  4. composer install

Configuring Jikan

You're able to configure Jikan through the .env file.

Before running, you need to set the correct values to the following keys in .env

  1. APP_KEY : a random 32 alphanumeric character string
  2. APP_URL : If you're using a virtual host, set the correct domain here. Additionally, include the port number if you've changed it from the standard. Do not leave a trailing slash.
Do's
  • http://api.jikan.moe ✔️
  • https://api.jikan.local ✔️
  • http://localhost ✔️
  • http://localhost:8000 ✔️
Dont's
  • http://localhost/
  • http://api.jikan.moe/

Configuring Supervisor

Linux
  1. sudo cp conf/supervisor/jikan-worker.conf /etc/supervisor/conf.d
    • Be sure to update to the correct directory in jikan-worker.conf for command and stdout_logfile to the directory of jikan!
  2. sudo supervisorctl reread
  3. sudo supervisorctl update
  4. sudo supervisorctl start jikan-worker:*
Mac
  1. supervisord -c /usr/local/etc/supervisord.ini
  2. Copy conf/supervisor/jikan-worker.conf to /usr/local/etc/supervisor.d/
  3. brew services start supervisor
  4. sudo supervisorctl update
  5. sudo supervisorctl start jikan-worker:*

Ignition

To start the server, create a virtual host and point it to /public:

php -S localhost:8000 -t public

Jikan is now hosted on http://localhost:8000/v3/

ℹ️ You can also configure Jikan for Apache. If you wish to configure it for Nginx or anything else, you'll have to port the rewrite rules located at public/.htaccess

Information

If you don't want to host your instance, there's a public API available.

Wrappers

Add your wrapper here

Running Tests

php vendor/bin/phpunit tests

Note: Tests may fail due to rate limit from MyAnimeList (HTTP 429)

DISCLAIMER

  • Jikan is not affiliated with MyAnimeList.net
  • You are responsible for the usage of this API. Please be respectful towards MyAnimeList's Terms Of Service

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.