Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #112 from nickw444/develop
Browse files Browse the repository at this point in the history
Allow Project Issues to be filtered by passing kwargs
  • Loading branch information
Itxaka committed Mar 13, 2015
2 parents 5bfa788 + a2e8cf9 commit dfdb8e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gitlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,20 +768,21 @@ def getissues(self, page=1, per_page=20):

return False

def getprojectissues(self, project_id, page=1, per_page=20):
def getprojectissues(self, project_id, page=1, per_page=20, **kwargs):
"""Return a list of issues for project id.
:param: project_id: The id for the project.
:return: list of issues
"""
data = {'page': page, 'per_page': per_page}

kwargs['page'] = page
kwargs['per_page'] = per_page
data = kwargs

request = requests.get("{0}/{1}/issues".format(self.projects_url, project_id),
params=data, headers=self.headers, verify=self.verify_ssl)
if request.status_code == 200:
return json.loads(request.content.decode("utf-8"))
else:

return False

def getprojectissue(self, project_id, issue_id):
Expand Down

0 comments on commit dfdb8e5

Please sign in to comment.