示例#1
0
 /**
  * Bootstrap the Bitbucket API for Repositories.
  *
  * @param  RepositoryInterface $repo
  * @return Repository
  */
 private function bootstrapApi(RepositoryInterface $repo)
 {
     $api = new Repository();
     $credentials = new Basic($repo->getUsername(), $repo->getPassword());
     $api->setCredentials($credentials);
     return $api;
 }
示例#2
0
 public function apiRepository()
 {
     $api = new API\Repositories\Repository();
     $this->httpClient->setApiVersion('1.0');
     $api->setClient($this->httpClient);
     return $api;
 }