added getStreamInfo method

This commit is contained in:
srgooglo 2022-10-20 19:49:31 +02:00
parent 551b114f77
commit 3f10f47138

View File

@ -15,6 +15,24 @@ export default class Livestream {
return request
}
static async getStreamInfo(payload) {
let { username } = payload ?? {}
if (!username) {
username = app.userData.username
}
const { data } = await app.api.customRequest("main", {
method: "GET",
url: `/stream/info`,
data: {
username,
}
})
return data
}
static async getLivestream({ username }) {
if (!username) {
throw new Error("Username is required")