Skip to content

Instantly share code, notes, and snippets.

@AmirHooshangi
Created December 1, 2014 17:22
Show Gist options
  • Save AmirHooshangi/496fc9aa782db700b652 to your computer and use it in GitHub Desktop.
Save AmirHooshangi/496fc9aa782db700b652 to your computer and use it in GitHub Desktop.
(defun search-github(repository_name)
(request
"https://api.github.com/search/repositories"
:params '(("q" . "test" ) ("sort" . "stars") ("order" . "desc"))
:parser 'json-read
:success (function*
(lambda (&key data &allow-other-keys)
(let* ((items (assoc-default 'items data))
(names (mapcar (lambda (item) (assoc-default 'name item)) items))
(launches (mapcar (lambda (item) (assoc-default 'launch_date item)) items)))
(mapcar* (lambda (name launch)
(message "name:`%s` launch:`%s`" name launch))
names
launches)))))))
;;;;;;;;;;;;;
when i replace "test" on line 5 with (concat "te" "st") i get =>
Wrong type argument: integerp, concat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment