Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Latest commit

 

History

History
502 lines (339 loc) · 13.5 KB

anime.mdx

File metadata and controls

502 lines (339 loc) · 13.5 KB
sidebar_position
1

Anime

import ApiCodeBlock from '../../src/components/ApiCodeBlock'; import Highlight from '../../src/components/Highlight'; import ApiTryIt from '../../src/components/ApiTryIt';

export const endpoints = [ { method: 'GET', uri: '/v1/anime/:id' }, { method: 'GET', uri: '/v1/anime' }, { method: 'GET', uri: '/v1/random/anime/:count/:nsfw' } ];

This is an object representing an Anime show. The API allows you to retrieve individual Anime as well as a list of them using various filters.

The Anime object

Attributes


id

Unique identifier for an Anime.


anilist_id

AniList external unique identifier.


mal_id

MyAnimeList external unique identifier.


tmdb_id

TheMovieDatabase external unique identifier.


format

The show's format destination.

"TV": 0,
"TV_SHORT": 1,
"MOVIE": 2,
"SPECIAL": 3,
"OVA": 4,
"ONA": 5,
"MUSIC": 6

status

The show's global release status.

"FINISHED": 0,
"RELEASING": 1,
"NOT_YET_RELEASED": 2,
"CANCELLED": 3

titles

A dictionary of the show's titles organized by localization.


descriptions

A dictionary of the show's descriptions organized by localization.


start_date

The show's global release date.


end_date

The known show's global end date.


weekly_airing_day

The known show's episode release day.

"Sunday": 0,
"Monday": 1,
"Tuesday": 2,
"Wednesday": 3,
"Thursday": 4,
"Friday": 5,
"Saturday": 6

season_period

The season on which the show has been released.

"WINTER": 0,
"SPRING": 1,
"SUMMER": 2,
"FALL": 3,
"UNKNOWN": 4

season_year

The year on which the show has been released.


episodes_count

Number of episodes released for the show.


episode_duration

The show's episode average duration in minutes.


trailer_url

External link to the show's trailer video. Possible services:

  • Youtube
  • Dailymotion

cover_image

The show's cover image.


has_cover_image

Indicates if the show has an a cover images associated with it.


cover_color

The show's cover main color, in HEX format.


banner_image

The show's banner image.


genres

A collection of the show's associated genres. You can find all possible values here.


sagas

A collection of the show's associated sagas.

{
  // Map of strings
  // Contains the saga's title in various localizations
  "titles": {}

  // Map of strings
  // Contains the saga's description in various localizations
  "descriptions": {}

  // Integer
  // The saga's first episode number
  "episode_from": 0

  // Integer
  // The saga's last episode number
  "episode_to": 0

  // Integer
  // The saga's total episodes count
  "episodes_count": 0
}

sequel

The show's precedent Anime's unique identifier in story-line.


prequel

The show's successive Anime's unique identifier in story-line.


score

The show's global appreciation indicator. Minimum value is 0 and maximum is 100.


nsfw

Indicates if the show is marked as NotSafeForWork


recommendations

The show's recommended Anime's unique identifier because similar. Ordered by descendent rating.


Example

{
  "anilist_id": 21,
  "mal_id": 21,
  "format": 0,
  "status": 1,
  "titles": {
    "rj": "ONE PIECE",
    "en": "ONE PIECE",
    "jp": "ONE PIECE",
    "fr": "One Piece",
    "it": "One Piece"
  },
  "descriptions": {
    "en": "Gold Roger was known as the Pirate King, the strongest and mo...",
    "fr": "Il fut un temps où Gold Roger était le plus grand de tous les...",
    "it": "Monkey D. Rufy è un giovane pirata sognatore che da piccolo h...",
    "jp": "海賊王を夢見る少年モンキー・D・ルフィを主人公とする、「ひとつなぎの..."
  },
  "start_date": "1999-10-20T00:00:00Z",
  "end_date": "1970-01-01T00:00:00Z",
  "weekly_airing_day": 0,
  "season_period": 3,
  "season_year": 1999,
  "episodes_count": 981,
  "episode_duration": 24,
  "cover_image": "https://s4.anilist.co/file/anilistcdn/media/anime/cov...",
  "cover_color": "#e4a15d",
  "banner_image": "https://s4.anilist.co/file/anilistcdn/media/anime/ba...",
  "genres": [
      "Action",
      "Adventure",
      "Comedy",
      "Drama",
      "Fantasy",
      "Pirates",
      "Shounen",
      "Ensemble Cast",
      "Super Power",
      "Ships",
      "Male Protagonist",
      "Conspiracy",
      "Tragedy",
      "Crime",
      "Time Skip",
      "Politics",
      "Boys' Love",
      "War",
      "Shapeshifting",
      "Swordplay",
      "Lost Civilization",
      "Guns",
      "Animals",
      "Anachronism",
      "Primarily Adult Cast",
      "Cyborg",
      "Skeleton",
      "Espionage",
      "Primarily Male Cast",
      "Gender Bending",
      "Ninja",
      "Henshin",
      "Real Robot",
      "Anti-Hero",
      "Mermaid",
      "Battle Royale",
      "Assassins",
      "Tanned Skin",
      "Zombie",
      "Time Manipulation",
      "Kuudere"
  ],
  "sagas": [{
			"titles": {
				"en": "East Blue Arc",
				"fr": "Saga East Blue",
				"it": "Saga del Mare Orientale",
				"jp": "1st 東の海編"
			},
			"descriptions": {
				"en": "Influenced by Shanks, Luffy starts his journey to become the ...",
				"fr": "Influencé par Shanks, Luffy commence son voyage pour devenir ...",
				"it": "La prima stagione si intitola Saga del Mare Orientale (EAST B...",
				"jp": "ルフィは、たった1人の海賊として大海原へと旅立つ。海軍基地の..."
			},
			"episode_from": 1,
			"episode_to": 61,
			"episodes_count": 61
		}, ...
  ],
  "score": 86,
  "recommendations": [
    2022, 
    10, 
    745, 
    2974, 
    147, 
    416
  ],
  "nsfw": true,
  "has_cover_image": true,
  "id": 11
}

Retrieve a specific Anime

Retrieves an Anime show, based on its unique identifier.

Parameters

No parameters.

Returns

Returns an Anime object if a valid identifier was provided.

Try it

export const retrieveAnimeParams = [ { name: ':id', type: 'number', placeholder: ':id', value: '11' } ];

Get a list of Anime

Returns a list of Anime objects. The Anime are returned sorted by score, with the most popular Anime appearing first.

Parameters


title

A case-insensitive pattern filter on the list based on the titles field values.


anilist_id

A filter on the list based on the anilist_id field value.


mal_id

A filter on the list based on the mal_id field value.


tmdb_id

A filter on the list based on the tmdb_id field value.


formats

A filter on the list based on the format field value.


status

A filter on the list based on the status field value.


year

A filter on the list based on the season_year field value.


season

A filter on the list based on the season_period field value.


genres

A case-sensitive pattern filter on the list based on the genres field values.


nsfw

A filter on the list which excludes Anime classified as Not Safe For Work.


with_episodes

A filter on the list which excludes Anime without episodes available.


Returns

Returns an array of Anime objects with a size based on the filter provided.

Try it

export const getListAnimeParams = [ { name: 'title', type: 'text', placeholder: 'title', value: 'One Piece' }, { name: 'anilist_id', type: 'number', placeholder: 'anilist_id', value: '' }, { name: 'mal_id', type: 'number', placeholder: 'mal_id', value: '' }, { name: 'tmdb_id', type: 'number', placeholder: 'tmdb_id', value: '' }, { name: 'formats', type: 'text', placeholder: 'formats', value: '0,1' }, { name: 'status', type: 'text', placeholder: 'status', value: '1' }, { name: 'year', type: 'number', placeholder: 'year', value: '1999' }, { name: 'season', type: 'text', placeholder: 'season', value: '3' }, { name: 'genres', type: 'text', placeholder: 'genres', value: 'Pirates,War,Cyborg' }, { name: 'nsfw', type: 'checkbox', placeholder: 'nsfw', value: true }, { name: 'with_episodes', type: 'checkbox', placeholder: 'with_episodes', value: false }, ];

Retrieve random Anime

Retrieves a random Anime show list.

Parameters

No parameters.

Returns

Returns a random Anime list.

Try it

export const retrieveRandomAnimeParams = [ { name: ':count', type: 'number', placeholder: ':count', value: '5' }, { name: ':nsfw', type: 'checkbox', placeholder: 'nsfw', value: true } ];