Skip to content

Instantly share code, notes, and snippets.

@jwtea
Created March 10, 2016 12:29
Show Gist options
  • Save jwtea/965d9985bff0c2f5526c to your computer and use it in GitHub Desktop.
Save jwtea/965d9985bff0c2f5526c to your computer and use it in GitHub Desktop.
public function getTeamRepoList()
{
$repository = new Repository();
$repository->getClient()->addListener(
new \Bitbucket\API\Http\Listener\OAuth2Listener(
array('access_token' => Session::get('oauth_access_token'))
)
);
$return = json_decode($repository->get('genecommerce','?pagelen=100')->getContent(),true);
//fix this properly
if(isset($return['error']))
{
self::refreshAuth();
}
return $return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment