(
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:
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
})