v0.5.0.dev1
Pre-release
Pre-release
Erster Rewrite Release
Benutzbar ist es noch nicht wirklich, außer man will Custom Module hinzufügen oder nur den Vertretungsplan benutzen.
Dokumentation gibt es auch noch nicht wirklich.
Beispiel-Code
Wie man Vertretungen abruft:
from lanisapi import LanisClient, AccountInitialization
def main():
client = LanisClient(AccountInitialization(6091, "dacjan.gapinski", "La-schGam-ing37456"))
print(client.substitution.get())
oder: print(client.modules.substitution.get())
main()Wie man Custom-Module verwendet:
from lanisapi import LanisClient, AccountInitialization, HelloWorld
def main():
client = LanisClient(AccountInitialization(6091, "vorname.nachname", "passwort"),
custom_modules=[HelloWorld])
print(client.custom.hello_world.get())
main()Wie man ein eigenes erstellt: (dieses ist auch in der lib → module/custom/hello_world.py)
# Example custom module
from ..module import Module
class HelloWorld(Module):
_name = "hello_world"
_link = None
def get(self) -> str:
return "Hello World!"