Interface IModelDownloadable
Interface implemented when downloading model
Callbacks are called asynchronously for all APIs
Anything with Async will be executed asynchronously, success result Task will be returned
Namespace: Pixiv.VroidSdk.Api
Assembly: Pixiv.VroidSdk.dll
Syntax
public interface IModelDownloadable
Methods
GetDownloadLicenses(String, Action<DownloadLicense>, Action<ApiErrorFormat>)
Get license information for model download
Declaration
void GetDownloadLicenses(string licenseId, Action<DownloadLicense> onSuccess, Action<ApiErrorFormat> onError)
Parameters
Type | Name | Description |
---|---|---|
String | licenseId | License ID |
Action<DownloadLicense> | onSuccess | Callback on success |
Action<ApiErrorFormat> | onError | Callback on error |
GetDownloadLicensesAsync(String)
Get license information for model download
Declaration
Task<DownloadLicense> GetDownloadLicensesAsync(string licenseId)
Parameters
Type | Name | Description |
---|---|---|
String | licenseId | License ID |
Returns
Type | Description |
---|---|
Task<DownloadLicense> | License information for model download |
Exceptions
Type | Condition |
---|---|
ApiErrorFormat | API error |
GetDownloadLicensesDownload(String, Action<Byte[]>, Action<Single>, Action<ApiErrorFormat>)
Get binary data from download license
Declaration
void GetDownloadLicensesDownload(string licenseId, Action<byte[]> onSuccess, Action<float> onProgress, Action<ApiErrorFormat> onError)
Parameters
Type | Name | Description |
---|---|---|
String | licenseId | License ID |
Action<Byte[]> | onSuccess | Callback on success |
Action<Single> | onProgress | Callback during download |
Action<ApiErrorFormat> | onError | Callback on error |
GetDownloadLicensesDownload(String, Int32, Action<Byte[]>, Action<Single>, Action<ApiErrorFormat>)
Get model version linked to download license (timeout 300 seconds)
Declaration
void GetDownloadLicensesDownload(string licenseId, int timeout, Action<byte[]> onSuccess, Action<float> onProgress, Action<ApiErrorFormat> onError)
Parameters
Type | Name | Description |
---|---|---|
String | licenseId | License ID |
Int32 | timeout | Request timeout (seconds) |
Action<Byte[]> | onSuccess | Callback on success |
Action<Single> | onProgress | Callback during API request |
Action<ApiErrorFormat> | onError | Callback on failure |
GetDownloadLicensesDownloadAsync(String, Action<Single>)
Get model version linked to download license (timeout 300 seconds)
Declaration
Task<byte[]> GetDownloadLicensesDownloadAsync(string licenseId, Action<float> onProgress)
Parameters
Type | Name | Description |
---|---|---|
String | licenseId | License ID |
Action<Single> | onProgress | Callback during download |
Returns
Type | Description |
---|---|
Task<Byte[]> | Downloaded model byte array |
Exceptions
Type | Condition |
---|---|
ApiErrorFormat | API error |
GetDownloadLicensesDownloadAsync(String, Int32, Action<Single>)
Get model version linked to download license
Declaration
Task<byte[]> GetDownloadLicensesDownloadAsync(string licenseId, int timeout, Action<float> onProgress)
Parameters
Type | Name | Description |
---|---|---|
String | licenseId | License ID |
Int32 | timeout | Timeout (seconds) |
Action<Single> | onProgress | Callback during API request |
Returns
Type | Description |
---|---|
Task<Byte[]> | Downloaded model byte array |
Exceptions
Type | Condition |
---|---|
ApiErrorFormat | API error |