Skip to content

Commit

Permalink
Give query paramaters as params to list-project-issues function
Browse files Browse the repository at this point in the history
so than we can add ?state=opened to the api endpoint, and get the list
of opened issues in a project.

I'd prefer to have "params" befor "page" and "per-page", but other
functions don't have that (yet?).
  • Loading branch information
vindarel committed Sep 8, 2016
1 parent a1c1441 commit 1a49f15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gitlab-issues.el
Expand Up @@ -67,12 +67,13 @@ ISSUE-ID : The ID of a project issue"
"/issues/"
issue-id))

(defun gitlab-list-project-issues (project-id &optional page per-page)
(defun gitlab-list-project-issues (project-id &optional page per-page params)
"Get a list of project issues.
PROJECT-ID : The ID of a project
PAGE: current page number
PER-PAGE: number of items on page max 100"
(let ((params '()))
PER-PAGE: number of items on page max 100
PARAMS: an alist for query parameters. Exple: '((state . \"opened\"))"
(let ((params params))
(when page
(add-to-list 'params (cons 'per_page (number-to-string per-page))))
(when per-page
Expand Down

0 comments on commit 1a49f15

Please sign in to comment.