C# Class WhatCD.Http

Mostrar archivo Open project: frankston/WhatAPI Class Usage Examples

Public Methods

Method Description
GetFlacLogScore ( string log, string authKey ) : int

Determines the rip log score out of 100.

Http ( string username, string password ) : System

Attempts to authenticate to WhatCD server and creates a new logged-on session.

Logoff ( string authKey ) : void

Logs off the current What.CD session.

RequestBytes ( Uri uri, string query, string &contentDisposition, string &contentType ) : byte[]

Performs a binary request.

RequestJson ( Uri uri, string query ) : string

Performs a JSON request.

Private Methods

Method Description
ExtractLogScore ( string html ) : int

Attempts to extract a log files' score (out of 100) from the WhatCD log checker html. Note that the json api currently does not support this feature.

Login ( string username, string password ) : void

Logs a user in to What.CD and stores session cookies.

Method Details

GetFlacLogScore() public method

Determines the rip log score out of 100.
public GetFlacLogScore ( string log, string authKey ) : int
log string Log file contents.
authKey string WhatCD users' authentication key.
return int

Http() public method

Attempts to authenticate to WhatCD server and creates a new logged-on session.
public Http ( string username, string password ) : System
username string WhatCD username.
password string WhatCD password.
return System

Logoff() public method

Logs off the current What.CD session.
public Logoff ( string authKey ) : void
authKey string WhatCD users' authentication key.
return void

RequestBytes() public method

Performs a binary request.
public RequestBytes ( Uri uri, string query, string &contentDisposition, string &contentType ) : byte[]
uri System.Uri Base URI.
query string Request arguments (appended to the base URI).
contentDisposition string
contentType string
return byte[]

RequestJson() public method

Performs a JSON request.
public RequestJson ( Uri uri, string query ) : string
uri System.Uri Base URI.
query string Request arguments (appended to the base URI).
return string