FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

new: getExamTypes -- needs additional rights · robquant/python-webuntis@946a2f1 · GitHub

Commit 946a2f1

Browse files
committed
new: getExamTypes -- needs additional rights
1 parent 83c8a57 commit 946a2f1

4 files changed

Lines changed: 48 additions & 0 deletions

File tree

‎tests/test_session.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,3 +327,9 @@ def test_students(self):
327327
assert type(student) == webuntis.objects.StudentObject
328328
assert student.full_name == "Alexander Mueller"
329329
assert student.gender == "male"
330+
331+
332+
333+
334+
def test_examtype(self):
335+
pass

‎webuntis/objects.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ def date(self):
625625

626626

627627
class SubstitutionObject(PeriodObject):
628+
"""Information about substitution."""
628629

629630
@lazyproperty
630631
def type(self):
@@ -670,6 +671,8 @@ class SubstitutionList(ListResult):
670671

671672

672673
class TimeUnitObject(Result):
674+
"""Information about the time grid"""
675+
673676
@lazyproperty
674677
def name(self):
675678
"""Name of Timeunit"""
@@ -689,6 +692,7 @@ def end(self):
689692

690693

691694
class TimegridDayObject(Result):
695+
"""Information about one day in the time grid"""
692696
@lazyproperty
693697
def day(self):
694698
return self._data[u'day']
@@ -707,6 +711,7 @@ def timeUnits(self):
707711

708712

709713
class TimegridObject(ListResult):
714+
"""A list of TimegridDayObjects"""
710715
_itemclass = TimegridDayObject
711716

712717

@@ -723,4 +728,15 @@ def gender(self):
723728
return self._data[u'gender']
724729

725730
class StudentsList(ListResult):
731+
"""A list of students"""
726732
_itemclass = StudentObject
733+
734+
'''
735+
@TODO: need additional rights
736+
class ExamTypeObject(Result):
737+
"""Represents an Exam Type."""
738+
739+
class ExamTypeList(ListResult):
740+
"""A list of exam types"""
741+
_itemclass = ExamTypeObject
742+
'''

‎webuntis/objects.pyi‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,3 +412,19 @@ class TimegridObject(ListResult):
412412

413413
def __getitem__(self, i: int) -> TimegridDayObject:
414414
...
415+
416+
"""
417+
@TODO: need additional rights
418+
419+
class ExamTypeObject(Result):
420+
...
421+
422+
class ExamTypeList(ListResult):
423+
_itemclass = ExamTypeObject
424+
425+
def filter(self, **criterions) -> ExamTypeObject:
426+
...
427+
428+
def __getitem__(self, i: int) -> ExamTypeObject:
429+
...
430+
"""

‎webuntis/session.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,16 @@ def students(self):
331331
"""
332332
return objects.StudentsList, 'getStudents', {}
333333

334+
'''
335+
@TODO: need additional rights
336+
@result_wrapper
337+
def examTypes(self):
338+
"""Information about the Exams.
339+
340+
:rtype: :py:class:`webuntis.objects.ExamTypeList`
341+
"""
342+
return objects.ExamTypeList, 'getExamTypes', {}
343+
'''
334344

335345
class Session(JSONRPCSession, ResultWrapperMixin):
336346
"""The origin of everything you want to do with the WebUntis API. Can be

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL