History: Webservice Handler
Source of version: 2
Copy to clipboard
One of tikiwiki's new features is the ability to register webservices to be used by plugins. Combined with ((Plugin Alias Handler)), this allows to create brand new plugins exploiting data from external systems. !Bugzilla Webservice example This plugin would ask for the real data export URL for the webservice. This is not mandatory. {CODE(caption=>YAML,wrap=>1)} preferences: enable: [ wikiplugin_$profileobject:bugzilla_ws$ ] objects: - type: webservice ref: bugzilla_ws data: name: $profilerequest:Webservice Name$bugzilla$ ur<x>l: $profilerequest:Bugzilla Webservice URL$http://example.com/bugzilla/json_export.pl?id=%bugid%$ schema_version: 1.0 schema_documentation: http://example.com/bugzilla_exporter/doc/1.0 - type: webservice_template ref: base data: webservice: $bugzilla_ws name: base engine: smarty output: tikiwiki content: | Title: $profileobject:response.title$ Status: $profileobject:response.status$ Assigned to: $profileobject:response.assignee.full_name$ - type: plugin_alias ref: plugin data: name: $bugzilla_ws implementation: webservice description: name: Bugzilla description: Displays bugs from remote hosts prefs: [ wikiplugin_$profileobject:bugzilla_ws$ ] params: template: name: Template required: n description: Name of the template to use. Default to base. id: name: Bug ID required: y description: Bug number from Bugzilla body: input: ignore default: "" params: service: $bugzilla_ws template: base id: 0 {CODE} ! Webservice Object ||__Name__|__Mandatory__|__Value__ name|yes|Alpha-only name of the webservice url|yes|URL of the web service with arguments entered as %arg_name% schema_version| |Schema version number disclosed by the web service schema_documentation| |URL of the documentation for the web service || ! Webservice Template Object ||__Name__|__Mandatory__|__Value__ webservice|yes|Webservice to add the template to name|yes|Alpha-only name of the webservice engine|yes|Rendering engine used (smarty or javascript at this time) output|yes|Output produced by the engine (tikiwiki or html) content|yes|Template content ||