mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added methods
This commit is contained in:
parent
5b4dd2c5a5
commit
2e6276a354
@ -3,6 +3,18 @@ export default class Livestream {
|
|||||||
return window.app?.api.withEndpoints("main")
|
return window.app?.api.withEndpoints("main")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async getStreamingKey() {
|
||||||
|
const request = await Livestream.bridge.get.streamingKey()
|
||||||
|
|
||||||
|
return request
|
||||||
|
}
|
||||||
|
|
||||||
|
static async regenerateStreamingKey() {
|
||||||
|
const request = await Livestream.bridge.post.regenerateStreamingKey()
|
||||||
|
|
||||||
|
return request
|
||||||
|
}
|
||||||
|
|
||||||
static async getLivestream({ username }) {
|
static async getLivestream({ username }) {
|
||||||
if (!username) {
|
if (!username) {
|
||||||
throw new Error("Username is required")
|
throw new Error("Username is required")
|
||||||
@ -18,6 +30,12 @@ export default class Livestream {
|
|||||||
return request
|
return request
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async getAddresses() {
|
||||||
|
const request = await Livestream.bridge.get.streamingAddresses()
|
||||||
|
|
||||||
|
return request
|
||||||
|
}
|
||||||
|
|
||||||
static async getLivestreams() {
|
static async getLivestreams() {
|
||||||
const request = await Livestream.bridge.get.streams()
|
const request = await Livestream.bridge.get.streams()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user