Get Repositories

@link http://developer.github.com/v3/repos/

@param string $username
@param array $params
@return RepositoryCollection
436539
public function repos($username, array $params = array())
    {
        $httpClient = $this->getClient()->getHttpClient();

        return new RepositoryCollection(
            $httpClient,
            'users/' . urlencode($username) . '/repos',
            $params
        );
    }
386589
@SuppressWarnings("unchecked")
    public static Set<Repository> toRepositoryList(Vector<Object> repositoriesParams)
    {
        Set<Repository> repositories = new TreeSet<Repository>();
        for(Object repositoryParams : repositoriesParams)
        {
            repositories.add(toRepository((Vector<Object>)repositoryParams));
        }
        
        return repositories;
    }
733361
public function topics($username, $repository)
    {
        //This api is in preview mode, so set the correct accept-header
        $this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json';

        return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/topics');
    }
1012531
public function getByUsername($username)
    {
        $filter = new IteratorFilter();
        $filter->addRelation($this->getUserDefinition()->getUsername(), Relation::EQUAL, $username);
        return $this->getUser($filter);
    }
441608
public function update($username, $repository, $reference, array $params)
    {
        if (!isset($params['sha'])) {
            throw new MissingArgumentException('sha');
        }

        $reference = $this->encodeReference($reference);

        return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference, $params);
    }
217830
public function getRepository($repositoryName)
    {
        $repositoryName = (string)$repositoryName;
        if(!isset($this->config['repositories'][$repositoryName]['class'])) return false;
        $className = $this->config['repositories'][$repositoryName]['class'];
        if (!class_exists($className)) {
            return false;
        }
        $connectionName = isset($this->config['repositories'][$repositoryName]['connection'])?$this->config['repositories'][$repositoryName]['connection']:null;
        return new $className($connectionName);
    }
603763
public static Option repositories(final String... repositoryUrls) {
        validateNotEmptyContent(repositoryUrls, true, "Repository URLs");
        final List<RepositoryOption> options = new ArrayList<RepositoryOption>();
        for (String repositoryUrl : repositoryUrls) {
            options.add(repository(repositoryUrl));
        }
        return repositories(options.toArray(new RepositoryOption[options.size()]));
    }
678698
public function all($username, $repository, $issue)
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/timeline');
    }
1261931
protected function githubRepositories()
    {
        $github = new Github();

        $response = new b8\Http\Response\JsonResponse();
        $response->setContent($github->getRepositories());
        return $response;
    }
653897
public function getBuilds($repository, $options = [])
    {
        $paramsUrl = $this->prepareParametersUrl($options, ['number', 'after_number', 'event_type']);
        $response = $this->sendRequest(sprintf('repos/%s/builds%s', $repository, $paramsUrl));

        $result = [];

        if ($response->getStatusCode() == 200) {
            $responseJson = $response->json();
            $commits = [];

            foreach ($responseJson['commits'] as $item) {
                $commit = new Commit();
                Commit::hydrate($item, $commit);

                $commits[$commit->getId()] = $commit;
            }

            foreach ($responseJson['builds'] as $item) {
                $build = new Build();
                $item['commit'] = $commits[$item['commit_id']];
                Build::hydrate($item, $build);

                $result[] = $build;
            }
        }

        return $result;
    }
603336
public function show($username, $repository, $sha, $recursive = false)
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees/'.rawurlencode($sha), $recursive ? ['recursive' => 1] : []);
    }
821049
public function getMedia(string $collectionName = 'default', $filters = []): Collection
    {
        return $this->getMediaRepository()->getFilteredCollection($collectionName, $filters);
    }
59499
public function getRepository($modelName, $collection = null)
    {
        return $this->repositoryFactory->getRepository($this, $modelName, $collection);
    }
936058
public RepositoryDTO getOrFindUserRepository(String user, String repositoryName, GitRepoClient repoClient) {
        RepositoryDTO repository = getUserRepository(user, repositoryName);
        if (repository == null) {
            List<RepositoryDTO> repositoryDTOs = repoClient.listRepositories();
            updateUserRepositories(repositoryDTOs);
            repository = getUserRepository(user, repositoryName);
        }
        return repository;
    }
602658
protected function getCachedDataRepository($repositoryName) {
		return array_key_exists($repositoryName, $this->cachedDataRepositories) ? $this->cachedDataRepositories[$repositoryName]:null;
	}
37604
public function resource(string $resourceName): Repository
    {
        if ($resource = $this->resources->get($resourceName)) {
            return ResourceCollection::makeResourceRepository($resource);
        }

        throw new Exception("Invalid api resource repository '{$resourceName}'");
    }
475031
public function get($username)
    {
        $url      = UrlHelper::buildUrl(Urls::URL_USER, [$username]);
        $response = $this->getConnection()->get($url);

        $data = $response->getJson();

        $options = ['_isNew' => false];

        $_documentClass = $this->_documentClass;
        return $_documentClass::createFromArray($data, $options);
    }