Last active
December 24, 2020 22:22
-
-
Save andruu/977c5947e76b78b3a0ad317273c7cfce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
export interface ApiInput { | |
url: string; | |
username: string; | |
password: string; | |
type?: string; | |
output?: string; | |
} | |
export function fetchM3U(input: ApiInput) { | |
const { | |
username, | |
password, | |
url, | |
type = 'm3u_plus', | |
output = 'mpegts' | |
} = input; | |
return axios.get<string>(`${url}/get.php?`, { | |
params: { username, password, type, output } | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment