SPG

by cdeutsch

JavaScript

$.ajax({
        url: 'https://dev.spectrumplayground.com/api/lessonReport',
        type: 'POST',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8',
        data: {
            user_id: 103,
            student_id: 7,
            lesson_id: 718,
            student_subject_id: 1,
            student_grade_level_id: 1,
            completed: 1,
            started: 1234,
            duration: 6542,
            score: 88,        
            seconds_played: 8
        },
        success: function() {
            console.log('success');
        },
        error: function(xhr, textStatus, errorThrown) {
            console.log(textStatus);
            console.log(errorThrown);
            console.log(xhr);
        }

    });