mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added profiles methods
This commit is contained in:
parent
6552b734c8
commit
731c6d74db
@ -1,25 +1,49 @@
|
||||
export default class Livestream {
|
||||
static async getStreamingKey() {
|
||||
const request = await app.cores.api.customRequest( {
|
||||
method: "GET",
|
||||
url: `/tv/streaming/key`,
|
||||
static async deleteProfile(profile_id) {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "DELETE",
|
||||
url: `/tv/streaming/profile`,
|
||||
data: {
|
||||
profile_id
|
||||
}
|
||||
})
|
||||
|
||||
return request.data
|
||||
}
|
||||
|
||||
static async regenerateStreamingKey() {
|
||||
const request = await app.cores.api.customRequest( {
|
||||
static async postProfile(payload) {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "POST",
|
||||
url: `/tv/streaming/key/regenerate`,
|
||||
url: `/tv/streaming/profile`,
|
||||
data: payload,
|
||||
})
|
||||
|
||||
return request.data
|
||||
}
|
||||
|
||||
static async getProfiles() {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "GET",
|
||||
url: `/tv/streaming/profiles`,
|
||||
})
|
||||
|
||||
return request.data
|
||||
}
|
||||
|
||||
static async regenerateStreamingKey(profile_id) {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "POST",
|
||||
url: `/tv/streaming/regenerate_key`,
|
||||
data: {
|
||||
profile_id
|
||||
}
|
||||
})
|
||||
|
||||
return request.data
|
||||
}
|
||||
|
||||
static async updateLivestreamInfo(payload) {
|
||||
const request = await app.cores.api.customRequest( {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "POST",
|
||||
url: `/tv/stream/info`,
|
||||
data: {
|
||||
@ -31,7 +55,7 @@ export default class Livestream {
|
||||
}
|
||||
|
||||
static async getCategories(key) {
|
||||
const request = await app.cores.api.customRequest( {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "GET",
|
||||
url: `/tv/streaming/categories`,
|
||||
params: {
|
||||
@ -49,7 +73,7 @@ export default class Livestream {
|
||||
username = app.userData.username
|
||||
}
|
||||
|
||||
const request = await app.cores.api.customRequest( {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "GET",
|
||||
url: `/tv/stream/info`,
|
||||
params: {
|
||||
@ -65,7 +89,7 @@ export default class Livestream {
|
||||
throw new Error("Username is required")
|
||||
}
|
||||
|
||||
let request = await app.cores.api.customRequest( {
|
||||
let request = await app.cores.api.customRequest({
|
||||
method: "GET",
|
||||
url: `/tv/streams`,
|
||||
params: {
|
||||
@ -77,7 +101,7 @@ export default class Livestream {
|
||||
}
|
||||
|
||||
static async getAddresses() {
|
||||
const request = await app.cores.api.customRequest( {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "GET",
|
||||
url: `/tv/streaming/addresses`,
|
||||
})
|
||||
@ -86,7 +110,7 @@ export default class Livestream {
|
||||
}
|
||||
|
||||
static async getLivestreams() {
|
||||
const request = await app.cores.api.customRequest( {
|
||||
const request = await app.cores.api.customRequest({
|
||||
method: "GET",
|
||||
url: `/tv/streams`,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user