File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Search API
2
+ [ Back to the navigation] ( index.md )
3
+
4
+ Searching repositories, code, issues and users.
5
+ Wrap [ GitHub Search API] ( http://developer.github.com/v3/search/ ) . All methods are described on that page.
6
+
7
+ ### Search repositories
8
+
9
+ ``` php
10
+ $repos = $client->api('search')->repositories('github language:php');
11
+ ```
12
+
13
+ Returns a list of repositories found by such criteria.
14
+
15
+ ### Search code
16
+
17
+ ``` php
18
+ $repos = $client->api('search')->code('@todo language:php');
19
+ ```
20
+
21
+ Returns a list of files found by such criteria (containing "@todo " and language==php).
22
+
23
+ ### Search issues
24
+
25
+ ``` php
26
+ $repos = $client->api('search')->issues('bug language:php');
27
+ ```
28
+
29
+ Returns a list of issues found by such criteria.
30
+
31
+ ### Search users
32
+
33
+ ``` php
34
+ $repos = $client->api('search')->users('location:Amsterdam language:php');
35
+ ```
36
+
37
+ Returns a list of users found by such criteria.
38
+
39
+ ### Sorting results
40
+
41
+ You can sort results using 2-3 arguments.
42
+
43
+ ``` php
44
+ $repos = $client->api('repo')->repositories('...', 'created', 'asc');
45
+ $repos = $client->api('repo')->code('...........', 'indexed', 'desc');
46
+ $repos = $client->api('repo')->issues('.........', 'comments', 'asc');
47
+ $repos = $client->api('repo')->users('..........', 'followers', 'asc');
48
+ ```
You can’t perform that action at this time.
0 commit comments