/// <summary> /// Retrieves statements using the "more" property attached to a previous statement response. /// /// This function will remove the first parts of that "more" property to fit your LRS endpoint. /// </summary> /// <param name="moreIrl"></param> /// <param name="callback"></param> public static void GetMoreStatements(string moreIrl, Action <StatementResult, UnityWebRequest> callback) { // Make sure it's formatted correctly if (moreIrl.Contains("/more/")) { // Find out where it is int index = moreIrl.IndexOf("/more/"); string more = moreIrl.Substring(index, moreIrl.Length - index); // Build the fully qualified URL string url = XAPIMessenger.Config.Endpoint + more; // Make the request XAPIMessenger.GetStatements(url, callback); } else { throw new ArgumentException("XAPIWrapper.GetMoreStatements: moreIrl argument must contain \"/more/\""); } }
/// <summary> /// Retrieves statements according to the StatementQuery values. /// /// The StatementResult object in the callback may contain a `MoreIRL` value. If that is the case, /// then more statements matching your query can be returned using that endpoints with your LRS. /// </summary> /// <param name="result"></param> /// <param name="callback"></param> public static void GetStatements(StatementQuery query, Action <StatementResult, UnityWebRequest> callback) { string url = XAPIMessenger.Config.StatementEndpoint + query.BuildQueryString(); XAPIMessenger.GetStatements(url, callback); }
/// <summary> /// Retrieves statements from a fully-qualified URL pointing to the configured LRS. /// /// This is the most granular version of the call and should only be made by the wrapper itself. /// </summary> /// <param name="url"></param> /// <param name="callback"></param> public static void GetStatements(string url, Action <StatementResult, UnityWebRequest> callback) { // Make sure we have a messenger XAPIWrapper.CheckMessenger(); XAPIMessenger.GetStatements(url, callback); }