Skip to content

Commit

Permalink
Author fix and tag posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Speakman committed Apr 12, 2015
1 parent a454a10 commit 2b11504
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/Cyberduck/LaravelWpApi/WpApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ public function page($slug)
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');
Expand All @@ -53,6 +48,16 @@ public function category_posts($slug, $page = null)
return $this->_get('posts', ['page' => $page, 'filter' => ['category_name' => $slug]]);
}

public function author_posts($name, $page = null)
{
return $this->_get('posts', ['page' => $page, 'filter' => ['author_name' => $name]]);
}

public function tag_posts($tags, $page = null)
{
return $this->_get('posts', ['page' => $page, 'filter' => ['tag' => $tags]]);
}

public function search($query, $page = null)
{
return $this->_get('posts', ['page' => $page, 'filter' => ['s' => $query]]);
Expand Down

0 comments on commit 2b11504

Please sign in to comment.