See Examples for guidance on how to use the following method classes.
Retrieve posts from the blog.
Returns: list of WordPressPost instances.
Retrieve an individual blog post.
Returns: WordPressPost instance.
Create a new post on the blog.
Returns: ID of the newly-created blog post (an integer).
Edit an existing blog post.
Returns: True on successful edit.
Delete a blog post.
Returns: True on successful deletion.
Retrieve the set of possible blog post statuses (e.g., “draft,” “private,” “publish”).
Returns: dict of values and their pretty names.
>>> client.call(GetPostStatusList())
{'draft': 'Draft', 'private': 'Private', 'pending': 'Pending Review', 'publish': 'Published'}
Retrieve the set of post formats used by the blog.
>>> client.call(GetPostFormats())
{'all': {'status': 'Status', 'quote': 'Quote', 'image': 'Image', 'aside': 'Aside', 'standard': 'Standard', 'link': 'Link', 'chat': 'Chat', 'video': 'Video', 'audio': 'Audio', 'gallery': 'Gallery'},
'supported': ['aside', 'link', 'gallery', 'status', 'quote', 'image']}
Retrieve a list of post types used by the blog.
Returns: dict with names as keys and WordPressPostType instances as values.
Retrieve an individual blog post type.
Returns: WordPressPostType instance.
Retrieve the set of possible blog page statuses (e.g., “draft,” “private,” “publish”).
Returns: dict of values and their pretty names.
>>> client.call(GetPageStatusList())
{'draft': 'Draft', 'private': 'Private', 'publish': 'Published'}
Retrieve the list of blog templates.
Returns: dict of values and their paths.
>>> client.call(GetPageTemplates())
{'Default': 'default', 'Sidebar Template': 'sidebar-page.php', 'Showcase Template': 'showcase.php'}
Retrieve the list of available taxonomies for the blog.
Returns: list of WordPressTaxonomy instances.
Retrieve an individual taxonomy.
Returns: WordPressTaxonomy instance.
Retrieve the list of available terms for a taxonomy.
taxonomy: name of the taxonomy
Returns: list of WordPressTerm instances.
Retrieve an individual term.
taxonomy: name of the taxonomy
term_id: ID of the term
Returns: WordPressTerm instance.
Create new term.
Returns: ID of newly-created term (an integer).
Edit an existing term.
term_id: ID of the term to edit.
term: A WordPressTerm instance with the new values for the term.
Returns: True on successful edit.
Delete a term.
taxonomy: name of the taxonomy
term_id: ID of the term to delete.
Returns: True on successful deletion.
Gets a set of comments for a post.
Returns: list of WordPressComment instances.
Retrieve an individual comment.
Returns: WordPressPost instance.
Create a new comment on a post.
Returns: ID of the newly-created comment (an integer).
Create a new comment on a post without authenticating.
NOTE: Requires support on the blog by setting the following filter in a plugin or theme:
add_filter( ‘xmlrpc_allow_anonymous_comments’, ‘__return_true’ );
Returns: ID of the newly-created comment (an integer).
Edit an existing comment.
Returns: True on successful edit.
Delete an existing comment.
Returns: True on successful deletion.
Retrieve the set of possible blog comment statuses (e.g., “approve,” “hold,” “spam”).
Returns: dict of values and their pretty names.
>>> client.call(GetCommentStatusList())
{'hold': 'Unapproved', 'approve': 'Approved', 'spam': 'Spam'}
Retrieve comment count for a specific post.
Returns: dict of comment counts for the post divided by comment status.
>>> client.call(GetCommentCount(1))
{'awaiting_moderation': '2', 'total_comments': 23, 'approved': '18', 'spam': 3}
Retrieve an individual user.
Returns: WordPressUser instance.
Retrieve list of users in the blog.
fields: optional list of fields to return. Specific fields, or groups ‘basic’ or ‘all’.
Returns: list of WordPressUser instances.
Retrieve information about the connected user.
Returns: instance of WordPressUser representing the user whose credentials are being used with the XML-RPC API.
Edit profile fields of the connected user.
Returns: True on successful edit.
Retrieve list of blogs that this user belongs to.
Returns: list of WordPressBlog instances.
Retrieve list of authors in the blog.
Returns: list of WordPressAuthor instances.
Retrieve filtered list of media library items.
number: number of media items to retrieve
offset: query offset
Use empty string (default) to show all media items. Use 0 to show unattached media items.
mime_type: file mime-type to filter by (e.g., ‘image/jpeg’)
Returns: list of WordPressMedia instances.
Retrieve an individual media item.
Returns: WordPressMedia instance.
Upload a file to the blog.
Note: the file is not attached to or inserted into any blog posts.
Returns: dict with keys id, file (filename), url (public URL), and type (MIME-type).
Retrieve list of blog options.
Returns: list of WordPressOption instances.
Update the value of an existing blog option.
Returns: list of WordPressOption instances representing the updated options.