Rewrite api:load script

This commit is contained in:
freearhey committed 2023-10-07 07:19:39 +03:00
1 parent 3f348fd15d
commit 1f6e1e10e4
9 files changed
+379 -50

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { Logger } from '@freearhey/core'
import { ApiClient } from '../../core'
async function main() {
const logger = new Logger()
const client = new ApiClient({ logger })
const requests = [
client.download('blocklist.json'),
client.download('categories.json'),
client.download('channels.json'),
client.download('countries.json'),
client.download('languages.json'),
client.download('regions.json'),
client.download('subdivisions.json')
]
await Promise.all(requests)
}
main()