public deletePost ( string appKey, string postid, string username, string password, [ Description = "Where applicable, this specifies whether the blog should be republished after the post has been deleted.")]boolpublish ) : bool | ||
appKey | string | |
postid | string | |
username | string | |
password | string | |
Description | [ | |
Результат | bool |
public bool deletePost(string appKey,string postid,string username,string password,[XmlRpcParameter(Description="Where applicable, this specifies whether the blog should be republished after the post has been deleted.")] bool publish)
{
ValidateUser(username,password,Config.CurrentBlog.AllowServiceAccess);
try
{
Entries.Delete(Int32.Parse(postid));
return true;
}
catch
{
throw new XmlRpcFaultException(1, "Could not delete post: " + postid);
}
}