NAME
WebService::Backlog - Perl interface to Backlog.
SYNOPSIS
use
WebService::Backlog;
my
$backlog
= WebService::Backlog->new(
space
=>
'yourspaceid'
,
username
=>
'username'
,
password
=>
'password'
);
# get your projects.
my
$projects
=
$backlog
->getProjects;
# List of objects (WebService::Backlog::Project)
for
my
$project
(@{
$project
}) {
$project
->name .
"\n"
;
}
# get assigned issues.
my
$issues
=
$backlog
->findIssue({
projectId
=> 1,
# your project id.
assignerId
=> 2,
# your user id.
});
# and more ...
DESCRIPTION
WebService::Backlog provides interface to Backlog. Backlog is a web based project collaboration & communication tool.
For more information on Backlog, visit the Backlog website. http://www.backlog.jp/
METHODS
new
Returns a new WebService::Backlog object.
my
$backlog
= WebService::Backlog->new(
space
=>
'yourspaceid'
,
username
=>
'username'
,
password
=>
'password'
);
Parameters below must be specified.
space ... your space id
username ... your username in this space
password ... your passwrord
getProjects
Returns a list of all projects you join.
my
$projects
=
$backlog
->getProjects;
This method returns a reference to array of WebService::Backlog::Project.
getProject
Retrieve a specific project by id or key.
my
$project_by_id
=
$backlog
->getProject(123);
my
$project_by_key
=
$backlog
->getProject(
"BLG"
);
getComponents
Returns a list of all components(categories) of project.
my
$components
=
$backlog
->getComponents(
$project_id
);
This method returns a reference to array of WebService::Backlog::Component.
getVersions
Returns a list of all versions(milestones) of project.
my
$versions
=
$backlog
->getVersions(
$project_id
);
This method returns a reference to array of WebService::Backlog::Version.
getUsers
Returns a list of all users who join this project.
my
$users
=
$backlog
->getUsers(
$project_id
);
This method returns a reference to array of WebService::Backlog::User.
getIssue
Retrieve a specific issue by key or id.
my
$issue_by_id
=
$backlog
->getIssue( 123 );
my
$issue_by_key
=
$backlog
->getIssue(
"BLG-11"
);
getComments
Returns a list of all comments of this issue.
my
$comments
=
$backlog
->getComments(
$issue_id
);
This method returns a reference to array of WebService::Backlog::Comment.
countIssue
Returns count of issues by condition.
my
$issue_count
=
$backlog
->countIssue(
$condition
);
Argument $condition
is object of WebService::Backlog::FindCondition or reference of HASH.
# FindCondition
my
$condition
= WebService::Backlog::FindCondition->new({
projectId
=> 123,
statusId
=> [1,2,3] });
my
$count
=
$backlog
->countIssue(
$condition
);
# HASH condision
my
$count_by_hash
=
$backlog
->countIssue({
projectId
=> 123,
statusId
=> [1,2,3] });
findIssue
Returns a list of issues by condition.
my
$issues
=
$backlog
->findIssue(
$condition
);
Argument $condition
is object of WebService::Backlog::FindCondition or reference of HASH.
# FindCondition
my
$condition
= WebService::Backlog::FindCondition->new({
projectId
=> 123,
statusId
=> [1,2,3] });
my
$count
=
$backlog
->countIssue(
$condition
);
# HASH condision
my
$count_by_hash
=
$backlog
->countIssue({
projectId
=> 123,
statusId
=> [1,2,3] });
createIssue
Create new issue.
my
$issue
=
$backlog
->createIssue(
$create_issue
);
Argument $create_issue
is object of WebService::Backlog::CreateIssue or reference of HASH.
# CreateIssue
my
$create_issue
= WebService::Backlog::CreateIssue->new({
projectId
=> 123,
summary
=>
'This is new issue.'
,
description
=>
'This is new issue about ...'
,
});
my
$issue
=
$backlog
->createIssue(
$create_issue
);
# HASH condision
my
$issue_by_hash
=
$backlog
->createIssue({
projectId
=> 123,
summary
=>
'This is new issue.'
,
description
=>
'This is new issue about ...'
,
});
updateIssue
Update a issue.
my
$issue
=
$backlog
->updateIssue(
$update_issue
);
Argument $update_issue
is object of WebService::Backlog::UpdateIssue or reference of HASH.
# UpdateIssue
my
$update_issue
= WebService::Backlog::UpdateIssue->new({
key
=>
'BLG-123'
,
comment
=>
'This is comment'
,
});
my
$issue
=
$backlog
->updateIssue(
$update_issue
);
# HASH condision
my
$issue_by_hash
=
$backlog
->updateIssue({
key
=>
'BLG-123'
,
comment
=>
'This is comment'
,
});
Argument parameter 'key' is required.
switchStatus
Switch status of issue.
my
$issue
=
$backlog
->switchStatus(
$switch_status
);
Argument $switch_status
is object of WebService::Backlog::SwitchStatus or reference of HASH.
# SwitchStatus
my
$switch_status
= WebService::Backlog::SwitchStatus->new({
key
=>
'BLG-123'
,
statusId
=> 2,
comment
=>
'I get to work'
,
});
my
$issue
=
$backlog
->switchStatus(
$switch_status
);
# HASH condision
my
$issue_by_hash
=
$backlog
->switchStatus({
key
=>
'BLG-123'
,
statusId
=> 2,
comment
=>
'I get to work'
,
});
Argument parameters 'key' and 'statusId' are required.
statusId value means 1: Open 2: In Progress 3: Resolved 4: Closed
AUTHOR
Ryuzo Yamamoto <yamamoto@nulab.co.jp>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.