C# Класс WhatCD.Http

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

GetFlacLogScore() публичный Метод

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.
Результат int

Http() публичный Метод

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.
Результат System

Logoff() публичный Метод

Logs off the current What.CD session.
public Logoff ( string authKey ) : void
authKey string WhatCD users' authentication key.
Результат void

RequestBytes() публичный Метод

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
Результат byte[]

RequestJson() публичный Метод

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).
Результат string