C# Class SusiParser.Parser

A class mighty enought to break trough SUSI, hooray!
Afficher le fichier Open project: nikoladimitroff/SusiParser Class Usage Examples

Méthodes publiques

Méthode Description
ChangeRole ( StudentRole role ) : void
GetCourses ( CoursesTakenType coursesType ) : IEnumerable

Gets a collection of CourseInfo that shows all courses that the student has passed successfully.

GetRolesPage ( ) : string
GetStudentInfo ( ) : StudentInfo

Gets information about the currently logged in student from Susi.

Login ( string username, string password ) : LoginResult

Logs the user in SUSI.

Parser ( ) : System

Private Methods

Méthode Description
ExtractCourseInfo ( HtmlAgilityPack.HtmlNodeCollection children ) : CourseInfo
ExtractStudentInfo ( HtmlNode node ) : StudentInfo
ExtractVstate ( WebResponse response ) : void

Extracts the current value of the _VSTATE hidden field.

GetExamPage ( CoursesTakenType coursesType, bool shouldRecurse = true ) : string
GetHomePage ( ) : string
GetRoles ( string pageContent ) : IEnumerable
ReadResponseToEnd ( WebResponse response ) : string

Reads a web response and returns its content

SendRequest ( string address, string data ) : WebResponse

Sends a web request to the specified address with the given data as body content

Method Details

ChangeRole() public méthode

public ChangeRole ( StudentRole role ) : void
role StudentRole
Résultat void

GetCourses() public méthode

Gets a collection of CourseInfo that shows all courses that the student has passed successfully.
public GetCourses ( CoursesTakenType coursesType ) : IEnumerable
coursesType CoursesTakenType
Résultat IEnumerable

GetRolesPage() public méthode

public GetRolesPage ( ) : string
Résultat string

GetStudentInfo() public méthode

Gets information about the currently logged in student from Susi.
public GetStudentInfo ( ) : StudentInfo
Résultat StudentInfo

Login() public méthode

Logs the user in SUSI.
public Login ( string username, string password ) : LoginResult
username string The username in Susi
password string The password in Susi
Résultat LoginResult

Parser() public méthode

public Parser ( ) : System
Résultat System