1.0.11-beta • Published 3 months ago
icecast-sdk-js v1.0.11-beta
Icecast SDK for JavaScript
NodeJS / Typescript SDK for Icecast APIs
Icecast APIs
https://icecast.org/docs/icecast-trunk/server_stats/ \ https://icecast.org/docs/icecast-trunk/admin_interface/
Install
Use npm
to install the module
npm install icecast-sdk-js
Or use yarn
to install the module
yarn add icecast-sdk-js
Usage
Get Stats
import IcecastServer from 'icecast-sdk-js'
const hostUrl = 'http://locahost:8000'
const ic = new IcecastServer(hostUrl)
;(async () => {
const stats = await ic.getStats()
console.log(stats)
})()
Update Source Title (Requires Icecast Server admin username and password)
import IcecastServer from 'icecast-sdk-js'
const { IC_HOST, IC_USERNAME, IC_PASSWORD } = process.env || {}
const ic = new IcecastServer(IC_HOST, { username: IC_USERNAME, password: IC_PASSWORD })
;(async () => {
const mountpoint = 'testmountpoint'
const title = 'test title'
try {
const source = await ic.updateSource(mountpoint, title)
console.log(source)
} catch (error) {
console.log(error.response.data)
}
})()
1.0.11-beta
3 months ago
1.0.10-beta
3 months ago
1.0.9-beta
6 months ago
1.0.8-beta
11 months ago
1.0.7-beta
11 months ago
1.0.6-beta
11 months ago
1.0.5-beta
11 months ago
1.0.4-beta
11 months ago
1.0.3-beta
11 months ago
1.0.2-beta
11 months ago
1.0.1-beta
11 months ago
1.0.0-beta
11 months ago