mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-guides.js
This commit is contained in:
parent
8baeed2247
commit
da23d7e267
6 changed files with 35 additions and 13 deletions
15
scripts/core/api.js
Normal file
15
scripts/core/api.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
class API {
|
||||
constructor(filepath) {
|
||||
this.collection = require(filepath)
|
||||
}
|
||||
|
||||
get(id) {
|
||||
return this.collection.find(c => c.id === id)
|
||||
}
|
||||
}
|
||||
|
||||
const api = {}
|
||||
|
||||
api.channels = new API('../data/channels.json')
|
||||
|
||||
module.exports = api
|
Loading…
Add table
Add a link
Reference in a new issue