The metaWeblog.newPost method posts a new entry to a blog.
public string metaWeblog.newPost(string blogid,
string username,
string password,
struct content,
bool publish);
blogid [in]
This should be the string MyBlog, which indicates that the post is being created in the user’s blog.
username [in]
The name of the user’s space.
password [in]
The user’s secret word.
content [in]
A struct representing the content to update. The title, description, dateCreated, and categories fields are supported. All other elements are ignored. If multiple categories are specified, each category is added to the category list until the maximum is reached, and all remaining categories are ignored. An error is returned if no title is specified. If no description or categories are provided, the post has no body or category, respectively.
struct {
string title;
string description;
dateTime.iso8601 dateCreated;
string[] categories;
}
publish [in]
If false, this is a draft post.
string [out]
The postid of the newly-created post.
Sample XML-RPC Request as XML
<methodCall>
<methodName>metaWeblog.newPost</methodName>
<params>
<param>
<value>
<string>MyBlog</string>
</value>
</param>
<param>
<value>!spacename!</value>
</param>
<param>
<value>
<string>secretword</string>
</value>
</param>
<param>
<struct>
<member>
<name>categories</name>
<value>
<array>
<data>
<value>Adventures</value>
</data>
</array>
</value>
</member>
<member>
<name>description</name>
<value>Dr. Quest is missing while on an expedition to find the Yeti. Jonny and his friends head to the Himalayas to find him, but run into another scientist who's determined to bring back the Yeti.
</value>
</member>
<member>
<name>title</name>
<value>Expedition To Khumbu</value>
</member>
<member>
<name>dateCreated</name>
<value>
<dateTime.iso8601>20040716T19:20:30</ dateTime.iso8601>
</value>
</member>
</struct>
</param>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodCall>
Sample XML-RPC Response as XML
<methodResponse>
<params>
<param>
<value>
<i4>1829</i4>
</value>
</param>
</params>
</methodResponse>