I have spent a considerable amount of time searching for SCORM 1.2 API tutorials/examples, which turns out to be quite a difficult task.
The only sample I have found is
I think the main difficulty is parsing the specificaion. Most of SCORM 1.2 is optional, so you can pick and choose what and how much of it you want to support. Triggering error codes, diagnostic messages, validating or not. All decisions you can make. But from a JavaScript perspective its about as easy as Nathan shows, with the exception you need to construct your CMI Object which you can do using JSON as an example.
I set up a similar mimic for running locally here https://github.com/cybercussion/SCOBot/blob/master/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js with SCORM 2004 in mind. The name spaces between the two versions changed so it's not a 1:1. This does not include all the rich rules, validations and error messages commonly thrown by a true runtime, and it wasn't meant to.
Building out a complete Runtime API can be time consuming. You commonly need to blend in Test Driven Development, and shake out the hundreds of pages of the specification.
There are a lot of use cases, but I wouldn't talk you out of checking it all out. Good knowledge to have regardless.