C# Class SnooSharp.NetworkLayer

Inheritance: INetworkLayer
Mostrar archivo Open project: hippiehunter/SnooSharp

Public Methods

Method Description
Clone ( RedditOAuth credential ) : INetworkLayer
DestroyToken ( string refreshToken ) : Task
Dispose ( ) : void
Get ( string url, CancellationToken token, IProgress progress, string>.Dictionary body ) : Task
NetworkLayer ( UserState userState, string appId, string appSecret, string redirectUrl ) : Newtonsoft.Json
Post ( string url, CancellationToken token, string>.Dictionary arguments, IProgress progress ) : Task
RefreshToken ( string refreshToken, CancellationToken token ) : Task
RequestGrantCode ( string code, CancellationToken token ) : Task
Send ( string url, string method, CancellationToken token, string>.Dictionary arguments ) : Task
ThrottleRequests ( CancellationToken token ) : Task

Private Methods

Method Description
EnsureRedditCookie ( CancellationToken token ) : Task
ProcessJsonErrors ( HttpResponseMessage httpResponse ) : Task
ProcessJsonErrors ( string response ) : string

Method Details

Clone() public method

public Clone ( RedditOAuth credential ) : INetworkLayer
credential RedditOAuth
return INetworkLayer

DestroyToken() public method

public DestroyToken ( string refreshToken ) : Task
refreshToken string
return Task

Dispose() public method

public Dispose ( ) : void
return void

Get() public method

public Get ( string url, CancellationToken token, IProgress progress, string>.Dictionary body ) : Task
url string
token System.Threading.CancellationToken
progress IProgress
body string>.Dictionary
return Task

NetworkLayer() public method

public NetworkLayer ( UserState userState, string appId, string appSecret, string redirectUrl ) : Newtonsoft.Json
userState UserState
appId string
appSecret string
redirectUrl string
return Newtonsoft.Json

Post() public method

public Post ( string url, CancellationToken token, string>.Dictionary arguments, IProgress progress ) : Task
url string
token System.Threading.CancellationToken
arguments string>.Dictionary
progress IProgress
return Task

RefreshToken() public method

public RefreshToken ( string refreshToken, CancellationToken token ) : Task
refreshToken string
token System.Threading.CancellationToken
return Task

RequestGrantCode() public method

public RequestGrantCode ( string code, CancellationToken token ) : Task
code string
token System.Threading.CancellationToken
return Task

Send() public method

public Send ( string url, string method, CancellationToken token, string>.Dictionary arguments ) : Task
url string
method string
token System.Threading.CancellationToken
arguments string>.Dictionary
return Task

ThrottleRequests() public static method

public static ThrottleRequests ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task