Update update-guides.js

This commit is contained in:
Aleksandr Statciuk 2022-01-30 04:02:29 +03:00
parent 8baeed2247
commit da23d7e267
6 changed files with 35 additions and 13 deletions

15
scripts/core/api.js Normal file
View 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

View file

@ -4,3 +4,4 @@ exports.file = require('./file')
exports.parser = require('./parser')
exports.timer = require('./timer')
exports.markdown = require('./markdown')
exports.api = require('./api')