mirror of
https://git.lucida.su/lucida/verdana.git
synced 2026-08-14 03:28:57 +00:00
26 lines
559 B
JavaScript
26 lines
559 B
JavaScript
import Tidal from './../build/streamers/tidal/main.js'
|
|
|
|
const client = new Tidal({
|
|
tvToken: 'fX2JxdmntZWK0ixT',
|
|
tvSecret: '1Nn9AfDAjxrgJFJbKNWLeAyKGVGmINuXPPLHVXAvxAg='
|
|
})
|
|
|
|
const init = await client.initiateTokens()
|
|
console.log('Please open', init.url)
|
|
|
|
async function checkLoop() {
|
|
try {
|
|
const tokens = await client.checkTokens(init.deviceCode)
|
|
console.log(tokens)
|
|
process.exit()
|
|
} catch (err) {
|
|
console.log('Error checking tokens', err)
|
|
setTimeout(function () {
|
|
checkLoop()
|
|
}, 10000)
|
|
}
|
|
}
|
|
|
|
setTimeout(function () {
|
|
checkLoop()
|
|
}, 10000)
|