Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #292 from stloyd/feature/github_client_update
Browse files Browse the repository at this point in the history
Update & clean-up code to follow latest `knplabs/github-api` client changes
  • Loading branch information
stloyd committed Oct 24, 2012
2 parents 503fb11 + 9fce5a6 commit 8a3c812
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 158 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"knplabs/knp-disqus-bundle": "dev-master",
"knplabs/knp-time-bundle": "dev-master",
"knplabs/knp-zend-cache-bundle": "dev-master",
"knplabs/github-api": "1.0.*",
"knplabs/github-api": "1.1.*",
"avalanche123/imagine-bundle": "dev-master",
"kriswallsmith/buzz": "0.7",
"nelmio/solarium-bundle": "dev-master",
Expand Down
124 changes: 65 additions & 59 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,11 @@ public function load(array $configs, ContainerBuilder $container)

$container->setAlias('knp_bundles.imagine', new Alias('knp_bundles.imagine.'.$driver, false));

// setup GitHub API client settings
$githubHttpClient = $container->getDefinition('knp_bundles.github_http_client');
$githubHttpClient->addMethodCall('setOption', array('limit', $config['github_client']['limit']));

$githubClient = $container->getDefinition('knp_bundles.github_client');
$githubClient->addMethodCall('setHttpClient', array($githubHttpClient));
$githubClient->addMethodCall(
'authenticate',
array(
$container->getParameter('knp_bundles.github.client_id'),
$container->getParameter('knp_bundles.github.client_secret'),
Client::AUTH_URL_CLIENT_ID
)
);
if (5000 != $config['github_client']['limit']) {
// setup GitHub API client settings
$githubClient = $container->getDefinition('knp_bundles.github_client');
$githubClient->addMethodCall('setOption', array('api_limit', $config['github_client']['limit']));
}
}

private function getConfigTree()
Expand Down
Loading

0 comments on commit 8a3c812

Please sign in to comment.