MSDN has sample code for interacting with the MetaWeblog API
C# Sample - complete and compiles.
http://msdn.microsoft.com/library/de...ode_Sample.asp
VB sample - is incomplete and incorrect.
http://msdn.microsoft.com/library/de...ode_Sample.asp
Can someone post the equivalent VB code just for this snippet?
C#
/// <summary>
/// Returns the most recent draft and non-draft blog posts sorted in
descending order by publish date.
/// </summary>
/// <param name="blogid"This should be the string MyBlog, which
indicates that the post is being created in the user's blog. </param>
/// <param name="username" The name of the user's space. </param>
/// <param name="password"The user's secret word. </param>
/// <param name="numberOfPosts"The number of posts to return. The
maximum value is 20. </param>
/// <returns></returns>
[XmlRpcMethod("metaWeblog.getRecentPosts")]
public Post[] getRecentPosts(
string blogid,
string username,
string password,
int numberOfPosts){
return (Post[]) this.Invoke("getRecentPosts", new object[]{ blogid,
username, password, numberOfPosts});
}
The given VB.net code is incorrect
'/ <summary>
'/ Returns the most recent draft and non-draft blog posts sorted in
descending order by publish date.
'/ </summary>
'/ <param name="blogid">This should be the string MyBlog, which
indicates that the post is being created in the user's blog.</param>
'/ <param name="username">The name of the user's space.</param>
'/ <param name="password">The user's secret word.</param>
'/ <param name="numberOfPosts">The number of posts to return. The
maximum value is 20.</param>
'/ <returns></returns>
<XmlRpcMethod("metaWeblog.getRecentPosts")_
Public Property getRecentPosts(() As Post()
End Property
)
End Function