/** * 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; }
public function apiRepository() { $api = new API\Repositories\Repository(); $this->httpClient->setApiVersion('1.0'); $api->setClient($this->httpClient); return $api; }