Skip to content

📃 A service for mapping Anime IDs between Database Websites

License

Notifications You must be signed in to change notification settings

beeequeue/arm-server

Repository files navigation

arm-server

This app uses data from anime-offline-database - fetching and updating itself every 24 hours.

Get notifications on important API changes

Subscribe to new releases in this repo:

image

Missing or duplicate entries

Some entries in the database are not mapped correctly due to inconsistent naming - the owner of anime-offline-database cannot fix them due to complexity. Therefore this service has manual rules that combines known failures.

You can help add rules by submitting a manual rule request.

API

Base URL: https://arm.haglund.dev

enum Source {
  anilist,
  anidb,
  myanimelist,
  kitsu,
}

Get IDS:

GET/POST /api/ids

Either use GET with query parameters: ?source={Source}&id={number}

or use POST with a JSON body:

{ "anilist": 1337 }

[{ "anilist": 1337 }, { "anilist": 69 }, { "anidb": 420 }]

Response

interface Entry {
  anilist: number | null
  anidb: number | null
  myanimelist: number | null
  kitsu: number | null
}

// If JSON body is a single object
// { "anilist": 1337 } => Entry | null
// // If JSON body is an array of objects
// [{ ... }] => Array<Entry | null>

The response code will always be 200 (OK). If an entry is not found null is returned instead.

Development

  1. Clone the project
  2. Install dependencies - pnpm
  3. Run database migrations - pnpm migrate
  4. Download data (optional) - pnpm fetch-data
  5. Start the server - pnpm dev

If the database connection fails double check that your NODE_ENV is set to development.