Class UnAuthorizedClient
認可不要で実行できるAPIクライアント
Implements
Inherited Members
Namespace: Pixiv.VroidSdk.Oauth
Assembly: Pixiv.VroidSdk.dll
Syntax
public class UnAuthorizedClient : IApiRequestable
Constructors
UnAuthorizedClient(ISdkConfig, IHttpConnectionDriver)
コンストラクタ
Declaration
public UnAuthorizedClient(ISdkConfig config, IHttpConnectionDriver connectionDriver)
Parameters
| Type | Name | Description |
|---|---|---|
| ISdkConfig | config | SDKを利用するための設定 |
| IHttpConnectionDriver | connectionDriver | HTTPリクエストを行うためのドライバ |
Methods
ApiConnection(String, IHttpParam, IDictionary<String, String>, Nullable<Int32>)
APIリクエストを実行するためのIHttpConnectionを返す
Declaration
public IHttpConnection ApiConnection(string requestPath, IHttpParam param = null, IDictionary<string, string> header = null, int? timeout = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | requestPath | リクエスト先のパス |
| IHttpParam | param | HTTPリクエストパラメータ |
| IDictionary<String, String> | header | HTTPリクエストヘッダ |
| Nullable<Int32> | timeout | HTTPリクエストのタイムアウト時間(秒) |
Returns
| Type | Description |
|---|---|
| IHttpConnection | APIリクエストを実行するIHttpConnection |
ForceRefreshCode(Action<Account>, Action<Exception>)
APIアクセストークンを強制的に再発行する
Declaration
public IStrategy ForceRefreshCode(Action<Account> onAccountAuth, Action<Exception> onFailed)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<Account> | onAccountAuth | トークンの再発行に成功した |
| Action<Exception> | onFailed | トークンの再発行に失敗した |
Returns
| Type | Description |
|---|---|
| IStrategy | APIアクセストークンを再発行するIStrategyを返す |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | 認可不要なリクエストはOAuthのAPIアクセストークンを使用しないため、常に送出される |