Methods

getVersion

(source code)
getVersion()
Returns the SP version

Returns:

String
The current SharepointPlus version

plugin

(source code)
plugin(pluginName, options)
Permits to use a plugin

Parameters:

String
pluginName
The plugin name to call
Object
options Optional
The options for the plugin

Example:

$SP().plugin('test',{message:"This is a test !"})

registerPlugin

(source code)
registerPlugin(pluginName, pluginFct)
Permits to register a plugin

Parameters:

String
pluginName
You have to define the plugin name
Function
pluginFct
You have to define the function of the plugin with one parameter that are the options passed

Example:

$SP().registerPlugin('test', function(options) {
  console.log(options.message);
})

webService

(source code)
webService(options, operation, service, properties, webURL, after)
Permits to directly deal with a WebService (similar to SPServices http://sympmarc.github.io/SPServices/core/web-services.html)

Parameters:

Object
options
String
operation
The method name to use (e.g. UpdateList, GetList, ....)
String
service
The name of the service (Lists, Versions, PublishedLinksService, ...) it's the ".asmx" name without the extension
Object
properties Optional, Default: {}
The properties to call
String
webURL Optional, Default: current website
The URL of the website
Function
after Optional, Default: function(response){}
A callback function

Returns:

Promise
The 'response' from the server is passed, and only on `resolve`

Example:

$SP().webService({ // http://sympmarc.github.io/SPServices/core/web-services/Lists/UpdateList.html
  service:"Lists",
  operation:"Updatelist",
  webURL:"http://what.ever/"
  properties:{
    listName:"Test",
    listProperties:"...",
    newFields:"...",
    updateFields:"...",
    deleteFields:"...",
    listVersion:"..."
  }
}).then(function(response) {
  // do something with the response
})