You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/my-posts.R
\name{wp_get_posts}
\alias{wp_get_posts}
\title{Get all posts across all sites of the authenticated user}
\usage{
wp_get_posts(
context = c("edit", "display"),
author = NULL,
after = NULL,
before = NULL,
modified_after = NULL,
modified_before = NULL,
status = NULL,
search = NULL,
sites = NULL,
.quiet = FALSE
)
}
\arguments{
\item{context}{`edit` (default) for raw post source; `display` for HTML
rendered source.}
\item{author}{id of the author or empty (the default) for 'all authors'}
\item{after, before}{(POSIXct or Date object or string that can be converted to one of those)
Return posts dated before/after the specified datetime.}
\item{modified_after, modified_before}{(POSIXct or Date object) Return posts modified before/after
the specified datetime.}
\item{status}{Comma-separated list of statuses for which to query, including any of:
"publish", "private", "draft", "pending", "future", and "trash", or simply "any". Defaults to "publish"}
\item{search}{Search query checked against `title`, `content`, `category.name`, `tag.name`,
and `author`, and will return results sorted by relevance. Limit: 250 characters}
\item{sites}{Optional comma-separated list of specific site IDs to further limit results}
\item{.quiet}{if `TRUE` then no progress information will be displayed}
}
\value{
data frame of posts
}
\description{
Get all posts across all sites of the authenticated user
}
\examples{
if (interactive()) {
wp_auth()
my_posts <- wp_get_posts()
}
}
\references{
<https://developer.wordpress.com/docs/api/1.1/get/me/posts/>
}