diff options
author | Teddy Wing | 2022-05-07 17:06:25 +0200 |
---|---|---|
committer | Teddy Wing | 2022-05-07 17:46:46 +0200 |
commit | a7dfdc052a931cc0cabfeb85151bcdad782f08c8 (patch) | |
tree | d6a7fad2ce4083d1a54fb69b14db25d7cb1cb90b | |
parent | 2087b8e3072041918c812ecad89cdbf81b025afe (diff) | |
download | wajir-a7dfdc052a931cc0cabfeb85151bcdad782f08c8.tar.bz2 |
Parse JSON from Jira response
Parse the Jira response into a hash that we can interact with.
Needed to do some finagling to get my "lib" submodule directory to be
searched for systems.
-rw-r--r-- | src/main.lisp | 6 | ||||
-rw-r--r-- | src/package.lisp | 2 | ||||
-rw-r--r-- | wajir.asd | 27 |
3 files changed, 27 insertions, 8 deletions
diff --git a/src/main.lisp b/src/main.lisp index 7f6973f..31814bb 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -12,7 +12,7 @@ :basic-auth-token "TOKEN")) (defun fetch-issues (jql &key basic-auth-token) - (multiple-value-bind (body code) + (jzon:parse (dex:post "https://example.atlassian.net/rest/api/3/search" :content (format nil "{ @@ -22,6 +22,4 @@ jql) :headers `((:content-type . "application/json") (:authorization - . ,(format nil "Basic ~A" basic-auth-token)))) - - body)) + . ,(format nil "Basic ~A" basic-auth-token)))))) diff --git a/src/package.lisp b/src/package.lisp index a340f86..c48ccba 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -1,4 +1,6 @@ (defpackage :wajir (:use :cl) + (:local-nicknames (:jzon :com.inuoe.jzon)) + (:export :main)) @@ -1,6 +1,25 @@ -(asdf:defsystem wajir +; (push +; (merge-pathnames "lib/" (asdf:system-source-directory :wajir)) +; asdf:*central-registry*) + +(in-package :asdf-user) + +; (initialize-source-registry +; '(:source-registry +; (:tree (merge-pathnames "lib/" (system-source-directory :wajir))) +; :inherit-configuration)) + +(initialize-source-registry + `(:source-registry + (:tree ,(make-pathname :directory + (append + (pathname-directory *load-pathname*) + '("lib")))) + :inherit-configuration)) + +(defsystem wajir :version "0.0.1" - :depends-on (:cl-smtp + :depends-on (:com.inuoe.jzon :dexador) :components ((:module "src" :serial t @@ -12,5 +31,5 @@ :entry-point "wajir") #+sb-core-compression -(defmethod asdf:perform ((o asdf:image-op) (c asdf:system)) - (uiop:dump-image (asdf:output-file o c) :executable t :compression t)) +(defmethod perform ((o image-op) (c system)) + (uiop:dump-image (output-file o c) :executable t :compression t)) |