player env utils
This commit is contained in:
parent
262dbe23e7
commit
1ca22167ef
1 changed files with 13 additions and 0 deletions
|
@ -2,17 +2,30 @@
|
||||||
import { Store, Client } from 'soundcloud-scraper';
|
import { Store, Client } from 'soundcloud-scraper';
|
||||||
import { YouTube } from 'youtube-sr';
|
import { YouTube } from 'youtube-sr';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility env
|
||||||
|
*/
|
||||||
export class Env {
|
export class Env {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The soundcloud client
|
||||||
|
*/
|
||||||
static get SoundcloudClient() {
|
static get SoundcloudClient() {
|
||||||
return Client;
|
return Client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The soundcloud store utils
|
||||||
|
*/
|
||||||
static get SoundcloudStore() {
|
static get SoundcloudStore() {
|
||||||
const store = Store as Map<string, string>;
|
const store = Store as Map<string, string>;
|
||||||
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
|
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
|
||||||
return { setAPIkey };
|
return { setAPIkey };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The youtube search
|
||||||
|
*/
|
||||||
static get youtube() {
|
static get youtube() {
|
||||||
return YouTube;
|
return YouTube;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue