summaryrefslogtreecommitdiff
path: root/xml-rpc-functions.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-31 11:06:05 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-31 11:06:05 +0100
commit0423744021fe099ce4f29d98de5f4f119df34cfa (patch)
treec32a4b20367b3381ea8ba4334ee2614b6e4c51e5 /xml-rpc-functions.lisp
parent22cf077d3c709ec2a6901a303e72b1ff28058c35 (diff)
MetaWeblog: Create and support ID parameters of type string rather than of type integer.
Ignore-this: 5a5baf2db069518cf15414ec2668e043 darcs-hash:30d4db7f91003b399918eb013c3cfb36e14d7ef8
Diffstat (limited to 'xml-rpc-functions.lisp')
-rw-r--r--xml-rpc-functions.lisp10
1 files changed, 8 insertions, 2 deletions
diff --git a/xml-rpc-functions.lisp b/xml-rpc-functions.lisp
index 9f77b33..2fa729f 100644
--- a/xml-rpc-functions.lisp
+++ b/xml-rpc-functions.lisp
@@ -37,6 +37,9 @@
(defun mulk.journal.xml-rpc::metaWeblog.editPost (postid username password struct publish)
(declare (ignore username publish))
+ (setq postid (etypecase postid
+ (string (parse-integer postid))
+ (number postid)))
(flet ((do-stuff ()
(with-slots (categories pub-date guid description link comments title)
struct
@@ -47,12 +50,15 @@
(defun mulk.journal.xml-rpc::metaWeblog.getPost (postid username password)
(declare (ignore username password))
+ (setq postid (etypecase postid
+ (string (parse-integer postid))
+ (number postid)))
(with-slots (title date body categories last-modification id uuid)
(find-entry postid)
(xml-rpc-struct :CATEGORIES (map 'vector #'uuid-of categories)
:pubDate (xml-rpc-time date)
:GUID uuid
- :POSTID id
+ :POSTID (format nil "~D" id)
:DESCRIPTION (htmlise-entry (find-entry postid))
:LINK (link-to :view :post-id postid :absolute t)
:permaLink (link-to :view :post-id postid :absolute t)
@@ -72,7 +78,7 @@
(defun mulk.journal.xml-rpc::blogger.getUsersBlogs (appkey username password)
(declare (ignore appkey username password))
- (list (xml-rpc-struct :BLOGID 0 :blogName "Kompottkins Weisheiten" :URL (link-to :view :absolute t))))
+ (list (xml-rpc-struct :BLOGID "0" :blogName "Kompottkins Weisheiten" :URL (link-to :view :absolute t))))
;; Not implemented: blogger.getUserInfo blogger.setTemplate blogger.getTemplate blogger.newPost blogger.editPost