-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
spekkionu edited this page May 14, 2012
·
2 revisions
Full api documentation of BugHerd API can be found at http://www.bugherd.com/api
Returns an array of BugHerd_User objects.
$api = new BugHerd_Api('email@example.com', 'password');
$users = $api->listUsers();
Returns an array of BugHerd_Project objects.
$api = new BugHerd_Api('email@example.com', 'password');
$projects = $api->listProjects();
Returns a BugHerd_Project object with project details.
$api = new BugHerd_Api('email@example.com', 'password');
$projects = $api->showProject($project_id);
Creates a new project
$api = new BugHerd_Api('email@example.com', 'password');
$project = new BugHerd_Project();
$project->name = 'Project name';
$project->devurl = 'http://www.project-url.com';
$project = $api->createProject($project);
Updates an existing project
$api = new BugHerd_Api('email@example.com', 'password');
$project = $api->showProject($project_id);
$project->name = 'New project name';
$project->devurl = 'http://www.new-project-url.com';
$project->active= false;
$api->updateProject($project_id, $project);
Deletes an existing project. Also deletes all tasks and comments for that project.
$api = new BugHerd_Api('email@example.com', 'password');
$api->deleteProject($project_id);
Returns tasks for a project. Returns array of BugHerd_Task objects.
$api = new BugHerd_Api('email@example.com', 'password');
$tasks = $api->listTasks($project_id);
Returns BugHerd_Task object.
$api = new BugHerd_Api('email@example.com', 'password');
$task = $api->showTask($project_id, $task_id);
Returns BugHerd_Task object.
$api = new BugHerd_Api('email@example.com', 'password');
$task = new BugHerd_Task();
$task->description = 'Task description';
$task->priority = BugHerd_Task::PRIORITY_IMPORTANT;
$task = $api->createTask($project_id, $task);
Returns BugHerd_Task object.
$api = new BugHerd_Api('email@example.com', 'password');
$task = $api->showTask($project_id, $task_id);
$task->description = 'New task description';
$task->priority = BugHerd_Task::PRIORITY_CRITICAL;
$task->status = BugHerd_Task::STATUS_DOING;
$api->updateTask($project_id, $task_id, $task);
Returns array of BugHerd_Comment objects
$api = new BugHerd_Api('email@example.com', 'password');
$comments = $api->listComments($project_id, $task_id);
Returns BugHerd_Comment object
$api = new BugHerd_Api('email@example.com', 'password');
$comment = $api->showComment($project_id, $task_id, $comment_id);
Returns BugHerd_Comment object
$api = new BugHerd_Api('email@example.com', 'password');
$comment = new BugHerd_Comment();
$comment->test = 'Comment text';
$comment = $api->createComment($project_id, $task_id, $comment_id, $comment);