Show / Hide Table of Contents

Class ApiRequestBase<T>

VRoid HubのAPIをリクエストするためのクラス

Inheritance
Object
ApiRequestBase<T>
ByteRequest
GenericDataRequest<T>
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: VRoidSDK
Assembly: VRoidSDK.dll
Syntax
public class ApiRequestBase<T>
Type Parameters
Name Description
T

リクエスト結果の型

Constructors

ApiRequestBase(String)

コンストラクタ

Declaration
public ApiRequestBase(string requestPath)
Parameters
Type Name Description
String requestPath

リクエストするAPIのURL

Fields

Authenticate

認証機能を持ったモジュール

Declaration
protected IAuthentication Authenticate
Field Value
Type Description
IAuthentication

認証機能を持ったモジュール

Headers

リクエストのヘッダ情報

Declaration
public Dictionary<string, string> Headers
Field Value
Type Description
Dictionary<String, String>

リクエストヘッダ (デフォルト: null)

Methods

リクエストに使うメソッド

Declaration
public HTTPMethods Methods
Field Value
Type Description
HTTPMethods

リクエストメソッド (デフォルト: HTTPMethods.Get)

OnDownloadProgress

ダウンロードの進捗を取得するコールバック

Declaration
public Action<float> OnDownloadProgress
Field Value
Type Description
Action<Single>

コールバック (デフォルト: null)

OnUploadProgress

アップロードの進捗を取得するコールバック

Declaration
public Action<float> OnUploadProgress
Field Value
Type Description
Action<Single>

コールバック (デフォルト: null)

Params

リクエストのパラメータ

Declaration
public IHttpParam Params
Field Value
Type Description
IHttpParam

リクエストパラメータ (デフォルト: null)

RequestPath

APIのリクエストパス

Declaration
public readonly string RequestPath
Field Value
Type Description
String

/apiから始まるリクエストパス

ResponseConverter

WebResponseを加工するコンバーター

Declaration
protected ResponseConverterBase<T> ResponseConverter
Field Value
Type Description
ResponseConverterBase<T>

コンバーター

Timeout

リクエストのタイムアウト(秒)

Declaration
public int Timeout
Field Value
Type Description
Int32

タイムアウト (デフォルト: 30)

Methods

SendRequest(Action<T, ApiLinksFormat>, Action<Single>, Action<ApiErrorFormat>)

Apiへのリクエストを実行する

Declaration
public void SendRequest(Action<T, ApiLinksFormat> onSuccess, Action<float> onProgress, Action<ApiErrorFormat> onError)
Parameters
Type Name Description
Action<T, ApiLinksFormat> onSuccess

APIへのリクエストに成功した時のコールバック

Action<Single> onProgress

APIリクエスト中のコールバック

Action<ApiErrorFormat> onError

エラー発生時のコールバック

Remarks

アクセストークンが切れていた場合は自動でリフレッシュして再度リクエストする

SendRequest(Action<T, ApiLinksFormat>, Action<ApiErrorFormat>)

Apiへのリクエストを実行する

Declaration
public void SendRequest(Action<T, ApiLinksFormat> onSuccess, Action<ApiErrorFormat> onError)
Parameters
Type Name Description
Action<T, ApiLinksFormat> onSuccess

APIへのリクエストに成功した時のコールバック

Action<ApiErrorFormat> onError

エラー発生時のコールバック

Remarks

アクセストークンが切れていた場合は自動でリフレッシュして再度リクエストする

SendRequest(Action<T>, Action<Single>, Action<ApiErrorFormat>)

Apiへのリクエストを実行する

Declaration
public void SendRequest(Action<T> onSuccess, Action<float> onProgress, Action<ApiErrorFormat> onError)
Parameters
Type Name Description
Action<T> onSuccess

APIへのリクエストに成功した時のコールバック

Action<Single> onProgress

APIリクエスト中のコールバック

Action<ApiErrorFormat> onError

エラー発生時のコールバック

Remarks

アクセストークンが切れていた場合は自動でリフレッシュして再度リクエストする

SendRequest(Action<T>, Action<ApiErrorFormat>)

Apiへのリクエストを実行する

Declaration
public void SendRequest(Action<T> onSuccess, Action<ApiErrorFormat> onError)
Parameters
Type Name Description
Action<T> onSuccess

APIへのリクエストに成功した時のコールバック

Action<ApiErrorFormat> onError

エラー発生時のコールバック

Remarks

アクセストークンが切れていた場合は自動でリフレッシュして再度リクエストする

Back to top Generated by DocFX