Skip to content

Commit 1f5faa2

Browse files
authored
⚡ feat: Merge pull request #14 from kurwjan/conversations
+ Add conversations and massive rework.
2 parents b6e6c11 + 3e32587 commit 1f5faa2

25 files changed

+1619
-703
lines changed

README-DE.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ Eine inoffizielle Python-Bibliothek für das Schulportal Hessen. Auch auf [PyPi]
1111

1212
## Features
1313

14-
+ Hausaufgaben bekommen
15-
+ Vertretungsplan bekommen
16-
+ Kalenderdaten bekommen
14+
+ Hausaufgaben oder andere Aufgaben bekommen.
15+
+ Vertretungsplan bekommen.
16+
+ Kalenderereignisse bekommen.
17+
+ Unterhaltungen bekommen.
18+
+ Alle Schulen die Lanis haben bekommen.
1719

1820
**Übersicht von zukünftigen Features, Probleme und anderes [hier](https://github.com/users/kurwjan/projects/2)**
1921

@@ -34,6 +36,7 @@ from lanisapi import LanisClient
3436

3537
def main():
3638
client = LanisClient("schulid", "name.nachname", "passwort")
39+
or: client = LanisClient(School("school", "city"), "password")
3740
client.authenticate()
3841
print(client.get_substitution_plan())
3942
client.close()
@@ -52,7 +55,7 @@ Mehr Infos bei der [Wiki](https://lanisapi.readthedocs.io/en/latest/first_steps.
5255

5356
*Übrigens, wenn dir dieses Projekt gefällt, kannst du es auch einen Stern geben.*
5457

55-
## Credits
58+
## Creditss
5659

5760
Das Javascript-Projekt [SPHclient](https://github.com/alessioC42/SPHclient) von [@alessioC42](https://github.com/alessioC42) hat mir geholfen um das *Schulportal Hessen* zu verstehen.
5861

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ It's an unofficial Python library for the Schulportal Hessen. Also available on
1111

1212
## Features
1313

14-
+ Fetch homework
15-
+ Fetch substitution plan
16-
+ Fetch calendar data
14+
+ Fetch homework or other tasks.
15+
+ Fetch substitution plan.
16+
+ Fetch calendar events.
17+
+ Fetch conversations.
18+
+ Fetch all schools that have Lanis.
1719

1820
**Overview of future Features, Problems and other things [here](https://github.com/users/kurwjan/projects/2).**
1921

@@ -30,10 +32,11 @@ Required is Python 3.11. *(older versions should definitely work too but I didn'
3032
This example gives the substitution plan.
3133

3234
```python
33-
from lanisapi import LanisClient
35+
from lanisapi import LanisClient, School
3436

3537
def main():
3638
client = LanisClient("schoolid", "name.lastname", "password")
39+
or: client = LanisClient(School("school", "city"), "password")
3740
client.authenticate()
3841
print(client.get_substitution_plan())
3942
client.close()

docs/source/api.rst

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/source/api/exceptions.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. title:: Exceptions reference
2+
3+
.. _exceptions:
4+
5+
Exceptions reference
6+
====================
7+
8+
.. currentmodule:: lanisapi.exceptions
9+
.. autoclass:: PageNotFoundError
10+
11+
.. autoclass:: NotAuthenticatedError

docs/source/api/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. title:: API Reference
2+
3+
API References
4+
==============
5+
6+
.. toctree::
7+
:titlesonly:
8+
:maxdepth: 1
9+
10+
main
11+
exceptions

docs/source/api/main.rst

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
.. title:: Main reference
2+
3+
.. _main:
4+
5+
Main reference
6+
=====================
7+
8+
LanisClient
9+
-----------
10+
11+
.. autoclass:: lanisapi.LanisClient
12+
13+
General functions
14+
~~~~~~~~~~~~~~~~~
15+
16+
.. currentmodule:: lanisapi.LanisClient
17+
18+
.. autofunction:: authenticate
19+
20+
.. autofunction:: logout
21+
22+
.. autofunction:: close
23+
24+
Get all schools
25+
~~~~~~~~~~~~~~~
26+
27+
Functions
28+
^^^^^^^^^
29+
30+
.. currentmodule:: lanisapi.LanisClient
31+
.. autofunction:: get_schools
32+
33+
Types
34+
^^^^^
35+
36+
.. currentmodule:: lanisapi.functions.schools
37+
.. autoclass:: School
38+
39+
Getting the Substitution plan
40+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41+
42+
Functions
43+
^^^^^^^^^
44+
45+
.. currentmodule:: lanisapi.LanisClient
46+
.. autofunction:: get_substitution_plan
47+
48+
Types
49+
^^^^^
50+
51+
.. currentmodule:: lanisapi.functions.substitution
52+
.. autoclass:: SubstitutionPlan
53+
:members:
54+
55+
Getting the Calendar
56+
~~~~~~~~~~~~~~~~~~~~
57+
58+
Functions
59+
^^^^^^^^^
60+
61+
.. currentmodule:: lanisapi.LanisClient
62+
.. autofunction:: get_calendar
63+
64+
.. autofunction:: get_calendar_of_month
65+
66+
Types
67+
^^^^^
68+
69+
.. currentmodule:: lanisapi.functions.calendar
70+
.. autoclass:: Calendar
71+
:members:
72+
73+
Getting all tasks
74+
~~~~~~~~~~~~~~~~~
75+
76+
Functions
77+
^^^^^^^^^
78+
79+
.. currentmodule:: lanisapi.LanisClient
80+
.. autofunction:: get_tasks
81+
82+
Types
83+
^^^^^
84+
85+
.. currentmodule:: lanisapi.functions.tasks
86+
.. autoclass:: Task
87+
88+
Getting conversations
89+
~~~~~~~~~~~~~~~~~~~~~
90+
91+
Functions
92+
^^^^^^^^^
93+
94+
.. currentmodule:: lanisapi.LanisClient
95+
.. autofunction:: get_conversations
96+
97+
Types
98+
^^^^^
99+
100+
.. currentmodule:: lanisapi.functions.conversations
101+
.. autoclass:: Conversation

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
copyright = '2023, kurwjan'
77
author = 'kurwjan'
88

9-
release = '0.1.1'
10-
version = '0.1.1'
9+
release = '0.2.0'
10+
version = '0.2.0'
1111

1212
# -- General configuration
1313

docs/source/first_steps.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Example code
3636

3737
.. code-block:: python
3838
39-
from lanisapi import LanisClient
39+
from lanisapi import LanisClient, School
4040
4141
def main():
4242
client = LanisClient("schoolid", "name.lastname", "password")
43-
or: client = LanisClient(LanisClient.School("Testschule MH", "Testhausen City"), "password")
43+
or: client = LanisClient(School("Testschule MH", "Testhausen City"), "password")
4444
client.authenticate()
4545
print(client.get_substitution_plan())
4646
client.close()

docs/source/index.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
.. toctree::
44
:hidden:
55
:titlesonly:
6-
:maxdepth: 1
6+
:maxdepth: 2
77

88
first_steps
99
repo
10-
api
10+
api/index
1111

1212
LanisAPI
1313
========
1414

15+
.. attention::
16+
This project is still in a early stage so expect bugs.
17+
1518
.. warning::
1619
Because the Schulportal Hessen changes quickly and is very fragmented, some functions at specific schools or after a while may no longer work.
1720

@@ -26,20 +29,23 @@ LanisAPi is an unofficial Python library for the Schulportal Hessen also availab
2629
Features
2730
--------
2831

29-
* Fetching homework
30-
* Fetching substitution plan
31-
* Fetching calendar data
32+
* Fetch homework or other tasks.
33+
* Fetch substitution plan.
34+
* Fetch calendar events.
35+
* Fetch conversations.
36+
* Fetch all schools that have Lanis.
3237

3338
Overview of future features, problems and other things `here <https://github.com/users/kurwjan/projects/2>`__.
3439

3540
Example
3641
-------
3742
.. code-block:: python
3843
39-
from lanisapi import LanisClient
44+
from lanisapi import LanisClient, School
4045
4146
def main():
4247
client = LanisClient("schoolid", "name.lastname", "password")
48+
or: client = LanisClient(School("school", "city"), "password")
4349
client.authenticate()
4450
print(client.get_substitution_plan())
4551
client.close()
@@ -55,6 +61,8 @@ How can I help?
5561
2. You can suggest ideas `here <https://github.com/kurwjan/LanisAPI/issues>`__.
5662
3. **Contributing:** You can contribute to this project either by code or improving the wiki. If you're new to contributing, look `here <https://docs.github.com/en/get-started/quickstart/contributing-to-projects>`__.
5763

64+
*Also if you like this project you can give it a star on Github.*
65+
5866
Credits
5967
-------
6068
* `SPHclient <https://github.com/alessioC42/SPHclient>`__ helped me to understand the *Schulportal Hessen*.

0 commit comments

Comments
 (0)