JIRA::REST - Alternative Jira REST client
version 0.01
use JIRA::REST;
my $client = JIRA::REST->new(
username => 'username',
password => 'password',
base_url => 'http://jira.mycompany.com',
);
my $issue = $client->get_issue( 'TICKET-12' );
print $issue->{fields}{priority}{value}{name}."\n";
JIRA::REST is a wrapper for the JIRA REST API. It is a thin wrapper, returning the decoded version of the JSON without any munging or mangling.
JIRA::REST is *heavily* based upon JIRA::Client::REST. The primary difference is that the latter library uses Net::HTTP::Spore, and this library just uses LWP directly. Additionally, this library has more flexible and (IMO) more sane method signatures. Finally, this library also currently implements more of the JIRA REST API than JIRA::Client::REST
Set/Get the initial part of the URL for the JIRA instance
Example: '/rest/api/latest/'
Default: '/rest/api/latest/'
Set/Get the base host part of the URL for the JIRA instance.
Example: 'https://jira.yourcompany.com'
No default; required attribute.
Debug flag. Makes the copious outputs.
Set/Get the password to use when connecting to JIRA.
Set/Get the username to use when connecting to JIRA.
Create an issue with the provided arguments. Returns the issue ID for the newly generated issue or throws an exception.
Example:
my $new_issue_id = $client->create_issue(
fields => {
assignee => { name => 'jira.username' } ,
project => { key => 'PROJECTKEY' } ,
summary => 'short summary' ,
description => 'long description' ,
issuetype => { name => 'Type' } ,
},
);
Delete a link between two issues
Get the issue with the supplied id. Returns a HashRef of data.
Get the meta data (required and optional fields, etc.) for creating issues.
Get a list of all possible issue link types
Get the transitions possible for this issue by the current user.
Get voters on the issue.
Get watchers on the issue.
Get the project for the specifed key.
Get the versions for the project with the specified key.
Get the version with the specified id.
Link together two issues
Post a comment on an issue
Search for issues
Remove your vote from an issue.
Remove a watcher from an issue.
Cast your vote in favor of an issue.
Watch an issue. (Or have someone else watch it.)
John SJ Anderson [email protected]
This software is copyright (c) 2012 by Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.