@@ -65,11 +65,31 @@ public async Task<SchoolYear[]> GetAllSchoolYearsAsync(string id = "getSchoolyea
6565 /// </summary>
6666 /// <param name="id">Identifier for the request</param>
6767 /// <param name="ct">Cancellation token</param>
68- /// <returns></returns>
68+ /// <returns>The current school year</returns>
69+ /// <exception cref="ObjectDisposedException">Thrown when thew instance was disposed</exception>
70+ /// <exception cref="UnauthorizedAccessException">Thrown when you're not logged in</exception>
71+ /// <exception cref="HttpRequestException">Thrown when an error happend while the http request</exception>
72+ /// <exception cref="WebUntisException">Thrown when the WebUntis API returned an error</exception>
6973 public async Task < SchoolYear > GetCurrentSchoolYearAsync ( string id = "getCurrentSchoolyear" , CancellationToken ct = default )
7074 {
7175 SchoolYear schoolYear = await MakeRequestAsync < object , SchoolYear > ( id , "getCurrentSchoolyear" , new object ( ) , ct ) ;
7276 return schoolYear ;
7377 }
78+
79+ /// <summary>
80+ /// Get all holidays async
81+ /// </summary>
82+ /// <param name="id">Identifier for the request</param>
83+ /// <param name="ct">Cancellation token</param>
84+ /// <returns>All holidays</returns>
85+ /// <exception cref="ObjectDisposedException">Thrown when thew instance was disposed</exception>
86+ /// <exception cref="UnauthorizedAccessException">Thrown when you're not logged in</exception>
87+ /// <exception cref="HttpRequestException">Thrown when an error happend while the http request</exception>
88+ /// <exception cref="WebUntisException">Thrown when the WebUntis API returned an error</exception>
89+ public async Task < Holidays [ ] > GetAllHolidaysAsync ( string id = "getHolidays" , CancellationToken ct = default )
90+ {
91+ List < Holidays > holidays = await MakeRequestAsync < object , List < Holidays > > ( id , "getHolidays" , new object ( ) , ct ) ;
92+ return holidays . ToArray ( ) ;
93+ }
7494 }
7595}
0 commit comments