Skip to content

Commit

Permalink
Merge branch 'release/v.0.02.0-beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
RoRo160 committed Sep 12, 2021
2 parents 52f1239 + 464be9e commit 11f7f68
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IServ.py <img src="https://iserv.de/downloads/logo/IServ_Logo_klein_RGB_clean.svg" alt="" height="35" align="right">

`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
Expand All @@ -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:

Expand Down Expand Up @@ -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)
13 changes: 12 additions & 1 deletion iserv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from bs4 import *


VERSION = (0, 2, 0, "beta")


DAYS = [
"monday",
"tuesday",
Expand All @@ -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!"
Expand Down Expand Up @@ -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()

0 comments on commit 11f7f68

Please sign in to comment.