The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

BZ::Client - BZ::Client - A client for the Bugzilla web services API.

VERSION

version 1.062_1

SYNOPSIS

  my $client = BZ::Client->new("url" => $url,
                               "user" => $user,
                               "password" => $password);
  $client->login();

NAME

  BZ::Client - A client for the Bugzilla web services API.

VERSION

version 1.062_1

CLASS METHODS

This section lists the class methods of BZ::Client.

new

  my $client = BZ::Client->new("url" => $url,
                               "user" => $user,
                               "password" => $password);

The new method constructs a new instance of BZ::Client. Whenever you want to connect to the Bugzilla server, you must first create a Bugzilla client. The methods input is a hash of parameters.

For debuggign, you can pass in a subref named logger which will be fed debugging information as the client works. Also the logDirectory option is a directory where the raw http content will be dumped.

url

The Bugzilla servers URL, for example https://bugzilla.mozilla.org/.

user

The user name to use when logging in to the Bugzilla server. Typically, this will be your email address.

password

The password to use when logging in to the Bugzilla server.

INSTANCE METHODS

This section lists the methods, which an instance of BZ::Client can perform.

url

  my $url = $client->url();
  $client->url($url);

Returns or sets the Bugzilla servers URL.

user

  my $user = $client->user();
  $client->user($user);

Returns or sets the user name to use when logging in to the Bugzilla server. Typically, this will be your email address.

password

  my $password = $client->password();
  $client->password($password);

Returns or sets the password to use when logging in to the Bugzilla server.

login

Used to login to the Bugzilla server. There is no need to call this method explicitly: It is done automatically, whenever required.

api_call

  my $response = $client->api_call($methodName, $params);

Used by subclasses of BZ::Client::API to invoke methods of the Bugzilla API. Takes a method name and a hash ref of parameters as input. Returns a hash ref of named result objects.

SEE ALSO

BZ::Client::Exception

AUTHOR

Dean Hamstead <dean@bytefoundry.com.au>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Dean Hamstad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.