« My Audiobook Recommendations for 2013 | Main | Test Post [IGNORE] »
Sunday
Jan202013

Announcing MetaWeblogSharp - a Simple .NET MetaWeblog Client Library  

While trying to track down an issue with Squarespace 5's implementation of the MetaWeblog API I needed to create an MetaWeblog client to help track down the issue. I couldn't find a simple one with no dependencies so I created one: MetaWeblogSharp

This is a very simple library! It is lightweight and has no dependencies on any other library. It even implements its own XMLRPC stack.

You can get the source from the CodePlex project: http://metaweblogsharp.codeplex.com/

Or you can download the binary via NuGet: https://nuget.org/packages/MetaWeblogSharp

Here's a simple example of the API in action:

 

// Create a client

var client = new MetaWeblogSharp.Client(blog_metweblog_url, blogid, username, password);

 

// Get a list of posts

var posts = client.GetRecentPosts(10);

 

// get a specific post

var post_1 = client.GetPost(postid);

 

// upload a media object

var bytes = System.IO.File.ReadAllBytes("test1.png");

var mo = client.NewMediaObject("foo.png", "image/png", bytes);

 

// create a new post

var categories1 = new List<string> { "A", "B", "C" };

var new_post_id = client.NewPost(title, body, categories1, true);

 

 

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>