The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::FogBugz - FogBugz API for Perl

SYNOPSIS

    use WebService::FogBugz;

    my $fogbugz = WebService::FogBugz->new({
        # optional
        config      => 'fbrc',

        # mandatory, if no config option
        base_url    => 'http://yourfogbugz.example.com/api.asp',

        # preprepared credentials
        token       => 'mytoken',

        # alternative credentials
        email       => 'yourmail@example.com',
        password    => 'yourpassword',
    });

    $fogbugz->logon;

    # your request.
    my $xml = $fogbugz->request_method('search', {
        q => 'WebService',
    });

    $fogbugz->logoff;

DESCRIPTION

This module provides a Perl interface for the FogBugz API. FogBugz is a project management system.

CONSTRUCTOR

new([%options])

This method returns an instance of this module.

In order to process commands for the FogBugz API, certain configuration details are required. However, there are a few ways these can be presented. Configuration values can be provided as options to the constructor, or via a configuration file.

The constructor options can be one or more of the following:

  • config

    The file path to a configuration file. See below for further details regarding the configuration file.

    Note: If no configuration file is found, all credentials must be provided as constructor options.

  • base_url

    Your FogBugz API's URL. See below for more details regarding the base URL.

  • token

    Your personal token for accessing FogBugz.

  • email

    Your login email address used for logging in to FogBugz.

  • password

    Your login password used for logging in to FogBugz.

CONFIGURATION

Configuration File

If no file is given as a configuration option, the environment variable 'FBRC' is checked. If still no file is defined, the file '.fbrc' is looked for in the local directory followed by your home directory.

If a file is found, and readable, it is read and its contents are extracted into configuration variables. The file may look like the one of the following examples.

Example 1:

  URL=https://example.com/fogbugz/api.asp
  TOKEN=mytoken

Example 2:

  URL=https://example.fogbugz.com/api.asp
  EMAIL=me@example.com
  PASSWORD=mypassword

Note that constructor options can be used to override these values if required.

Base URL

This may be a hosted instance (e.g. https://example.fogbugz.com/api.asp?) or a local installation (e.g. http://www.example.com/fogbugz/api.asp).

If you're unsure about your base_url, check the url field of an XML request. For example, if using a local installation, such as http://www.example.com/fogbugz, check the URL as http://www.example.com/fogbugz/api.xml. If you have a FogBugz On Demand account the link will be https://example.fogbugz.com/api.xml, where example is your account name.

ACCESS METHODS

The following are used as convenience methods, as they are not necessarily required, but are used by the older version of this distribution, and are maintained for backwards compatibility.

logon

Retrieves an API token from Fogbugz.

logoff

Log off from FogBugz.

COMMAND METHODS

request_method($command,$hash)

The 1st argument is the name of command you wish to action, and the 2nd argument is the hash of parameters for the specified command.

FogBugz supports many commands, which you can find from FogBugz Online Documentation by using keyword of 'cmd'.

BUGS

Please report any bugs or feature requests to bug-webservice-fogbugz@rt.cpan.org, or through the web interface at http://rt.cpan.org.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc WebService::FogBugz

You can also look for information at:

AUTHORS

Original Author: Takatsugu Shigeta <shigeta@cpan.org>

Current Maintainer: Barbie <barbie@cpan.org>

LICENCE AND COPYRIGHT

  Copyright (c) 2007-2014, Takatsugu Shigeta C<< <shigeta@cpan.org> >>.
  Copyright (c) 2014-2015, Barbie for Miss Barbell Productions. 
  All rights reserved.

This distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.