SetToken function added

This commit is contained in:
killer069
2021-10-12 13:56:33 +05:30
parent 80d6ecba96
commit 229bbc7a11
5 changed files with 160 additions and 80 deletions

24
play-dl/token.ts Normal file
View File

@@ -0,0 +1,24 @@
import { setSoundCloudToken } from "./SoundCloud";
import { setSpotifyToken } from "./Spotify";
import { setCookieToken } from "./YouTube/utils/cookie";
interface tokenOptions {
spotify? : {
client_id : string
client_secret : string;
refresh_token : string
market : string
}
soundcloud? : {
client_id : string
}
youtube? : {
cookie : string
}
}
export function setToken(options : tokenOptions){
if(options.spotify) setSpotifyToken(options.spotify)
if(options.soundcloud) setSoundCloudToken(options.soundcloud)
if(options.youtube) setCookieToken(options.youtube)
}