Created
December 9, 2016 17:37
-
-
Save musicm122/c2884a9feee1b3c25fffa05b0b300664 to your computer and use it in GitHub Desktop.
Using Scorm Extensions for Export and Formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<string> GetCoursesAsCSV() | |
{ | |
var appId = "Your Application Id"; | |
var secretKey = "Your Secret Key"; | |
var scormServiceUrl = "https://cloud.scorm.com/EngineWebServices/"; | |
ScormCloud.Configuration = new Configuration(scormEngineServiceUrl: scormServiceUrl, appId: appId, securityKey: secretKey, origin: ""); | |
var result = await ScormCloud.CourseService.GetCourseDetailListAsync(); | |
return result.ToCSVString(); | |
} | |
public async Task<string> GetCourseAsFormattedString() | |
{ | |
var appId = "Your Application Id"; | |
var secretKey = "Your Secret Key"; | |
var scormServiceUrl = "https://cloud.scorm.com/EngineWebServices/"; | |
ScormCloud.Configuration = new Configuration(scormEngineServiceUrl: scormServiceUrl, appId: appId, securityKey: secretKey, origin: ""); | |
var result = await ScormCloud.CourseService.GetCourseDetailListAsync(); | |
var top = result.FirstOrDefault(); | |
return top.ToFormattedString(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment