mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
added getStreamInfo
method
This commit is contained in:
parent
551b114f77
commit
3f10f47138
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user