diff --git a/README.md b/README.md index 775a9a6..d381d44 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 @@ -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,8 +95,15 @@ tasks = iserv.tasks( # do something with task list ```` +#### Vc. server load: +````python +load = iserv.vc_load() + +# use returned dictionary +```` + # -> 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 dc70cac..414f9c3 100644 --- a/iserv.py +++ b/iserv.py @@ -4,6 +4,9 @@ from bs4 import * +VERSION = (0, 2, 0, "beta") + + DAYS = [ "monday", "tuesday", @@ -22,7 +25,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 +205,10 @@ def tasks( }) return tasks + + def vc_load(self): + r = self._s.get( + url=self.domain + IServ.paths["vc_load"] + ) + + return r.json()