mirror of
https://github.com/SrIzan10/ava.git
synced 2026-06-06 00:46:53 +00:00
18 lines
379 B
TypeScript
18 lines
379 B
TypeScript
/**
|
|
* It converts a radio name to a URL
|
|
* @example
|
|
* ```ts
|
|
* radioResolver('KNGI')
|
|
* ```
|
|
* @returns {string} Radio URL
|
|
*/
|
|
|
|
export function radioResolver(radioName: 'KNGI' | 'Gensokyo Radio'): string {
|
|
switch (radioName) {
|
|
case 'KNGI':
|
|
return 'https://network.kngi.org/radio/8000/stream';
|
|
case 'Gensokyo Radio':
|
|
return 'https://stream.gensokyoradio.net/1';
|
|
}
|
|
}
|