Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Adding searchLabel method
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeagan committed Jul 22, 2010
1 parent 397d956 commit 7f56845
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/api/phpGitHubApiIssue.php
Expand Up @@ -45,6 +45,21 @@ public function search($username, $repo, $state, $searchTerm)
return $response['issues'];
}

/**
* Search issues by label
*
* @param string $username the username
* @param string $repo the repo
* @param string $label the label to filter issues by
* @return array list of issues found
*/
public function searchLabel($username, $repo, $label)
{
$response = $this->api->get('issues/list/'.urlencode($username).'/'.urlencode($repo).'/label/'.urlencode($label));

return $response['issues'];
}

/**
* Get extended information about an issue by its username, repo and number
* http://develop.github.com/p/issues.html#view_an_issue
Expand Down

0 comments on commit 7f56845

Please sign in to comment.