C# Class SusiParser.Parser

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

Public Methods

Method 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

Method 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 method

public ChangeRole ( StudentRole role ) : void
role StudentRole
return void

GetCourses() public method

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

GetRolesPage() public method

public GetRolesPage ( ) : string
return string

GetStudentInfo() public method

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

Login() public method

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

Parser() public method

public Parser ( ) : System
return System