Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.18 KB

search.md

File metadata and controls

48 lines (32 loc) · 1.18 KB

Search API

Back to the navigation

Searching repositories, code, issues and users. Wrap GitHub Search API. All methods are described on that page.

Search repositories

$repos = $client->api('search')->repositories('github language:php');

Returns a list of repositories found by such criteria.

Search code

$repos = $client->api('search')->code('@todo language:php');

Returns a list of files found by such criteria (containing "@todo" and language==php).

Search issues

$repos = $client->api('search')->issues('bug language:php');

Returns a list of issues found by such criteria.

Search users

$repos = $client->api('search')->users('location:Amsterdam language:php');

Returns a list of users found by such criteria.

Sorting results

You can sort results using 2-3 arguments.

$repos = $client->api('search')->repositories('...', 'created', 'asc');
$repos = $client->api('search')->code('...........', 'indexed', 'desc');
$repos = $client->api('search')->issues('.........', 'comments', 'asc');
$repos = $client->api('search')->users('..........', 'followers', 'asc');