Overview

Fetches a list of the servers for a specific episode. This function takes an episodeId as a parameter. It is required to pass episodeId to fetch the servers of an episode.

Usage

index.ts
import { Hianime } from "hianime";

async function main() {
  const hianime = new Hianime();

  // Takes an episodeId as a parameter,
  // in the example it is "3303" which is the episodeId of the anime "Attack on Titan" Episode 1
  const result = await hianime.getEpisodeServers("3303");
  console.log(JSON.stringify(result, null, 2));
}

main();
The episodeId can be found on each Episode object from the getEpisodes(). method.

Response

response
{
  "sub": [
    {
      "type": "sub",
      "id": "579601",
      "serverId": "4",
      "name": "HD-1"
    },
    {
      "type": "sub",
      "id": "1180455",
      "serverId": "6",
      "name": "HD-3"
    },
    {
      "type": "sub",
      "id": "413285",
      "serverId": "1",
      "name": "HD-2"
    }
  ],
  "dub": [
    {
      "type": "dub",
      "id": "586962",
      "serverId": "4",
      "name": "HD-1"
    },
    {
      "type": "dub",
      "id": "1180405",
      "serverId": "6",
      "name": "HD-3"
    },
    {
      "type": "dub",
      "id": "7481",
      "serverId": "1",
      "name": "HD-2"
    }
  ]
}

Parameters

episodeId

  • Type: string
  • Required: true
  • Description: The unique identifier of the episode