kusc_api
v1.2.1
Published
Basic wrapper for KUSC's audio streams
Maintainers
Readme
KUSC API
A Node.js wrapper for the KUSC radio streaming API.
Installation
npm install kusc-apiUsage
import { getStreamUrl, getCurrentMetadata, selectStream } from 'kusc-api';
// Get stream URL
const url = await getStreamUrl('KUSC', 'AAC96');
// Get current track metadata
const metadata = await getCurrentMetadata('KUSC');
// Interactive stream selection
const stream = await selectStream();API Reference
getStreams()
Gets a list of available streams
getStreamInfo(streamId)
Gets information about the given stream id
getStreamUrl(streamId, preferredStream (optional))
Gets a suitable audio stream URL for the given id and preferred format
getCurrentMetadata(streamId, includeImage(optional))
Gets current track metadata for the given stream id, optionally including image data
selectStream()
Shows a nice dialog for selecting a stream using blessed
