C# Class EDCompanionAPI.EliteCompanion

Mostrar archivo Open project: Duke-Jones/ED-IBE

Public Methods

Method Description
CreateProfile ( string email, string password ) : void

Creates a user profile, which is stored on disk. Password will be encrypted using machine key. Created profile will be set as active profile.

DeleteProfile ( string email ) : void
GetProfileData ( bool force = false ) : ProfileResponse

Get json profile data for active profile. Will attempt login. It's only possible to get fresh data every 60 seconds

LoadProfile ( string email ) : bool

Loads a profile and sets it as active.

Login ( ) : LoginResponse

Logins active profile

RestTime ( ) : System.TimeSpan

returns the time until cache is no more valid

RestTimeReset ( ) : void

sets the cooldowntimer to "finished"

SubmitVerification ( string verificationCode ) : VerificationResponse

Use to submit verification code, which is sent as an email to the user on first log in or cookie has expired.

Private Methods

Method Description
EliteCompanion ( ) : System
GetProfileDataInternal ( bool force ) : ProfileResponse
LoginInternal ( ) : LoginResponse
SubmitVerificationInternal ( string verificationCode ) : VerificationResponse

Method Details

CreateProfile() public method

Creates a user profile, which is stored on disk. Password will be encrypted using machine key. Created profile will be set as active profile.
public CreateProfile ( string email, string password ) : void
email string Email of user
password string Password of user
return void

DeleteProfile() public method

public DeleteProfile ( string email ) : void
email string
return void

GetProfileData() public method

Get json profile data for active profile. Will attempt login. It's only possible to get fresh data every 60 seconds
public GetProfileData ( bool force = false ) : ProfileResponse
force bool
return EDCompanionAPI.Models.ProfileResponse

LoadProfile() public method

Loads a profile and sets it as active.
public LoadProfile ( string email ) : bool
email string Email of user
return bool

Login() public method

Logins active profile
public Login ( ) : LoginResponse
return EDCompanionAPI.Models.LoginResponse

RestTime() public method

returns the time until cache is no more valid
public RestTime ( ) : System.TimeSpan
return System.TimeSpan

RestTimeReset() public method

sets the cooldowntimer to "finished"
public RestTimeReset ( ) : void
return void

SubmitVerification() public method

Use to submit verification code, which is sent as an email to the user on first log in or cookie has expired.
public SubmitVerification ( string verificationCode ) : VerificationResponse
verificationCode string The five character code sent to the user
return EDCompanionAPI.Models.VerificationResponse