When Kjartan started working on new node API, he included bloggerAPI client to his patch.

The half-completed work is still present on Marco's sandbox:

http://cvs.drupal.org/viewcvs/contributions/sandbox/marco/kjartan/drupal...

search for: "bloggerapi"

Comments

moshe weitzman’s picture

Assigned: Unassigned » Kjartan

SinceNatrak recently posted a patch to the devel list for this feature, I am ssigning to him. Hopefully this will be committed soon.

jonbob’s picture

Component: Node system » blogapi.module

Done and done.

moshe weitzman’s picture

drupal currently has a blogapi server, but not a blogapi client. this request is about adding a blogapi client to drupal. the theory is that drupal server can echo the post to your various external blogs ... perhaps this isn't really needed, but i thought i should correct the 'fixed' status.

chx’s picture

This is the main part of the client:

function blogclient_post_node($nid, $blogid) {
  $node = node_load(array('nid' => $nid));
  $blog = db_fetch_object(db_query('SELECT * FROM {blogs} WHERE blogid = %d', $blogid));
  switch ($blog->type) {
    case 'blogger':
      $result = xmlrpc($blog->url, 'blogger.newPost', '0123456789ABCDEF', $blog->remote_id, $blog->name, $blog->pass, "<title>$node->title</title>$node->body", TRUE);
      break;
    case 'metaWeblog':
      $result = xmlrpc($blog->url, 'metaWeblog.newPost',  $blog->remote_id, $blog->name, $blog->pass, array('title' => $node->title, 'description' => $node->body), TRUE);
  }
}

with

CREATE TABLE blogs (
  blogid int(10) unsigned NOT NULL,
  url varchar(255) NOT NULL,
  name varchar(255) NOT NULL,
  pass varchar(255) NOT NULL,
  remote_id int(10) unsigned NOT NULL,
  type varchar(255) NOT NULL,
  PRIMARY KEY  (blogid)
)

being the table. Stay tuned for more.

Kjartan’s picture

Assigned: Kjartan » Unassigned
chx’s picture

Status: Active » Closed (won't fix)

this is contrib. I now love standards. And their implementations.