Thursday, October 04, 2001

Just seeing if it still works today.

Thursday, August 16, 2001

Just seeing if it still works today.
Just seeing if it still works today.

Tuesday, August 14, 2001

Just seeing if it still works today.

Monday, August 13, 2001

I'm showing someone how this work.
property AppKey : "712AFF3F313101XXX8C7C27BCF9AF1B5BB49885E"

property userName : "zellers"
property password : "******"
property oldPosts : {}
property lastEntry : "Blog Me"

-- All blogger methods take the AppKey as the first
-- parameter. We then append the parameters for a particular message

on tellBlogger(mname, params)
tell application "http://plant.blogger.com/api/RPC2"
return call xmlrpc {method name:mname, parameters:{AppKey} & params}
end tell
end tellBlogger

-- Return a list of blogs owned by this user.

on getUsersBlogs()
return tellBlogger("blogger.getUsersBlogs", {userName, password})
end getUsersBlogs

-- Make a new post, and possibly publish
on newPost(blogid, content, publish)
set params to {blogid, userName, password, content, publish}
return tellBlogger("blogger.newPost", params)
end newPost

-- Edit an old post

-- Visit your blog in your favorite browser
on visitBlog()
set uu to "http://" & userName & ".blogspot.com"
open location uu
end visitBlog

set blogList to getUsersBlogs()

set blogid to ""

if (count of blogList) is 1 then
set blogid to blogid of first item of blogList
else
set namelist to {}
repeat with c in blogList
set namelist to namelist & {blogname of c}
end repeat
set chosen to choose from list namelist with prompt "Which Blog do you wish to edit?" without multiple selections allowed and empty selection allowed
repeat with c in blogList
log blogname of c
if blogname of c is equal to first item of chosen then
set blogid to blogid of c
exit repeat
end if
end repeat
end if

if blogid is "" then
display dialog "You must have a valid blog id before we can post." buttons {"Sorry"}
exit repeat
end if

set toBlog to display dialog "Enter blog text" default answer lastEntry buttons {"Cancel", "Post", "Post & Publish"} default button "Post & Publish"

--visitBlog(blogid)

if button returned of toBlog is not "Cancel" then
set publish to (button returned of toBlog is not "Post")
log publish
set lastEntry to text returned of toBlog
set postNumber to newPost(blogid, lastEntry, publish)
set oldPosts to oldPosts & postNumber
visitBlog()
end if
I'm demoing blogger right now!
Now, I'm calling it from a different context!
No really, this one will be.
This will be the last test for a while...
This will be the last test for a while...
My life has taken on useless undertones.
Who would you talk to, if you could talk to wood?
Blog Me
yes, I'm playing with xmlrpc too
Blog Me
Why is a mouse when it spins?