@mdworld/radio-metadata
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

radio-metadata

Scalable library to read metadata from radio stations

Use

Clone repo

Run npm start npo2

Response type:

interface RadioMetadata {
  time?: {
    start?: ISOTimeString;
    end?: ISOTimeString;
  };
  broadcast?: {
    name?: string;
    presenter?: string[];
    imageUrl?: string;
  };
  song: {
    artist?: string;
    title?: string;
    imageUrl?: string;
    listenUrl?: string;
  };
}

Programmatic use

Install with npm i @mdworld/radio-metadata

When using in Node, make sure to polyfill the Fetch API with node-fetch.

import { getRadioMetaData } from "@mdworld/radio-metadata";
import { npo2 } from "@mdworld/radio-metadata/lib/presets/npo2";

// built your own schema with this as an example
const schema = npo2;

const run = async () => {
  const tracks = await getRadioMetaData(schema);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @mdworld/radio-metadata

Weekly Downloads

0

Version

1.4.0

License

ISC

Unpacked Size

23.8 kB

Total Files

33

Last publish

Collaborators

  • mdvanes