Handbook

Drupal Hacks and Add-ons

XML-RPC Interface
Last updated by Anon on Tuesday, 08/21/2001 - 22:18

Readme
Implements the entire Blogger.com xmlrpc API.
A start on a pure Drupal equivalent.

Send comments to julian_bond@voidstar.com.

Download
http://www.voidstar.com/downloads/xmlrpc.zip

Requirements
This requires V3 of Drupal. I suggest you get the lastest version of Drupal from CVS.

Installation
  • copy these into the directories
    /modules/xmlrpcblog.module Harness to drive the system for testing. Can also be used against other blogger.com API implementations.
    /modules/blog_xmlrpc.inc

    Add this line to the end of blog.module
    include_once "modules/blog_xmlrpc.inc";

    Requires blog_save() in blog.module to return the new nid after an insert.
    eg
    $nid = node_save(etc...
    }
    }
    return $nid;

    Author
    Julian Bond julian_bond@voidstar.com>

    Blogger Documentation
    http://plant.blogger.com/api/
    http://groups.yahoo.com/group/bloggerDev/message/315
    http://groups.yahoo.com/group/bloggerDev/message/296
    http://groups.yahoo.com/group/bloggerDev/message/225
    http://groups.yahoo.com/group/bloggerDev/message/147

    Wish list
    Further development of the .drupal methods and xmlrpc methods for other node types.

    Documentation
    Here at http://www.voidstar.com/node.php?id=241

    Methods

    blogger.newPost($appkey : string,
    $blogid : string,
    $userid : string,
    $password : string,
    $body : string,
    $publish : boolean) = $nid : string

    blogger.editPost($appkey : string,
    $nid : string,
    $userid : string,
    $password : string,
    $body : string,
    $publish : boolean) = true : boolean

    blogger.deletePost($appkey : string,
    $nid : string,
    $userid : string,
    $password : string,
    $publish : boolean) = true : boolean

    blogger.getTemplate($appkey : string,
    $nid : string,
    $userid : string,
    $password : string,
    $templatetype : string) = error

    blogger.setTemplate($appkey : string,
    $nid : string,
    $userid : string,
    $password : string,
    $templatename : string,
    $templatetype : string) = error

    blogger.getUsersBlogs($appkey : string,
    $userid : string,
    $password : string) = array of BlogStruct

    blogger.getPost($appkey : string,
    $nid : string,
    $userid : string,
    $password : string) = $thepost : PostStruct

    blogger.getRecentPosts($appkey : string,
    $blogid : string,
    $userid : string,
    $password : string,
    $numberofposts : int) = array of PostStruct

    blogger.getUserInfo($appkey : string,
    $userid : string,
    $password : string) = UserStruct

    drupal.newBlog($userid : string,
    $password : string,
    $title : string,
    $body : string) = $nid : string

    drupal.editBlog($userid : string,
    $password : string,
    $nid : string,
    $title : string,
    $body : string) = true : boolean

    drupal.deleteBlog($userid : string,
    $password : string,
    $nid : string) = true : boolean


    Parameters & Results

    $appkey : The Blogger AppKey. Always discarded.

    $blogid : The Blogger blog id. Always discarded as single blogs are owned by the user in Drupal

    $userid : The Drupal login ID

    $password : The Drupal login password

    $body : The text content of the main body of the blog item. May contain html but the tags actually saved will be restricted as if the userr had entered them manually.

    $publish : Always discarded as Drupal always publishes Blog entries immediately.

    $nid : The Node Id of the Blog item

    $templatetype, $templatename : Ignored as Drupal doesn't use templates.

    BlogStruct Record
    url : string = The URL of the page containing this user's blog
    blogid : string = $user->id for this user
    blogname : string = The name of the blog

    PostStruct Record
    userid : string = $user->id
    dateCreated : dateTime.iso8601 = $timestamp
    content : string = $body
    postid : string = $nid

    UserStruct Record
    nickname : string = $user->userid
    userid : string = $user->id
    url : string = The URL of the page containing this user's blog
    email : string = real_email address for this user
    lastname : string = Name for this user from the last " " to the end.
    firstname : string = Name for this user from the beginning to the last " ".


    • previousindexnext
      BlogMail - A V3 moduleupRefer Module