Skip to content

Commit 7cd1f3e

Browse files
committed
Add customizable variable helm-qiita-api-per-page
1 parent eed1630 commit 7cd1f3e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

helm-qiita.el

+7-2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ You can create in https://qiita.com/settings/applications"
7676
"Cache a result of `helm-qiita-get-url'.
7777
DO NOT SET VALUE MANUALLY.")
7878

79+
(defvar helm-qiita-api-per-page 20
80+
"Page size of Qiita API.
81+
See https://qiita.com/api/v2/docs")
82+
7983
(defvar helm-qiita-curl-program nil
8084
"Cache a result of `helm-qiita-find-curl-program'.
8185
DO NOT SET VALUE MANUALLY.")
@@ -298,11 +302,12 @@ PROCESS is a http-request process."
298302
"Return Qiita URL or error if `helm-qiita-username' is nil."
299303
(unless helm-qiita-username
300304
(error "Variable `helm-qiita-username' is nil"))
301-
(format "https://%s/api/v2/users/%s/stocks?page=1&per_page=20"
305+
(format "https://%s/api/v2/users/%s/stocks?page=1&per_page=%d"
302306
(if (stringp helm-qiita-organization)
303307
(concat helm-qiita-organization ".qiita.com")
304308
"qiita.com")
305-
helm-qiita-username))
309+
helm-qiita-username
310+
helm-qiita-api-per-page))
306311

307312
(defun helm-qiita-find-curl-program ()
308313
"Return an appropriate `curl' program pathname or error if not found."

0 commit comments

Comments
 (0)