C# Class CSharpTradeOffers.Web.Web

Handles Web related tasks like logging in and fetching
Datei anzeigen Open project: FatherFoxxy/CSharpTradeOffers Class Usage Examples

Public Methods

Method Description
DoLogin ( string username, string password, string machineAuth = "", IUserInputOutputHandler userInputOutput = null ) : Account

Executes the web login using the Steam website.

Fetch ( string url, string method, string>.Dictionary data = null, CookieContainer cookies = null, bool xHeaders = true, string referer = "", bool isWebkit = false, int retryWait = 5000, int retryLimit = 5 ) : IResponse

Retries a Fetch until success or fail conditions have been met.

RetryDoLogin ( System.TimeSpan retryWait, int retryLimit, string username, string password, string machineAuth = "", IUserInputOutputHandler userInputOutput = null ) : Account

Retries the DoLogin method until success or fail conditions have been met.

Web ( IWebRequestHandler webRequestHandler ) : System

Initializes a new Web class in accordance to the IWebRequestHandler IResponse provided.

Private Methods

Method Description
RetryRequestProcessor ( int retryWait, int retryLimit, string url, string method, string>.Dictionary data = null, CookieContainer cookies = null, bool xHeaders = true, string referer = "", bool isWebkit = false ) : IResponse

Processes retry attempts

SubmitCookies ( CookieContainer cookies ) : void

Method Details

DoLogin() public method

Executes the web login using the Steam website.
public DoLogin ( string username, string password, string machineAuth = "", IUserInputOutputHandler userInputOutput = null ) : Account
username string Username to use
password string Password to use
machineAuth string Steam machine auth string. /// The user I/O handler to use. If null, defaults to Console.Write/Read
userInputOutput IUserInputOutputHandler
return Account

Fetch() public method

Retries a Fetch until success or fail conditions have been met.
public Fetch ( string url, string method, string>.Dictionary data = null, CookieContainer cookies = null, bool xHeaders = true, string referer = "", bool isWebkit = false, int retryWait = 5000, int retryLimit = 5 ) : IResponse
url string The URL to request.
method string The method to be used. Ex: POST
data string>.Dictionary Dictionary containing the paramters to be sent in the URL or in the Stream, depending on the method.
cookies System.Net.CookieContainer A cookiecontainer with cookies to send.
xHeaders bool /// Special parameter, should only be used with requests that need "X-Requested-With: /// XMLHttpRequest" and "X-Prototype-Version: 1.7" ///
referer string Sets the referrer for the request.
isWebkit bool
retryWait int The TimeSpan in which to wait between requests.
retryLimit int The max number of requests to perform before failing.
return IResponse

RetryDoLogin() public method

Retries the DoLogin method until success or fail conditions have been met.
public RetryDoLogin ( System.TimeSpan retryWait, int retryLimit, string username, string password, string machineAuth = "", IUserInputOutputHandler userInputOutput = null ) : Account
retryWait System.TimeSpan The TimeSpan in which to wait between requests.
retryLimit int The max number of requests to perform before failing.
username string Username to use
password string Password to use
machineAuth string Steam machine auth string. /// You should save Web.SteamMachineAuth after the code has been entered and the request has /// been successful and pass it to DoLogin in future attempts to login. /// This field can be left blank, but if the account is SteamGuard protected /// it will ask you for a new code every time.
userInputOutput IUserInputOutputHandler
return Account

Web() public method

Initializes a new Web class in accordance to the IWebRequestHandler IResponse provided.
public Web ( IWebRequestHandler webRequestHandler ) : System
webRequestHandler IWebRequestHandler
return System