XML-RPC And The Famous Blogger API 1.0 (Re: XML-RPC How To Use?)

Andre Garzia soapdog at mac.com
Fri May 20 09:37:21 EDT 2005


On May 19, 2005, at 2:38 PM, MisterX wrote:

> http://www.google.com/search?q=xml+rpc+runrev&sourceid=mozilla- 
> search&start=
> 0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US: 
> official
>
> no, but quite interesting
>
> Andre is the man!
>
> http://homepage.mac.com/soapdog/studio/projects.html


Xavier and Varen,

Thanks man! :D Those links are outdated, I am in the process of  
rebuilding my website. I'll talk a little about XML-RPC and about  
Blogger API (and blogging in general), last I'll present some  
interesting links, so this will be a little big email.


..-=-=-=-  On XML RPC -=-=-=-..
	XML-RPC Stands for eXtensible Markup Language, Remote Procedure Call,  
which in plain english means a way for a program to call another  
program procedure using the XML standard as the format for the call.  
The best resource for learning about XML-RPC is http://www.xmlrpc.com  
Since Rev 2.5 we've got our hands on a very nice XML-RPC library which  
you can use pretty easily. If you want you can also code your own  
requests by hand and use RevXML (or plain string routines) to parse  
them. Each XML-RPC call is composed by two things, a request and a  
response.

	(a) The XML-RPC Request is a XML Document that tags what procedure you  
want to call and what are the parameters given to this procedure. If  
your server features XML-RPC Introspection Methods, you can call  
'system.listMethods' with no parameters and receive back a response  
detailing the exported functions of that server (this is pretty  
usefull).
	(b) The XML-RPC Response, each call receives one response, this is the  
result of the call, it can be a number, a string, an array, pretty much  
any value. It can even be a keyed array. In the case that the call was  
wrong or something evil happened, the response will contain an error.

	The URL quoted above will detail in a little document called 'XML-RPC  
for newbies' all about XML-RPC in a much clearer way. The point is,  
XML-RPC is straight forward and easy. That's also it's weakness, you  
can make only one procedure call per request, and stuff like that. Now,  
onto little about blogging.



..-=-=-=- On Blogging -=-=-=-..
'	Weblogs were a revolution. The company behind the popularization of  
blogs was Pyra Inc. Pyra created the webservice called Blogger.com, for  
those that are not familiar with standard blogs, a weblog is a journal  
where it's users can post entries and the site generate the HTML like a  
newspage. Blogs are not usefull for personal journals only, many  
technology related pages are running on a blog back end this day. When  
Pyra implemented it's blogger.com service they opted to make a XML-RPC  
based infrastructure, users would log into a HTML interface and post  
data to their blogs, this HTML interface would use XML-RPC calls to  
comunicate with blogger service to post the data. The HTML interface,  
like all HTML interface, was a frustrating experience for power users.  
Formating posts was weird, stability was a serious issue in some  
browsers. The power users wanted a custom client and in one blessed  
day, instead of creating custom clients, Pyra exposed some of it's  
XML-RPC services known as Blogger API 1.0. From this day on, coders  
could look into this spec and create apps that talked directly to  
Pyra's blogger server. I was using MacOS 9 and REALBasic on that time,  
and I created iBlog the first Blogger API enabled blog client in some  
weeks. It was fun. Things now are different. (for example, I  
reimplemented the old iBlog in HOURS using Rev....). Let's talk a  
little about Blogger API 1.0



..-=-=-=- On Blogger API 1.0 -=-=-=-..
	The Blogger API 1.0 spec has it's home at http://developer.blogger.com  
(If I Remember Correctly). When Blogger became famous and lot's of  
coders decided to implement servers, some people started looking into a  
XML-RPC Api for their servers, Blogger API was the most famous at that  
time, so almost all of those servers started implementing it as well.  
Server like Movable Type, B2, Nucleus, BlogWorks ASP and others support  
this standard. But one need remember that Blogger API is not the only  
API out there. I'll talk a little about the others later.

	In it's first incarnation, Blogger API allowed you to:
	(a) Post new entries to your blog. (by calling 'blogger.newPost')
	(b) Editing an entry. (by calling 'blogger.editPost')
	(c) Site template management (with 'blogger.getTemplate' and  
'blogger.setTemplate')
	(d) Some user info management.
	(e) Acquiring a list of blogs owned by a user (with  
'blogger.getUsersBlogs')

	So the tipical life cycle of a blog client was, to call  
'blogger.getUsersBlogs' upon launch so that it could populate a  
selection field with the blogs owned by the user (quick post to any  
blog you own) then wait for text input. Direct new posts to  
'blogger.newPost' and editing to 'blogger.editPost'. Template  
management usually is optional but easy to implement. I make some blog  
clients you can check http://www.soapdog.org to see info on them (and  
download a trial). See the trick is, with the aid of Blogger API 1.0 a  
user can post data to a blog without the need for complex login  
procedures and tedious unstable HTML interfaces. One should read  
'Beyond the Browser' article by Richard Gaskin  
(http://www.fourthworld.com) to see why net apps are better then custom  
HTML interfaces.



..-=-=-=- email.endConclusions -=-=-=-..
	Today there are lot's of Bloging APIs out there. The famous ones are:

	(a) Blogger API 1.0 which is wide supported.
	(b) Blogger API 2.0 the big difference is that this one implement  
title text fields!!! aka. headlines. In the case you're talking with  
blogger.com server, you can mix 1.0 calls with 2.0 calls, in my own  
custom client I use blogger API 1.0 for everything but new posts and  
editing, for those two calls I use Blogger2.newPost and  
Blogger2.editPost for those allow me to put title fields in my entries  
(blogger 1.0 has no support for title fields)
	(c) MetaBlog API this one was created by the fine folks at Userland  
Inc, they invented bloging and the XML-RPC spec, It's sad that this has  
not wider support. Their blog software known as Radio Userland is the  
Killer App! (http://radio.userland.com)
	(d) ATOM API, atom moves away from XML-RPC, it uses a concept based on  
the REST ideas and is pretty strange for me, I don't like it and I  
won't support it. But that's because I am stubborn, you should look  
into it if you're thinking about blogs. ATOM support is rising and  
Google is pushing it. Google owns Pyra now.

	Since you wanted to see how this whole thing works, please check my  
user on RevOnline (under soapdog), you'll see a stack called BRP (blog  
research project), it's a blogger api 1.0 compliant stack, it allows  
you to post to a blog and do stuff, code is free, study it and make  
your own!!!!

PS: is this email too big?

Cheers and happy coding.
Andre
	


-- 
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list