struct
WordPress
pub struct WordPress {
/* private fields */
}A WordPress site, read through its REST API (/wp-json/wp/v2).
Methods
com
pub fn com(site: &str) -> WordPressA WordPress.com site (example.wordpress.com or a mapped domain).
plain_permalinks
pub fn plain_permalinks(self) -> WordPressUse ?rest_route=/wp/v2/… (sites with "Plain" permalinks).
authorization
pub fn authorization(self, header: &str) -> WordPressSend credentials, e.g. an application password as Basic auth ("Basic base64(user:app-password)") — server-side only.
post
pub fn post(&self, id: u64) -> RequestThe post with id, with its embedded author, image and terms.
page
pub fn page(&self, id: u64) -> RequestThe page with id, with its embedded author, image and terms.