Show / Hide Table of Contents

Class AppearitionBaseRequest<T>

Inheritance
System.Object
AppearitionBaseRequest<T>
AppearitionRequest<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Appearition.Internal
Assembly: Appearition.SDK.dll
Syntax
public abstract class AppearitionBaseRequest<T>
    where T : BaseApi, new()
Type Parameters
Name Description
T

Fields

View Source

Timeout

Timeout for the request, in milliseconds. Default value is 180,000 (3minutes)

Declaration
public int Timeout
Field Value
Type Description
System.Int32

Properties

View Source

CurrentState

Declaration
public AppearitionBaseRequest<T>.RequestState CurrentState { get; protected set; }
Property Value
Type Description
AppearitionBaseRequest.RequestState<>
View Source

DownloadedBytes

Bytes downloaded by the current request. If the API Call doesn't feature download of any attachments, this value will be null.

Declaration
public virtual byte[] DownloadedBytes { get; }
Property Value
Type Description
System.Byte[]

The downloaded bytes.

View Source

DownloadedBytesSavePath

Declaration
protected virtual string DownloadedBytesSavePath { get; set; }
Property Value
Type Description
System.String
View Source

Errors

Contains all the _errors and messages from the EMS obtained during this request. Do note that it content will not be available until the _isDone flag is set to true.

Declaration
public EmsError Errors { get; }
Property Value
Type Description
EmsError

The _errors.

View Source

IsDone

Returns whether the current request has completed or not.

Declaration
public virtual bool IsDone { get; }
Property Value
Type Description
System.Boolean

true if is done; otherwise, false.

View Source

JsonDownloaded

Contains the JSON response from this request once complete.

Declaration
public virtual string JsonDownloaded { get; }
Property Value
Type Description
System.String

The json downloaded.

View Source

JsonSavePath

Declaration
protected virtual string JsonSavePath { get; set; }
Property Value
Type Description
System.String
View Source

PostBody

Declaration
protected object PostBody { get; set; }
Property Value
Type Description
System.Object
View Source

ProductId

Declaration
protected int ProductId { get; set; }
Property Value
Type Description
System.Int32
View Source

Progress

Declaration
public virtual float Progress { get; protected set; }
Property Value
Type Description
System.Single
View Source

RequestContent

Declaration
protected BaseRequestContent RequestContent { get; set; }
Property Value
Type Description
BaseRequestContent
View Source

RequestResponseObject

Contains the response of the download extracted. This variable might be null until the download has complete.

Declaration
public virtual T RequestResponseObject { get; }
Property Value
Type Description
T

The request response object.

View Source

ResponseCode

Response code for this current request.

Declaration
public virtual string ResponseCode { get; }
Property Value
Type Description
System.String

The response code.

View Source

SizeOfFileBeingUploaded

Declaration
public virtual long SizeOfFileBeingUploaded { get; protected set; }
Property Value
Type Description
System.Int64

Methods

View Source

CompleteRequest(String, T, Action<T>, Boolean, String, String, String)

Concludes the current request, including storing the standard ApiData, deserializing the json, and calling the events/callback.

Declaration
public virtual T CompleteRequest(string responseJson, T reusableObject, Action<T> callback, bool isLiveData, string url = "", string requestResponseCode = "", string error = "")
Parameters
Type Name Description
System.String responseJson

Response json.

T reusableObject

Reusable object.

System.Action<T> callback

Callback.

System.Boolean isLiveData

Whether the data is freshly downloaded or offline loaded

System.String url

URL.

System.String requestResponseCode

Request response code.

System.String error

Error.

Returns
Type Description
T

The request.

View Source

HandleAPICall_GET<K>(Int32, T, BaseRequestContent, Action<T>)

Process of a standard API GET call compatible with the Appearition EMS.

Declaration
public IEnumerator HandleAPICall_GET<K>(int productId, T reusableObject, BaseRequestContent requestContent, Action<T> callback)
    where K : BaseHandler
Parameters
Type Name Description
System.Int32 productId

Product identifier.

T reusableObject
BaseRequestContent requestContent

Request content.

System.Action<T> callback

Callback.

Returns
Type Description
System.Collections.IEnumerator

The API call GE.

Type Parameters
Name Description
K
View Source

HandleAPICall_POST<K>(Int32, T, Object, BaseRequestContent, Action<T>)

Process of a standard API POST call compatible with the Appearition EMS. This process is not compatible with multipart form ApiData POST requests.

Declaration
public IEnumerator HandleAPICall_POST<K>(int productId, T reusableObject, object postRequestBody, BaseRequestContent requestContent, Action<T> callback = null)
    where K : BaseHandler
Parameters
Type Name Description
System.Int32 productId

Product identifier.

T reusableObject
System.Object postRequestBody

Post request body.

BaseRequestContent requestContent

Request content.

System.Action<T> callback

Callback.

Returns
Type Description
System.Collections.IEnumerator

The API call position.

Type Parameters
Name Description
K
View Source

HandleAPICall_POSTMultiPartFormData<K>(Int32, T, BaseRequestContent, IEnumerable<MultiPartFormParam>, String, Action<T>)

Declaration
public IEnumerator HandleAPICall_POSTMultiPartFormData<K>(int productId, T reusableObject, BaseRequestContent requestContent, IEnumerable<MultiPartFormParam> postRequestData, string mediaType = "", Action<T> callback = null)
    where K : BaseHandler
Parameters
Type Name Description
System.Int32 productId
T reusableObject
BaseRequestContent requestContent
System.Collections.Generic.IEnumerable<MultiPartFormParam> postRequestData
System.String mediaType
System.Action<T> callback
Returns
Type Description
System.Collections.IEnumerator
Type Parameters
Name Description
K
View Source

LaunchAPICall_GET<K>(Int32, T, BaseRequestContent, Action<T>)

Launches an API of the type GET and returns the download process ApiData class.

Declaration
public static AppearitionRequest<T> LaunchAPICall_GET<K>(int productId, T reusableObject, BaseRequestContent requestContent = null, Action<T> callback = null)
    where K : BaseHandler
Parameters
Type Name Description
System.Int32 productId

Product identifier.

T reusableObject
BaseRequestContent requestContent
System.Action<T> callback

Callback.

Returns
Type Description
AppearitionRequest<T>

The API call GE.

Type Parameters
Name Description
K
View Source

LaunchAPICall_MultiPartPOST<K>(Int32, T, BaseRequestContent, List<MultiPartFormParam>, String, Action<T>)

Launches an API of the type POST with MultiPart Form-ApiData, mainly for uploading ApiData, and returns the process ApiData class. This class doesn't include a _progress for the time being.

Declaration
public static AppearitionRequest<T> LaunchAPICall_MultiPartPOST<K>(int productId, T reusableObject, BaseRequestContent requestContent = null, List<MultiPartFormParam> postRequestData = null, string mediaType = "", Action<T> callback = null)
    where K : BaseHandler
Parameters
Type Name Description
System.Int32 productId

Product identifier.

T reusableObject
BaseRequestContent requestContent

Request content.

System.Collections.Generic.List<MultiPartFormParam> postRequestData

Post request ApiData.

System.String mediaType
System.Action<T> callback

Callback.

Returns
Type Description
AppearitionRequest<T>

The API call multi part position.

Type Parameters
Name Description
K
View Source

LaunchAPICall_POST<K>(Int32, T, Object, BaseRequestContent, Action<T>)

Launches an API of the type POST and returns the download process ApiData class.

Declaration
public static AppearitionRequest<T> LaunchAPICall_POST<K>(int productId, T reusableObject, object postRequestBody, BaseRequestContent requestContent = null, Action<T> callback = null)
    where K : BaseHandler
Parameters
Type Name Description
System.Int32 productId

Product identifier.

T reusableObject
System.Object postRequestBody

Post request body.

BaseRequestContent requestContent

Request content.

System.Action<T> callback

Callback.

Returns
Type Description
AppearitionRequest<T>

The API call position.

Type Parameters
Name Description
K

Events

View Source

OnRequestCompleted

Declaration
public event AppearitionBaseRequest<T>.RequestCompleted OnRequestCompleted
Event Type
Type Description
AppearitionBaseRequest.RequestCompleted<>
View Source

OnRequestCompletedJson

Declaration
public event AppearitionBaseRequest<T>.RequestCompletedJson OnRequestCompletedJson
Event Type
Type Description
AppearitionBaseRequest.RequestCompletedJson<>

Extension Methods

ObjectExtension.ToStream(Object)
  • View Source
Back to top Generated by DocFX