Skip to content

Commit 028c420

Browse files
committed
Corrected example in README.
1 parent aaf0cb6 commit 028c420

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.markdown

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,19 @@ a parameter, be sure to use `obj.struct` or else WordPress will not receive
5454
data in the format it expects.
5555

5656
>>> from wordpress_xmlrpc import Client, WordPressCategory
57-
>>> from wordpress_xmlrpc.categories import SetPostCategories
57+
>>> from wordpress_xmlrpc.categories import NewCategory, SetPostCategories
5858

5959
>>> wp = Client('http://mysite.wordpress.com/xmlrpc.php', 'username', 'password')
6060
>>> new_category = WordPressCategory()
6161
>>> new_category.name = 'My new category'
62+
>>> new_category.cat_id = c.call(NewCategory(new_category))
63+
6264
>>> another_category = WordPressCategory()
6365
>>> another_category.name = 'Another new category'
66+
>>> another_category.cat_id = c.call(NewCategory(another_category))
67+
6468
>>> wp.call(SetPostCategories(5, [new_category.struct, another_category.struct]))
69+
True
6570

6671
Custom XML-RPC Methods
6772
==========

0 commit comments

Comments
 (0)