From be67452a3a1c7a2d521deecd857f8ba5f90508cf Mon Sep 17 00:00:00 2001 From: replexXx Date: Thu, 10 Sep 2020 13:41:41 +0200 Subject: [PATCH] Update myjdapi.py Added query_packages function to LinkGrabber Class --- myjdapi/myjdapi.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/myjdapi/myjdapi.py b/myjdapi/myjdapi.py index 2eea934..5517f5c 100644 --- a/myjdapi/myjdapi.py +++ b/myjdapi/myjdapi.py @@ -465,12 +465,26 @@ def rename_package(self): """ pass - def query_packages(self): - """ - No idea what parameters i have to pass and/or i don't know what it does. - If i find out i will implement it :P - """ - pass + def query_packages(self, + params=[{ + "availableOfflineCount":True, + "availableOnlineCount":True, + "availableTempUnknownCount":True, + "availableUnknownCount":True, + "bytesTotal":True, + "childCount":True, + "comment":True, + "enabled":True, + "hosts":True, + "maxResults":-1, + "packageUUIDs":[], + "priority":True, + "saveTo":True, + "startAt":0, + "status":True + }]): + resp = self.device.action(self.url + "/queryPackages", params) + return resp def move_packages(self): """