예제 #1
0
        public void postInitialize(string _object)
        {
            var statement = new xAPIStatement(null, "http://adlnet.gov/expapi/verbs/launched", launchUrl + "launch/" + launchToken);

            statement.actor = this.launchData.Actor;
            postStatement(statement);
        }
예제 #2
0
        public void postStatement(string _verb, string _object, xAPIResult result)
        {
            var statement = new xAPIStatement(null, _verb, _object);

            statement.result = result;
            statement.actor  = this.launchData.Actor;
            postStatement(statement);
        }
예제 #3
0
        public void postStatement(xAPIStatement statement)
        {
            var body    = statement.toString();
            var content = new System.Net.Http.StringContent(body, Encoding.UTF8, "application/json");

            content.Headers.Add("cookie", this.cookie.ToString());
            content.Headers.Add("X-Experience-API-Version", "1.0");
            try
            {
                var    responseMessage = client.PostAsync(this.launchData.endpoint + "statements", content).Result;
                string responseText    = responseMessage.Content.ReadAsStringAsync().Result;
            }
            catch (Exception e)
            {
                var s = e.Message;
            }
        }
예제 #4
0
 public void postStatement(string _verb, string _object, xAPIResult result)
 {
     var statement = new xAPIStatement(null, _verb, _object);
     statement.result = result;
     statement.actor = this.launchData.Actor;
     postStatement(statement);
 }
예제 #5
0
 public void postStatement(xAPIStatement statement)
 {
     var body = statement.toString();
     var content = new System.Net.Http.StringContent(body, Encoding.UTF8, "application/json");
     content.Headers.Add("cookie", this.cookie.ToString());
     content.Headers.Add("X-Experience-API-Version", "1.0");
     try
     {
         var responseMessage = client.PostAsync(this.launchData.endpoint + "statements", content).Result;
         string responseText = responseMessage.Content.ReadAsStringAsync().Result;
     }
     catch (Exception e)
     {
         var s = e.Message;
     }
 }
예제 #6
0
 public void postInitialize(string _object)
 {
     var statement = new xAPIStatement(null, "http://adlnet.gov/expapi/verbs/launched", launchUrl + "launch/" + launchToken);
     statement.actor = this.launchData.Actor;
     postStatement(statement);
 }