]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 412850: Rename the webservice method Bug.get_bugs() to simple Bug.get()
authordkl%redhat.com <>
Sat, 19 Jan 2008 03:30:29 +0000 (03:30 +0000)
committerdkl%redhat.com <>
Sat, 19 Jan 2008 03:30:29 +0000 (03:30 +0000)
David Lawrence <dkl@redhat.com> r=mkanat

Bugzilla/WebService/Bug.pm
contrib/bz_webservice_demo.pl

index c4361e679415ee2ecd211a33f9888ed0bee35ac7..01d5c16eb29616222561e6dd0ced71fd6898efad 100755 (executable)
@@ -57,11 +57,17 @@ use constant GLOBAL_SELECT_FIELDS => qw(
 
 use constant PRODUCT_SPECIFIC_FIELDS => qw(version target_milestone component);
 
+######################################################
+# Add aliases here for old method name compatibility #
+######################################################
+
+BEGIN { *get_bugs = \&get }
+
 ###########
 # Methods #
 ###########
 
-sub get_bugs {
+sub get {
     my ($self, $params) = @_;
     my $ids = $params->{ids};
     defined $ids || ThrowCodeError('param_required', { param => 'ids' });
@@ -280,7 +286,7 @@ You specified a field that doesn't exist or isn't a drop-down field.
 
 =over
 
-=item C<get_bugs> B<EXPERIMENTAL>
+=item C<get> B<EXPERIMENTAL>
 
 =over
 
@@ -288,6 +294,8 @@ You specified a field that doesn't exist or isn't a drop-down field.
 
 Gets information about particular bugs in the database.
 
+Note: Can also be called as "get_bugs" for compatibilty with Bugzilla 3.0 API.
+
 =item B<Params>
 
 =over
index 72c8fdaa93e9a4868e419ba252eecaeea27531c8..a5e6af9f95694a5d0c4863167bcb27c9251cba64 100755 (executable)
@@ -235,13 +235,15 @@ if (defined($Bugzilla_login)) {
 
 =head2 Retrieving Bug Information
 
-Call C<Bug.get_bug> with the ID of the bug you want to know more of.
-The call will return a C<Bugzilla::Bug> object.
+Call C<Bug.get> with the ID of the bug you want to know more of.
+The call will return a C<Bugzilla::Bug> object. 
+
+Note: You can also use "Bug.get_bugs" for compatibility with Bugzilla 3.0 API.
 
 =cut
 
 if ($bug_id) {
-    $soapresult = $proxy->call('Bug.get_bugs', { ids => [$bug_id] });
+    $soapresult = $proxy->call('Bug.get', { ids => [$bug_id] });
     _die_on_fault($soapresult);
     $result = $soapresult->result;
     my $bug = $result->{bugs}->[0];