Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/randoooom/better-lautfm
wrapper for the public laut.fm api
https://github.com/randoooom/better-lautfm
api lautfm typescript webradio wrapper
Last synced: 16 days ago
JSON representation
wrapper for the public laut.fm api
- Host: GitHub
- URL: https://github.com/randoooom/better-lautfm
- Owner: Randoooom
- License: mit
- Created: 2021-12-13T14:55:01.000Z (about 3 years ago)
- Default Branch: dev
- Last Pushed: 2022-05-02T14:01:52.000Z (almost 3 years ago)
- Last Synced: 2024-12-25T00:36:55.217Z (about 2 months ago)
- Topics: api, lautfm, typescript, webradio, wrapper
- Language: TypeScript
- Homepage:
- Size: 1.08 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/eca001c7b1814436ac2a7f939d5e3ea7)](https://www.codacy.com/gh/Randoooom/better-lautfm/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Randoooom/better-lautfm&utm_campaign=Badge_Grade)
[![npm](https://img.shields.io/npm/v/better-lautfm)](https://www.npmjs.com/package/better-lautfm)
![NPM](https://img.shields.io/npm/l/better-lautfm)
![npm](https://img.shields.io/npm/dt/better-lautfm)# Better-LautFM
## About
This is a lightweight, object orientated and small wrapper for the public [LautFM-API](https://api.laut.fm). 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](https://github.com/Randoooom/better-lautfm/tree/dev/API.md)## Basic usage
Usage is currently only optimized for CommonJS, other builds will follow soon.
### Example for fetching the whole data of a station
```ts
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
```ts
const schedule = await station.getSchedule().then(value => value)
console.log(schedule)
```