functions: Wordpress functions

categoriesR Documentation

Wordpress functions

Description

These are functions that allow us to interact with a Wordpress blog. We can query the contents of the blog and its meta-data. We can also post to the blog, create new pages, delete pages, posts and categories and create new categories. The functions documented here are for querying the blog information. See newPost for functions for creating, deleting and modifying the content.

Wherever the documentation for the methods talks about a struct, this corresponds to a named list in R.

Usage

getPostCategories(post = 100, login = getOption("WordpressLogin", stop("need a login and password")),
                   .server = getServerURL())
getPost(postid, login = getOption("WordpressLogin", stop("need a login and password")),
         .server = getServerURL())
generalRequest(op, blogid = 0L, login = getOption("WordpressLogin", stop("need a login and password")), 
                ..., asDataFrame = TRUE, .server = getServerURL())
getPage(pageid, blogid = 0L, login = getOption("WordpressLogin", stop("need a login and password")), ..., .server = getServerURL())
getRecentPostTitles(num = 100, blogid = 0L, login = getOption("WordpressLogin", stop("need a login and password")), ..., .server = getServerURL())

Arguments

login

a character vector giving the login and password as a named character vector of the form c(login = "password").

blogid

the identifier for the particular blog. Often this can be left as 0 to identify the default blog.

...

additional parameters passed to xml.rpc

asDataFrame

whether to conver the result into a data frame

pageid,postid,post

the id of the page or post of interest

num

the number of posts/titles to retrieve

op

the name of the operation/method

.server

a string giving the URL of the Wordpress server. This can be specified by the caller directly or can be set as a global option in R named WordpressURL, e.g. options(WordpressURL = "https://www.mywordpress.org/xmlrpc.php").


duncantl/RWordPress documentation built on Nov. 23, 2023, 4:23 p.m.