Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Commit 562c1d0

Browse files
author
Luis Rodrigues
committed
Documenting changes in develop
1 parent 78b5fb1 commit 562c1d0

File tree

1 file changed

+36
-17
lines changed

1 file changed

+36
-17
lines changed

README.md

+36-17
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,68 @@ The B3 REST API Extensions plugin enables the following additional endpoints.
2525

2626
To make it easier to tell B3 extensions apart from the other endpoints, all of our additions are prepended by `b3:`.
2727

28+
### Breaking changes in `develop`
29+
30+
We're adapting our API controllers to the new format proposed by the WP-API team and introducing the `b3` namespace, and as a result endpoints will undergo a few (mostly minor) changes.
31+
32+
The tables below should give you an indication of how things are going to work in the future.
33+
2834
### Comments
2935

3036
We provide an alternative implementation of the Comments resource that allows retrieving comments without having to know which post they belong to.
3137

32-
* `GET` `/b3:comments/<id>`
33-
* `GET` `/b3:comments/<id>/b3:replies`
34-
* `POST` `/b3:comments/<id>/b3:replies`
35-
* `GET` `/media/<id>/b3:replies`
36-
* `POST` `/media/<id>/b3:replies`
37-
* `GET` `/pages/<id>/b3:replies`
38-
* `POST` `/pages/<id>/b3:replies`
39-
* `GET` `/posts/<id>/b3:replies`
40-
* `POST` `/posts/<id>/b3:replies`
38+
| | `master` | `develop` |
39+
| ------ | ------------------------------ | --------------------------- |
40+
| `GET` | `/b3:comments/<id>` | `/b3/comments/<id>` |
41+
| `GET` | `/b3:comments/<id>/b3:replies` | `/b3/comments/<id>/replies` |
42+
| `POST` | `/b3:comments/<id>/b3:replies` | `/b3/comments/<id>/replies` |
43+
| `GET` | `/media/<id>/b3:replies` | `/b3/media/<id>/replies` |
44+
| `POST` | `/media/<id>/b3:replies` | `/b3/media/<id>/replies` |
45+
| `GET` | `/pages/<id>/b3:replies` | `/b3/pages/<id>/replies` |
46+
| `POST` | `/pages/<id>/b3:replies` | `/b3/pages/<id>/replies` |
47+
| `GET` | `/posts/<id>/b3:replies` | `/b3/posts/<id>/replies` |
48+
| `POST` | `/posts/<id>/b3:replies` | `/b3/posts/<id>/replies` |
4149

4250
### Media
4351

4452
This endpoint provides a way to fetch a media attachment by its slug.
4553

46-
* `GET` `/media/b3:slug:<slug>`
54+
| | `master` | `develop` |
55+
| ------ | ------------------------------ | --------------------------- |
56+
| `GET` | `/media/b3:slug:<slug>` | `/b3/media/slug/<slug>` |
4757

4858
### Posts
4959

5060
This endpoint provides a way to fetch a post by its slug.
5161

52-
* `GET` `/posts/b3:slug:<slug>`
62+
| | `master` | `develop` |
63+
| ------ | ------------------------------ | --------------------------- |
64+
| `GET` | `/posts/b3:slug:<slug>` | `/b3/posts/slug/<slug>` |
5365

5466
### Menus
5567

5668
We provide endpoints to fetch all Menus registered by the theme as well as the menu items configured in the WordPress Admin.
5769

58-
* `GET` `/b3:menus`
59-
* `GET` `/b3:menus/<location>`
70+
| | `master` | `develop` |
71+
| ------ | ------------------------------ | --------------------------- |
72+
| `GET` | `/b3:menus` | `/b3/menus` |
73+
| `GET` | `/b3:menus/<location>` | `/b3/menus/<location>` |
6074

6175
### Sidebars
6276

6377
Similar to Menus, we allow fetching all widget areas registered by the theme as well as their widgets and widget content.
6478

65-
* `GET` `/b3:sidebars`
66-
* `GET` `/b3:sidebars/<index>`
79+
| | `master` | `develop` |
80+
| ------ | ------------------------------ | --------------------------- |
81+
| `GET` | `/b3:sidebars` | `/b3/sidebars` |
82+
| `GET` | `/b3:sidebars/<index>` | `/b3/sidebars/<index>` |
6783

6884
### Settings
6985

7086
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.
7187

72-
* `GET` `/b3:settings`
73-
* `GET` `/b3:settings/<option>`
88+
| | `master` | `develop` |
89+
| ------ | ------------------------------ | --------------------------- |
90+
| `GET` | `/b3:settings` | `/b3/settings` |
91+
| `GET` | `/b3:settings/<option>` | `/b3/settings/<option>` |
92+

0 commit comments

Comments
 (0)