@@ -131,8 +131,12 @@ def setCredentials(self, email, password):
131
131
self .email = email
132
132
self .password = password
133
133
134
- def rawGet (self , path ):
134
+ def rawGet (self , path , ** kwargs ):
135
135
url = '%s%s' % (self ._url , path )
136
+ if kwargs :
137
+ url += "?%s" % ("&" .join (
138
+ ["%s=%s" % (k , v ) for k , v in kwargs .items ()]))
139
+
136
140
try :
137
141
return requests .get (url ,
138
142
headers = self .headers ,
@@ -355,8 +359,8 @@ def UserProject(self, id=None, **kwargs):
355
359
"""
356
360
return self ._getListOrObject (UserProject , id , ** kwargs )
357
361
358
- def _list_projects (self , url ):
359
- r = self .rawGet (url )
362
+ def _list_projects (self , url , ** kwargs ):
363
+ r = self .rawGet (url , ** kwargs )
360
364
if r .status_code != 200 :
361
365
raise GitlabListError
362
366
@@ -373,13 +377,13 @@ def search_projects(self, query):
373
377
"""
374
378
return self ._list_projects ("/projects/search/" + query )
375
379
376
- def all_projects (self ):
380
+ def all_projects (self , ** kwargs ):
377
381
"""Lists all the projects (need admin rights)."""
378
- return self ._list_projects ("/projects/all" )
382
+ return self ._list_projects ("/projects/all" , ** kwargs )
379
383
380
- def owned_projects (self ):
384
+ def owned_projects (self , ** kwargs ):
381
385
"""Lists owned projects."""
382
- return self ._list_projects ("/projects/owned" )
386
+ return self ._list_projects ("/projects/owned" , ** kwargs )
383
387
384
388
def Group (self , id = None , ** kwargs ):
385
389
"""Creates/gets/lists group(s) known by the GitLab server.
0 commit comments