From 8386e1af228ac46ac0281ec8dfe564ea42c06046 Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Thu, 13 Jun 2024 12:23:28 +0200 Subject: [PATCH] added get restreamers ott all --- src/compress/compress.py | 19 +++++++++++++++++++ src/compress/constants.py | 1 + 2 files changed, 20 insertions(+) diff --git a/src/compress/compress.py b/src/compress/compress.py index dedabb4..4d8fb62 100644 --- a/src/compress/compress.py +++ b/src/compress/compress.py @@ -192,6 +192,25 @@ def get_restreamers(self, start_from :int, amount :int): # #/** # * + # * @param {number} start_from + # * @param {number} amount + # * @returns restreamer list + # */ + def get_restreamers_ott_all(self, start_from :int, amount :int): + return self.req.post(TNGRM_BASE_URL + GET_RESTREAMERS_OTT_ALL, + headers={ + "Content-Type": "application/json", + }, + body = json.dumps({ + "api_key": self.api_key, + "client_id": self.client_id, + "start_from": int(start_from), + "amount": int(amount) + }) + ) + # + #/** + # * # * @returns restreamer object # */ def get_restreamer(self, instance_name : str): diff --git a/src/compress/constants.py b/src/compress/constants.py index 6c581a4..c1ca6b0 100644 --- a/src/compress/constants.py +++ b/src/compress/constants.py @@ -27,6 +27,7 @@ CREATE_CATEGORY = GET_CATEGORIES + "/create" # restreamer GET_RESTREAMERS = "/external/restreamers" +GET_RESTREAMERS_OTT_ALL = GET_RESTREAMERS + "/ott_all" GET_RUNNING_INSTANCES = GET_RESTREAMERS + "/running_instances" GET_RUNNING_SINGLE_INSTANCE = GET_RESTREAMERS + "/single_instance" SCALE_RESTREAMER = GET_RESTREAMERS + "/scale_instance"