Skip to content

Commit 9c45fa4

Browse files
committed
Merge pull request #70 from mrkrstphr/organization-repos
Implementing retrieving organization repos
2 parents bde452a + 18460e3 commit 9c45fa4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/Github/Api/Repo.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ public function find($keyword, array $params)
3737
return $this->get('legacy/repos/search/'.urlencode($keyword), array_merge(array('start_page' => 1), $params));
3838
}
3939

40+
/**
41+
* List all repositories for an organization
42+
* @link http://developer.github.com/v3/repos/#list-organization-repositories
43+
*
44+
* @param string $organization the name of the organization
45+
* @param array $params
46+
*
47+
* @return array list of organization repositories
48+
*/
49+
public function org($organization, array $params = array())
50+
{
51+
return $this->get('orgs/'.$organization.'/repos', array_merge(array('start_page' => 1), $params));
52+
}
53+
4054
/**
4155
* Get extended information about a repository by its username and repository name
4256
* @link http://developer.github.com/v3/repos/

0 commit comments

Comments
 (0)