Skip to content

Commit

Permalink
🐛 return a list in attendance. add frequency_example
Browse files Browse the repository at this point in the history
  • Loading branch information
RustySnek committed Mar 5, 2024
1 parent 7a445ff commit eac4df2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/frequency_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from librus_apix.attendance import get_attendance_frequency
from librus_apix.get_token import get_token

username = "USERNAME"
password = "PASSWORD"
token = get_token(username, password)

frequency = get_attendance_frequency(token) # first_sem, second_sem, overall_freq
print(frequency)

2 changes: 1 addition & 1 deletion librus_apix/attendance.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ def get_attendance(token: Token, sort_by: str = "all") -> List[List[Attendance]]
school_subject,
)
att[semester].append(a)
return reversed(att)
return list(reversed(att))

0 comments on commit eac4df2

Please sign in to comment.