Show / Hide Table of Contents

    Class ExperienceAPIClient

    A client for connecting to the xAPI Web service

    Inheritance
    Object
    ExperienceAPIClient
    Namespace: i5.Toolkit.Core.ExperienceAPI
    Assembly: cs.temp.dll.dll
    Syntax
    public class ExperienceAPIClient

    Constructors

    ExperienceAPIClient()

    Creates a new xAPI client

    Declaration
    public ExperienceAPIClient()

    ExperienceAPIClient(Uri, String, String)

    Creates a new xAPI client

    Declaration
    public ExperienceAPIClient(Uri xApiEndpoint, string authorizationToken, string version)
    Parameters
    Type Name Description
    Uri xApiEndpoint

    The target URI of the xAPI

    String authorizationToken

    The authorization token to allow the client to access the xAPI

    String version

    The version of the xAPI

    Properties

    AuthorizationToken

    The authorization token to allow the client to access the xAPI

    Declaration
    public string AuthorizationToken { get; set; }
    Property Value
    Type Description
    String

    Version

    The API version. By default 1.0.3

    Declaration
    public string Version { get; set; }
    Property Value
    Type Description
    String

    WebConnector

    The Web connector that determines how the API is queried

    Declaration
    public IRestConnector WebConnector { get; set; }
    Property Value
    Type Description
    IRestConnector

    XApiEndpoint

    The target uri where the xAPI can be found

    Declaration
    public Uri XApiEndpoint { get; set; }
    Property Value
    Type Description
    Uri

    Methods

    SendStatementAsync(Actor, Verb, XApiObject)

    Sends a new statement to the xAPI repository

    Declaration
    public Task<WebResponse<string>> SendStatementAsync(Actor actor, Verb verb, XApiObject obj)
    Parameters
    Type Name Description
    Actor actor

    The actor of the statement

    Verb verb

    The verb of the statement

    XApiObject obj

    The object of the statement

    Returns
    Type Description
    Task<WebResponse<String>>

    Returns the result of the Web query; if successful, this contains the generated statement id

    SendStatementAsync(Statement)

    Sends a new statement to the xAPI repository

    Declaration
    public Task<WebResponse<string>> SendStatementAsync(Statement statement)
    Parameters
    Type Name Description
    Statement statement

    The xAPI statement that should be sent

    Returns
    Type Description
    Task<WebResponse<String>>

    Returns the result of the Web query; if successful, this contains the generated statement id

    SendStatementAsync(String, String, String)

    Sends a new statement to the xAPI repository

    Declaration
    public Task<WebResponse<string>> SendStatementAsync(string actorMail, string verbUrl, string objectUrl)
    Parameters
    Type Name Description
    String actorMail

    The mail address of the statement's actor

    String verbUrl

    The id of the statement's verb (should be a url)

    String objectUrl

    The id of the statement's object

    Returns
    Type Description
    Task<WebResponse<String>>

    Returns the result of the Web query; if successful, this contains the generated statement id

    Back to top i5 Toolkit Documentation