PROJECT DESCRIPTION

MetaWeblogSharp is a simple .NET MetaWeblog client.

CURRENT STATUS

This is the initial beta-quality code

KEY ATTRIBUTES

  • self-contained - having no dependencies on other libraries. For example it contains it's own XMLRPC handling.
  • a simple code base, easy to understand and easy to alter.

GET THE BINARY PACKAGE

Use NuGet to get the binaries: https://nuget.org/packages/MetaWeblogSharp

API SUPPORT

  • GetPost
  • GetUsersBlogs
  • NewMediaObject
  • EditPost
  • DeletePost
  • GetCategories

USAGE

Create a client

var blogcon = new MetaWeblogSharp.BlogConnectionInfo(
    blog_metweblog_url, 
    blogid, 
    username, 
    password);

var client = new MetaWeblogSharp.Client(blogcon);

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);

LINKS

Last edited Jan 24, 2013 at 9:31 AM by saveenr, version 14