You are here

public function Github_Api_Repo::search in Bibliography Module 7.2

Search repos by keyword http://develop.github.com/p/repo.html

Parameters

string $query the search query:

string $language takes the same values as the language drop down on http://github.com/search:

int $startPage the page number:

Return value

array list of repos found

File

modules/CiteProc/Github/Api/Repo.php, line 22

Class

Github_Api_Repo
Searching repositories, getting repository information and managing repository information for authenticated users.

Code

public function search($query, $language = '', $startPage = 1) {
  $response = $this
    ->get('repos/search/' . urlencode($query), array(
    'language' => strtolower($language),
    'start_page' => $startPage,
  ));
  return $response['repositories'];
}