RusticiSoftware / TinCanJS

JavaScript library for the Experience API (Tin Can API)
http://rusticisoftware.github.io/TinCanJS/
Apache License 2.0
207 stars 115 forks source link

Allow forced no registration and POST method for setState #97

Closed garemoko closed 9 years ago

garemoko commented 9 years ago

Allow the AP to explicitly store a state document with no registration by passing a registration of null in the configuration.

Allow the AP to specify it wants to use POST instead of PUT for application/json.

Supersedes https://github.com/RusticiSoftware/TinCanJS/pull/93

brianjmiller commented 9 years ago

The method changes here should be applied to all of the document methods to keep them consistent. Can you add them for those? And tests?

garemoko commented 9 years ago

Added the registration change to getState and deleteState, added the optional POST for the activity and agent profile APIs and added tests of POST to all the document APIs.

Did a build (not committed) and ran tests successfully.

I didn't include a test for null registration for get/set/delete state - do we need that?

garemoko commented 9 years ago
brianjmiller commented 9 years ago

Note, sync tests only run in a browser environment not node. They are passing in Chrome. We'll do a full browser test when we cut the release. Eventually it'd be nice to have the same tests in the async file, but don't want to require that here because they were already mismatched.

So I'm :+1: @bscSCORM.