Skip to content

sigvt/dex

Repository files navigation

▶️ dex

Actions Status: test npm

Node.js library & CLI for Holodex.

Node.js

The library structure is fully synced with the URL structure of the Holodex API. This way, when a new endpoint is created in the Holodex API, you can access it immediately without waiting for the library to be updated. See Muffled API and Holodex API Docs for further reads.

import { holodex } from "@holodata/dex";

async function main(token) {
  const api = holodex({ token });

  // fetch upcoming/live streams
  const liveStreams = await api.live({ org: "All Vtubers", status: "live" });

  // get channel
  const channel = await api.channels["UCMwGHR0BTZuLsmjY_NT5Pwg"]();

  // search videos
  const videos = await api.search.videoSearch({
    target: ["stream"],
    conditions: [{ text: "Korone" }],
  });
}

main(process.env.HOLODEX_TOKEN);

CLI

dex live [org]
dex live hololive
dex live hololive -f 'type == "upcoming"' -f 'name of channel ~= "Korone"'
dex live --json

dex channel <id>
dex channel UCMwGHR0BTZuLsmjY_NT5Pwg

dex search <query>
dex search Minecraft

Install

npm

npm i -g @holodata/dex

Homebrew

brew tap sake.sh/holodata https://sake.sh/holodata
brew install holodex