File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 849
849
},
850
850
{
851
851
"type" : " integer" ,
852
- "description" : " if provided, will return only repos owned by the user with the given id" ,
852
+ "description" : " search only for repos that the user with the given id owns or contributes to " ,
853
853
"name" : " uid" ,
854
854
"in" : " query"
855
855
},
856
856
{
857
857
"type" : " integer" ,
858
- "description" : " maximum number of repos to return" ,
858
+ "description" : " page number of results to return (1-based)" ,
859
+ "name" : " page" ,
860
+ "in" : " query"
861
+ },
862
+ {
863
+ "type" : " integer" ,
864
+ "description" : " page size of results, maximum page size is 50" ,
859
865
"name" : " limit" ,
860
866
"in" : " query"
861
867
},
867
873
},
868
874
{
869
875
"type" : " boolean" ,
870
- "description" : " only search for repositories owned by the authenticated user" ,
876
+ "description" : " if `uid` is given, search only for repos that the user owns " ,
871
877
"name" : " exclusive" ,
872
878
"in" : " query"
873
879
}
Original file line number Diff line number Diff line change @@ -34,11 +34,15 @@ func Search(ctx *context.APIContext) {
34
34
// type: string
35
35
// - name: uid
36
36
// in: query
37
- // description: if provided, will return only repos owned by the user with the given id
37
+ // description: search only for repos that the user with the given id owns or contributes to
38
+ // type: integer
39
+ // - name: page
40
+ // in: query
41
+ // description: page number of results to return (1-based)
38
42
// type: integer
39
43
// - name: limit
40
44
// in: query
41
- // description: maximum number of repos to return
45
+ // description: page size of results, maximum page size is 50
42
46
// type: integer
43
47
// - name: mode
44
48
// in: query
@@ -47,7 +51,7 @@ func Search(ctx *context.APIContext) {
47
51
// type: string
48
52
// - name: exclusive
49
53
// in: query
50
- // description: only search for repositories owned by the authenticated user
54
+ // description: if `uid` is given, search only for repos that the user owns
51
55
// type: boolean
52
56
// responses:
53
57
// "200":
@@ -57,6 +61,7 @@ func Search(ctx *context.APIContext) {
57
61
opts := & models.SearchRepoOptions {
58
62
Keyword : strings .Trim (ctx .Query ("q" ), " " ),
59
63
OwnerID : ctx .QueryInt64 ("uid" ),
64
+ Page : ctx .QueryInt ("page" ),
60
65
PageSize : convert .ToCorrectPageSize (ctx .QueryInt ("limit" )),
61
66
Collaborate : util .OptionalBoolNone ,
62
67
}
You can’t perform that action at this time.
0 commit comments