Skip to content

Instantly share code, notes, and snippets.

@musicm122
Created December 9, 2016 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musicm122/c2884a9feee1b3c25fffa05b0b300664 to your computer and use it in GitHub Desktop.
Save musicm122/c2884a9feee1b3c25fffa05b0b300664 to your computer and use it in GitHub Desktop.
Using Scorm Extensions for Export and Formatting
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