Client API

With the client API a developer will be able to execute many of the same actions that are possible through the user interface in the administration area. This means data can be saved or retrieved.

What will the client API enable a developer to do?
With the client API a developer will be able to execute many of the same actions that are possible through the user interface in the administration area. This means data can be saved or retrieved. It means that elements like pages, page types, page type fields, and skins can be added or modified. It means that the content of controls can be retrieved or altered. It means flexibility for manipulating not only the content of a page but also its functionality.

How will the client API work?
Each method in the API has its own signature, but in general the pattern is one or more data parameters followed by a callback parameter. For example, one method might be defined as follows:

method1: function(controlName, value, path, callback)

and another might be defined like this:

method2: function(type, callback)

While the last parameter is the callback function, the number and type of the other parameters varies. To use method1 one would pass in the name of a control, say “primaryWidget”, the value of interest, say “5”, the path, say “subdomain.domain.topdomain”, and the name of the callback function, say “function34”. It could look like this:

method1(“primaryWidget”, 5, “subdomain.domain.topdomain”, function34);

Then function34 might be defined something like:

var function34 = function(dataReturned){
//......put statements here.......
}

“dataReturned,” of course, would be the data coming back as a result of calling method1, and function34, being the callback function, would take “dataReturned” and consume it.

To use method2 one would pass in a type, say “number”, and the name of a callback function, say “manipulateResults”. The call would look like this:

method2(“number”, manipulateResults);

And manipulateResults might be defined as follows:

var manipulateResults = function(resultsReturned){
//......put statements here.......
}

“resultsReturned” are the data coming back as a result of calling method2, and the callback function manipulateResults consumes those data.

This is how the client API works as it is now configured, and this is how it will work for authorized users when it is released. Back to list...