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