From e0ffa909bea39ac8ec92a52952703377191e659d Mon Sep 17 00:00:00 2001 From: RoRo160 <79665729+RoRo160@users.noreply.github.com> Date: Sun, 12 Sep 2021 14:06:27 +0200 Subject: [PATCH 1/3] IServ.vc_load() added: - returns dictionary with info about videoconference server load/usage - takes no args --- iserv.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/iserv.py b/iserv.py index dc70cac..55f3bc8 100644 --- a/iserv.py +++ b/iserv.py @@ -22,7 +22,8 @@ class IServ: "login": "/iserv/app/login", "logout": "/iserv/app/logout", "plan": "/iserv/plan/show/raw/", - "tasks": "/iserv/exercise.csv" + "tasks": "/iserv/exercise.csv", + "vc_load": "/iserv/videoconference/api/health" } messages = { "login_failed": "Anmeldung fehlgeschlagen!" @@ -201,3 +202,10 @@ def tasks( }) return tasks + + def vc_load(self): + r = self._s.get( + url=self.domain + IServ.paths["vc_load"] + ) + + return r.json() From bfdeccd03547d6c9a1db065ac1681cac8b89683d Mon Sep 17 00:00:00 2001 From: RoRo160 <79665729+RoRo160@users.noreply.github.com> Date: Sun, 12 Sep 2021 20:10:21 +0200 Subject: [PATCH 2/3] Added/Updated version to v.0.02.0-beta --- README.md | 4 ++-- iserv.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 775a9a6..f157fd1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # IServ.py -`Made by RoRo160` `v.0.01.0-beta` +`Made by RoRo160` `v.0.02.0-beta` This module provides an easy way to communicate with your IServ account. I reverse-engineered parts of the internal IServ api and recreated some http requests your browser would do in the @@ -96,6 +96,6 @@ tasks = iserv.tasks( # -> By RoRo160 `v.0.01.0-beta` +> By RoRo160 `v.0.02.0-beta` > > [My GitHub](https://github.com/RoRo160) diff --git a/iserv.py b/iserv.py index 55f3bc8..414f9c3 100644 --- a/iserv.py +++ b/iserv.py @@ -4,6 +4,9 @@ from bs4 import * +VERSION = (0, 2, 0, "beta") + + DAYS = [ "monday", "tuesday", From 464be9ec21b545225265b0d85d669346811c3bf3 Mon Sep 17 00:00:00 2001 From: RoRo160 <79665729+RoRo160@users.noreply.github.com> Date: Sun, 12 Sep 2021 20:11:37 +0200 Subject: [PATCH 3/3] Added new feature (vc server load) to README.md + usage explanation --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index f157fd1..d381d44 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ background. - Login/Logout with your IServ account - Plan changes, by week, day, filtered by course - Get all tasks +- Videoconference server load/usage ### Coming soon: @@ -94,6 +95,13 @@ tasks = iserv.tasks( # do something with task list ```` +#### Vc. server load: +````python +load = iserv.vc_load() + +# use returned dictionary +```` + # > By RoRo160 `v.0.02.0-beta`