Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

We will use code snippets throughout the next few articles so you might want the entire files right away. Understand that these are the complete files and will have the complete solution in them that will be explained in the next few articles.

In this exercise, we add a new server-side service to Shindig to be accessed using the osapi feature.

...

We edit the setOutcome method in learning_client.js from the TBD as follows:

Code Block
titlelearning_client.js
        setOutcome : function(data, handler) {
            if ( handler === 'silent' ) handler = (function (result) { } );
            if ( handler === undefined ) handler = (function (result) {
                if (result.error) {
                    alert('Error, unable to send outcome to server.');
                }
            } ) ;
            osapi.learning.setOutcome({'outcome' : data}).execute(handler);
        },

...

So that completes our look at a simple call to the server-side service to send some data.

Up Next TBD : Understanding Batch/Asynchronous Loading in a Gadget