Show / Hide Table of Contents

    Class BaseApi

    Base class for any GET API call, or any API call response.

    Inheritance
    System.Object
    BaseApi
    BaseApiGet
    BaseApiPost
    Namespace: Appearition.API
    Assembly: Appearition.SDK.dll
    Syntax
    [Serializable]
    public abstract class BaseApi

    Fields

    Errors

    Declaration
    public string[] Errors
    Field Value
    Type Description
    System.String[]

    IsSuccess

    Declaration
    public bool IsSuccess
    Field Value
    Type Description
    System.Boolean

    Properties

    ApiVersion

    API Version used by this request. Default value is 1.

    Declaration
    public virtual int ApiVersion { get; }
    Property Value
    Type Description
    System.Int32

    The AP i version.

    AuthenticationOverride

    The level of authentication required for a certain API in order to work. If the needed type of not available, an error will be given and the call will not be able to proceed.

    Declaration
    public virtual AuthenticationOverrideType AuthenticationOverride { get; }
    Property Value
    Type Description
    AuthenticationOverrideType

    The type of the authentication override.

    AuthenticationTokenCustomKey

    If the authentication override type is set to custom, this value will be used to access the UserProfile authentication token dictionary to fetch the desired value. If none existing, the anonymous token will most likely be used.

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

    ChannelIdOverride

    Whether or not this specific API requires a certain channel id. If null, will use the one in the Appearition Gate.

    Declaration
    public virtual int? ChannelIdOverride { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    ExtraRequestUrlHeaders

    Provides a template for additional headers that should be included in the API call.

    Declaration
    protected virtual Dictionary<string, string> ExtraRequestUrlHeaders { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.String>

    The extra URL headers.

    ForcedEndPoint

    Whether or not the given request is forced to go to a specific end point instead of the main one.

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

    GetEmsCall

    Returns the end point part corresponding to this request. Format: api/RequestCategory/RequestName.

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

    The get EMS call.

    IsBeingUsed

    Determines whether this API request object is currently being used or is available. The purpose of this flag is for re-usability of API objects, marking whether this API object can be reused or not.

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

    true if is being used; otherwise, false.

    OverrideAuthenticationHeader

    Whether or not the authentication in the request header should be overrode. If overrode, include your own.

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

    RequiresTenant

    Whether or not this request should have a tenant as part of the request URL. True by default.

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

    Methods

    GetApiCall<T>(String, String, Int32, BaseRequestContent)

    Returns the API call of a given class

    Declaration
    public static string GetApiCall<T>(string source, string tenantName = "", int id = -1, BaseRequestContent requestContent = null)
        where T : BaseApi
    Parameters
    Type Name Description
    System.String source

    Source.

    System.String tenantName

    Tenant name.

    System.Int32 id

    Identifier.

    BaseRequestContent requestContent

    Request content.

    Returns
    Type Description
    System.String

    The API call.

    Type Parameters
    Name Description
    T

    The 1st type parameter.

    GetRequestExtraHeaders()

    Declaration
    public virtual Dictionary<string, string> GetRequestExtraHeaders()
    Returns
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.String>

    ResetToDefault<T>()

    Must contain information on how to reset this object to default. This system is made so that

    Declaration
    public virtual void ResetToDefault<T>()
        where T : BaseApi
    Type Parameters
    Name Description
    T

    Extension Methods

    ObjectExtension.ToStream(Object)
    Back to top Appearition SDK for Unity API