From 0423744021fe099ce4f29d98de5f4f119df34cfa Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sat, 31 Oct 2009 11:06:05 +0100 Subject: MetaWeblog: Create and support ID parameters of type string rather than of type integer. Ignore-this: 5a5baf2db069518cf15414ec2668e043 darcs-hash:30d4db7f91003b399918eb013c3cfb36e14d7ef8 --- xml-rpc-functions.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xml-rpc-functions.lisp') 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 -- cgit v1.2.3