better-lautfm
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Codacy Badge npm NPM npm

Better-LautFM

About

This is a lightweight, object orientated and small wrapper for the public LautFM-API. With following Features:

  • types for nearly everything (more will be added soon)
  • nearly full station coverage
  • coverage for basic lautFM requests (status and so on)

Installation

npm install --save better-lautfm

Documentation

For detailed explanation click here

Basic usage

Usage is currently only optimized for CommonJS, other builds will follow soon.

Example for fetching the whole data of a station

import { Station } from 'better-lautfm'

// dont do this in production
async function topLevelAwait() {
  // init station class
  const station = new Station('bravefm')

  // fetch data
  const data = await station.fetch().then(value => value)
  console.log(data)

  /* the following examples will be inserted here (please take care of imports) */
}

topLevelAwait()

Example for fetching the formatted schedule of a station

const schedule = await station.getSchedule().then(value => value)
console.log(schedule)

/better-lautfm/

    Package Sidebar

    Install

    npm i better-lautfm

    Weekly Downloads

    5

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    44.7 kB

    Total Files

    15

    Last publish

    Collaborators

    • randoooom