From f62c85512864b9e64a6c6850c701ea1cdf4df89e Mon Sep 17 00:00:00 2001 From: Ben Speakman Date: Sun, 12 Apr 2015 18:29:19 +0100 Subject: [PATCH] Add author function --- src/Cyberduck/LaravelWpApi/WpApi.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Cyberduck/LaravelWpApi/WpApi.php b/src/Cyberduck/LaravelWpApi/WpApi.php index fdaee71..a0901b3 100755 --- a/src/Cyberduck/LaravelWpApi/WpApi.php +++ b/src/Cyberduck/LaravelWpApi/WpApi.php @@ -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');