WP.Net

Access WordPress though .Net

This is a .Net wrapper to access your WordPress blog via XML-RPC. You can use it to create custom .Net clients to edit or create new content of your blog.

Most methods have been implemented like

  • GetTags
  • GetComments
  • GetPages
  • GetPage

All this allows you now to consult and manage your WP blog through calls like:

WP wp=new WP();
Page[] ps = wp.GetPages(3);
Page page= wp.GetPage("655");
Post post = wp.GetPost("1068");
UserInfo info= wp.GetUserInfo();
CommentFilter f = new CommentFilter() { number = 12,offset = 0,post_id = 1068,status = "approve"};
Comment[] c = wp.GetComments(f);
Post[] p = wp.GetRecentPosts(3);
Category[] cats= wp.GetCategories();
TagInfo[] t = wp.GetTags();
 
Image im= Bitmap.FromFile(@"C:\temp\thumbup.jpg");
byte[] barray = WP.ConvertImageToByteArray(im, ImageFormat.Jpeg);
MediaObject media = new MediaObject() { name = "wpapi.jpg", type ="jpg", bits = barray};
MediaObjectInfo minfo = wp.NewMediaObject(media);

Note that you cannot access this library with Silverlight on the client due to the asynchronous nature of Silverlight. Using this library on the server side does work however. Some people are currently working on a Silverlight wrapper for XML-RPC but nothing workable is out yet, see however this Google hosted project and keep an eye on the Cook Computing pages.

Version 2.9.2

  • Support for tags
  • Upgraded to .Net 4 and VS2010
  • Updated for WordPress 2.9+

Download

GPL License

You can download the library with full source code below and don’t forget to fetch a copy of the XML-RPC.Net library from Cook computing (there is a version in the VS solution though).
This library resides under the GPL License, please donnot include this into commercial applications.

Download WordPress.Net 2.9.2 (Mon 19 Apr 2010)