1.2.1 • Published 2 years ago

better-lautfm v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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)
1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago