Add author function

This commit is contained in:
Ben Speakman 2015-04-12 18:29:19 +01:00
parent 08affa32b5
commit f62c855128

View file

@ -33,6 +33,11 @@ class WpApi
return $this->_get('posts', ['type' => 'page', 'filter' => ['name' => $slug]]);
}
public function author($name)
{
return $this->_get('posts', ['type' => 'page', 'filter' => ['author_name' => $name]]);
}
public function categories()
{
return $this->_get('taxonomies/category/terms');