Update telkussa.fi

This commit is contained in:
freearhey
2023-11-28 16:04:21 +03:00
parent 1bad7cfb30
commit 469d48cd03
5 changed files with 158 additions and 48 deletions

View File

@@ -19,12 +19,27 @@ module.exports = {
programs.push({
title: item.name,
description: item.description,
start: start.toString(),
stop: stop.toString()
start,
stop
})
}
})
return programs
},
async channels({ lang }) {
const axios = require('axios')
const data = await axios
.get(`https://telkussa.fi/API/Channels`)
.then(r => r.data)
.catch(console.log)
return data.map(item => {
return {
lang: 'fi',
site_id: item.id,
name: item.name
}
})
}
}