From 9b2308349d712ae979b93d4a1874b9d1343676ac Mon Sep 17 00:00:00 2001 From: Matthias Max Date: Sat, 22 Nov 2014 01:02:45 +0100 Subject: [PATCH 1/4] Replaced the colon (:) in the routing URLs with a _ --- README.md | 36 ++--- resources/B3_Comment.php | 324 +++++++++++++++++++------------------- resources/B3_Media.php | 34 ++-- resources/B3_Menu.php | 138 ++++++++-------- resources/B3_Post.php | 28 ++-- resources/B3_Settings.php | 50 +++--- resources/B3_Sidebar.php | 104 ++++++------ 7 files changed, 357 insertions(+), 357 deletions(-) diff --git a/README.md b/README.md index 1266899..d3cd21f 100644 --- a/README.md +++ b/README.md @@ -23,51 +23,51 @@ Also, please bear in mind that B3 is a work in progress and can't (yet) be consi The B3 REST API Extensions plugin enables the following additional endpoints. -To make it easier to tell B3 extensions apart from the other endpoints, all of our additions are prepended by `b3:`. +To make it easier to tell B3 extensions apart from the other endpoints, all of our additions are prepended by `b3_`. ### Comments We provide an alternative implementation of the Comments resource that allows retrieving comments without having to know which post they belong to. -* `GET` `/b3:comments/` -* `GET` `/b3:comments//b3:replies` -* `POST` `/b3:comments//b3:replies` -* `GET` `/media//b3:replies` -* `POST` `/media//b3:replies` -* `GET` `/pages//b3:replies` -* `POST` `/pages//b3:replies` -* `GET` `/posts//b3:replies` -* `POST` `/posts//b3:replies` +* `GET` `/b3_comments/` +* `GET` `/b3_comments//b3_replies` +* `POST` `/b3_comments//b3_replies` +* `GET` `/media//b3_replies` +* `POST` `/media//b3_replies` +* `GET` `/pages//b3_replies` +* `POST` `/pages//b3_replies` +* `GET` `/posts//b3_replies` +* `POST` `/posts//b3_replies` ### Media This endpoint provides a way to fetch a media attachment by its slug. -* `GET` `/media/b3:slug:` +* `GET` `/media/b3_slug:` ### Posts This endpoint provides a way to fetch a post by its slug. -* `GET` `/posts/b3:slug:` +* `GET` `/posts/b3_slug:` ### Menus We provide endpoints to fetch all Menus registered by the theme as well as the menu items configured in the WordPress Admin. -* `GET` `/b3:menus` -* `GET` `/b3:menus/` +* `GET` `/b3_menus` +* `GET` `/b3_menus/` ### Sidebars Similar to Menus, we allow fetching all widget areas registered by the theme as well as their widgets and widget content. -* `GET` `/b3:sidebars` -* `GET` `/b3:sidebars/` +* `GET` `/b3_sidebars` +* `GET` `/b3_sidebars/` ### Settings Finally, this plugin exposes WordPress settings through the API. It wraps the `get_bloginfo()` function but exposes a few additional site options as well as the pretty permalinks table. -* `GET` `/b3:settings` -* `GET` `/b3:settings/