EdupageAPI / edupage-api

A python library for accessing your Edupage account
https://edupageapi.github.io/edupage-api/
GNU General Public License v3.0
66 stars 13 forks source link

Add ability to retrieve grades by year and term in Grades #69

Closed goodbyepavlyi closed 1 year ago

goodbyepavlyi commented 1 year ago

This pull request adds the functionality to retrieve grades by specifying the year and term.

ivanhrabcak commented 1 year ago

I reworked how the API works a bit in f671ea3.

Here's a small example:

from edupage_api import Edupage, Term

edupage = Edupage()
edupage.login(...)

# gets grades for the latest term
current_grades = edupage.get_grades()

# get grades for a given year and term
last_year_grades_first_term = edupage.get_grades_for_term(2021, Term.FIRST)
last_year_grades_second_term = edupage.get_grades_for_term(2021, Term.SECOND)

Feel free to give feedback!

Thank you for your contribution:)