From 77761cd6861490775d0d617f962ad213019517d9 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 19 Oct 2007 12:58:48 +0000 Subject: Bug 396243: Allow extensions (aka plugins) to extend the WebService interface This also includes the first checkin of the example plugin. Patch By Max Kanat-Alexander r=ghendricks, a=mkanat --- extensions/example/code/webservice.pl | 5 +++++ extensions/example/disabled | 0 extensions/example/lib/WSExample.pm | 10 ++++++++++ 3 files changed, 15 insertions(+) create mode 100644 extensions/example/code/webservice.pl create mode 100644 extensions/example/disabled create mode 100644 extensions/example/lib/WSExample.pm (limited to 'extensions') diff --git a/extensions/example/code/webservice.pl b/extensions/example/code/webservice.pl new file mode 100644 index 000000000..cf608c0e2 --- /dev/null +++ b/extensions/example/code/webservice.pl @@ -0,0 +1,5 @@ +use strict; +use warnings; +use Bugzilla; +my $dispatch = Bugzilla->hook_args->{dispatch}; +$dispatch->{Example} = "extensions::example::lib::WSExample"; diff --git a/extensions/example/disabled b/extensions/example/disabled new file mode 100644 index 000000000..e69de29bb diff --git a/extensions/example/lib/WSExample.pm b/extensions/example/lib/WSExample.pm new file mode 100644 index 000000000..05975b874 --- /dev/null +++ b/extensions/example/lib/WSExample.pm @@ -0,0 +1,10 @@ +package extensions::example::lib::WSExample; +use strict; +use warnings; + +use base qw(Bugzilla::WebService); + +# This can be called as Example.hello() from XML-RPC. +sub hello { return 'Hello!'; } + +1; -- cgit v1.2.3-24-g4f1b