mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Docs + Pretty code
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import { setSoundCloudToken } from "./SoundCloud";
|
||||
import { setSpotifyToken } from "./Spotify";
|
||||
import { setCookieToken } from "./YouTube/utils/cookie";
|
||||
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
|
||||
}
|
||||
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)
|
||||
}
|
||||
export function setToken(options: tokenOptions) {
|
||||
if (options.spotify) setSpotifyToken(options.spotify);
|
||||
if (options.soundcloud) setSoundCloudToken(options.soundcloud);
|
||||
if (options.youtube) setCookieToken(options.youtube);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user