C# example program using the
MetaWeblog .NET Class that creates a new blog post
via an HTTP proxy.
// Use the Blogger 1.0 API to get the Blog ID
Tortuga.Blogger1 blogger1 = new Tortuga.Blogger1();
blogger1.Login = "tortuga";
blogger1.Password = "myPassword";
blogger1.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor";
// The HTTP Proxy can be an IP address or IP domain name.
blogger1.ProxyDomain = "80.35.189.83";
blogger1.ProxyPort = 80;
bool success = blogger1.GetUsersBlogs();
if (!success || (blogger1.NumBlogs == 0)) return;
string blogId = blogger1.GetBlogId(0);
// Use MetaWeblog to create a new post
Tortuga.MetaWeblog mwlog = new Tortuga.MetaWeblog();
mwlog.Login = "tortuga";
mwlog.Password = "myPassword";
mwlog.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor";
// The HTTP Proxy can be an IP address or IP domain name.
mwlog.ProxyDomain = "80.35.189.83";
mwlog.ProxyPort = 80;
string postId;
bool publish = true;
postId = mwlog.NewPost(blogId, "This is a test post abc-123", "This is the content of a test post...", publish);
MessageBox.Show("This ID of the post created = " + postId);