Class UnAuthorizedClient
API client that can run without authentication
Implements
Inherited Members
Namespace: Pixiv.VroidSdk.Oauth
Assembly: Pixiv.VroidSdk.dll
Syntax
public class UnAuthorizedClient : IApiRequestable
Constructors
UnAuthorizedClient(ISdkConfig, IHttpConnectionDriver)
Constructor
Declaration
public UnAuthorizedClient(ISdkConfig config, IHttpConnectionDriver connectionDriver)
Parameters
| Type | Name | Description |
|---|---|---|
| ISdkConfig | config | Settings for using SDK |
| IHttpConnectionDriver | connectionDriver | Driver for carrying out HTTP request |
Methods
ApiConnection(String, IHttpParam, IDictionary<String, String>, Nullable<Int32>)
Return IHttpConnection to run API request
Declaration
public IHttpConnection ApiConnection(string requestPath, IHttpParam param = null, IDictionary<string, string> header = null, int? timeout = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | requestPath | Request path |
| IHttpParam | param | HTTP request parameter |
| IDictionary<String, String> | header | HTTP request header |
| Nullable<Int32> | timeout | HTTP request timeout time (seconds) |
Returns
| Type | Description |
|---|---|
| IHttpConnection | IHttpConnection that runs API request |
ForceRefreshCode(Action<Account>, Action<Exception>)
Forcefully reissue API access token
Declaration
public IStrategy ForceRefreshCode(Action<Account> onAccountAuth, Action<Exception> onFailed)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<Account> | onAccountAuth | Token reissue succeeded |
| Action<Exception> | onFailed | token reissue failed |
Returns
| Type | Description |
|---|---|
| IStrategy | Return IStrategy that reissued API access token |
Exceptions
| Type | Condition |
|---|---|
| NotImplementedException | Constantly being sent because requests that do not require authentication do not use API access token |