mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added getStreamInfo
method
This commit is contained in:
parent
551b114f77
commit
3f10f47138
@ -15,6 +15,24 @@ export default class Livestream {
|
|||||||
return request
|
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 }) {
|
static async getLivestream({ username }) {
|
||||||
if (!username) {
|
if (!username) {
|
||||||
throw new Error("Username is required")
|
throw new Error("Username is required")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user