Skip to content

Commit

Permalink
Merge pull request #5 from mrkrstphr/custom-endpoints
Browse files Browse the repository at this point in the history
Shuffle urls to allow for custom endpoints
  • Loading branch information
mrkrstphr authored Dec 13, 2016
2 parents b3e21cf + 2c2b409 commit 1d55c84
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Endpoint/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Categories extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/categories';
return '/wp-json/wp/v2/categories';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Comments extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/comments';
return '/wp-json/wp/v2/comments';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Media extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/media';
return '/wp-json/wp/v2/media';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/PostStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class PostStatuses extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/statuses';
return '/wp-json/wp/v2/statuses';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/PostTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class PostTypes extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/types';
return '/wp-json/wp/v2/types';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/Posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Posts extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/posts';
return '/wp-json/wp/v2/posts';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/Tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Tags extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/tags';
return '/wp-json/wp/v2/tags';
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Users extends AbstractWpEndpoint
*/
protected function getEndpoint()
{
return '/users';
return '/wp-json/wp/v2/users';
}
}
2 changes: 1 addition & 1 deletion src/WpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function send(RequestInterface $request)
}

$request = $request->withUri(
$this->httpClient->makeUri($this->wordpressUrl . '/wp-json/wp/v2' . $request->getUri())
$this->httpClient->makeUri($this->wordpressUrl . $request->getUri())
);

return $this->httpClient->send($request);
Expand Down

0 comments on commit 1d55c84

Please sign in to comment.