Use jzon instead of jonathan
This commit is contained in:
parent
5448d575ad
commit
9a03693807
3 changed files with 11 additions and 7 deletions
2
qlfile
2
qlfile
|
@ -1,5 +1,5 @@
|
|||
ql alexandria
|
||||
ql dexador
|
||||
ql jonathan
|
||||
ql jzon
|
||||
ql quri
|
||||
ql kebab
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
(:class qlot/source/ql:source-ql
|
||||
:initargs (:%version :latest)
|
||||
:version "ql-2024-10-12"))
|
||||
("jonathan" .
|
||||
("jzon" .
|
||||
(:class qlot/source/ql:source-ql
|
||||
:initargs (:%version :latest)
|
||||
:version "ql-2020-09-25"))
|
||||
:version "ql-2024-10-12"))
|
||||
("quri" .
|
||||
(:class qlot/source/ql:source-ql
|
||||
:initargs (:%version :latest)
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
(:use #:cl)
|
||||
(:import-from #:alexandria
|
||||
#:remove-from-plist
|
||||
#:symbolicate)
|
||||
(:import-from #:jonathan
|
||||
#:to-json
|
||||
#:symbolicate
|
||||
#:plist-hash-table)
|
||||
(:import-from #:com.inuoe.jzon
|
||||
#:stringify
|
||||
#:parse)
|
||||
(:import-from #:dexador
|
||||
#:request
|
||||
|
@ -34,7 +35,7 @@
|
|||
:method method
|
||||
:headers `(("X-MICROCMS-API-KEY" . ,*api-key*)
|
||||
("Content-Type" . "application/json"))
|
||||
:content (and content (to-json content))
|
||||
:content (%build-content content)
|
||||
:force-binary nil)
|
||||
(format t "microCMS status: ~D~%" status)
|
||||
(when (and (stringp res-body)
|
||||
|
@ -53,6 +54,9 @@
|
|||
(loop :for (key val) :on query :by #'cddr
|
||||
:collect (cons (to-camel-case (symbol-name key)) val)))
|
||||
|
||||
(defun %build-content (content)
|
||||
(and content (stringify (plist-hash-table content))))
|
||||
|
||||
(defmacro define-list-client (endpoint)
|
||||
(let ((str-endpoint (string-downcase (string endpoint))))
|
||||
`(progn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue