This example uses the Tortuga .NET component located at http://www.worldwideweb-x.com/TortugaDnBeta.zip. Information about other free components (Blogger 2.0, RSS, Atom) is located at http://www.worldwideweb-x.com/openData.html. Don't forget to add a reference to "TortugaDN.dll" to your C# or VB.NET project.
// C# code to edit a blog post:
Tortuga.Blogger1 blogger1 = new Tortuga.Blogger1();
blogger1.Login = "myLogin";
blogger1.Password = "myPassword";
blogger1.ServiceUrl = "http://www.livejournal.com/interface/blogger";
bool success = blogger1.GetUsersBlogs();
if (success && (blogger1.NumBlogs > 0))
{
// Get the ID of the 1st blog.
string blogId = blogger1.GetBlogId(0);
// Get the 10 most recent posts.
int numPosts = blogger1.GetRecentPosts(blogId,10);
if (numPosts > 0)
{
// Get the most recent post (at index 0)
Tortuga.BlogPost1 post = blogger1.GetPost(0);
bool publish = true;
// Edit the post by changing the title:
bool ok = blogger1.EditPostWithTitle(post.PostId,
post.Title + " -- edited!",
post.Description,
publish);
MessageBox.Show( ok ? "Edited!" : "Failed!" );
}
}