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 { YouTube } from 'youtube-sr';
|
||||
|
||||
/**
|
||||
* Utility env
|
||||
*/
|
||||
export class Env {
|
||||
|
||||
/**
|
||||
* The soundcloud client
|
||||
*/
|
||||
static get SoundcloudClient() {
|
||||
return Client;
|
||||
}
|
||||
|
||||
/**
|
||||
* The soundcloud store utils
|
||||
*/
|
||||
static get SoundcloudStore() {
|
||||
const store = Store as Map<string, string>;
|
||||
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
|
||||
return { setAPIkey };
|
||||
}
|
||||
|
||||
/**
|
||||
* The youtube search
|
||||
*/
|
||||
static get youtube() {
|
||||
return YouTube;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue