Skip to content

MannusEtten/WordPressSharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#WordPressSharp# A C# client to interact with the WordPress XML-RPC API

#Install# I'm working on a Nuget package once I'm done mapping all the WP XML-RPC endpoints.

In the meantime, you'll have to clone, build, and add the DLL the ole fashioned way

#Examples# Create Post

var post = new Post {
    PostType = "post",
    Title = "My Awesome Post",
    Content = "<p>This is the content</p>",
    PublishDateTime = DateTime.Now
};

using (var client = new WordPressClient(new WordPressSiteConfig {
    BaseUrl = "http://mywordpress.com",
    Username = "admin",
    Password = "password",
    BlogId = 1
})) 
{
    var id = Convert.ToInt32(client.NewPost(post));
}

##Create Post Tag##

var config = new WordPressSiteConfig { ... }

using (var client = new WordPressClient(config))
{
    var termId = client.NewTerm(new Term
    {
        Name = "term test",
        Description = "term description",
        Slug = "term_test",
        Taxonomy = "post_tag"
    });
}

#Dependencies# XML-RPC.net

#Resources# WordPress XML-RPC API

#Notes# Inspired by the POSSIBLE.WordPress.XmlRpcClient by markeverard

About

A C# client to to interact with the WordPress XML-RPC API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%