Skip to content

Commit 34ebc3b

Browse files
committed
make it more clear when shit starts breaking
1 parent b0e4270 commit 34ebc3b

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

content/changes/2012-9-5-watcher-api.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929

3030
## Phase 1: Add Watchers as Subscriptions
3131

32-
In addition to this, we'll expose Watchers as "Subscriptions". This is to
33-
keep from clashing with the legacy endpoint.
32+
This phase exposes Watchers as "Subscriptions". This is to
33+
keep from clashing with the legacy endpoint. This phase will happen
34+
automatically and will not break your application until Phase 2 starts.
3435

3536
* `/repos/:owner/:repo/subscribers` - A list of users watching the repository.
3637
* `/users/:user/subscriptions` - A list of repositories that a user is watching.
@@ -47,12 +48,17 @@
4748
application/vnd.github.beta+json
4849

4950
If you care about your application not breaking, make sure all outgoing API
50-
requests pass that value for the "Accept" header.
51+
requests pass that value for the "Accept" header. You should do this now, even
52+
before Phase 1 starts.
5153

5254
# Accesses a user's starred repositories.
5355
curl https://api.github.com/user/watched \
5456
-H "Accept: application/vnd.github.beta+json"
5557

58+
This Phase will be broken once Phase 3 starts. Phase 3 removes all support for
59+
the "beta" mime type, and makes the "v3" mime type the implicit default
60+
for API requests.
61+
5662
## Phase 2: Switch `/watchers` API Endpoint
5763

5864
The "watch" endpoints will now be a copy of the "subscription" endpoints. You
@@ -63,9 +69,9 @@
6369

6470
application/vnd.github.v3+json
6571

66-
We will release this change in an experimental mode first, letting developers
67-
gracefully upgrade their applications by specifying the new mime value for the
68-
Accept header.
72+
This is a breaking change from Phase 1. We will release this change in an
73+
experimental mode first, letting developers gracefully upgrade their
74+
applications by specifying the new mime value for the Accept header.
6975

7076
# Accesses a user's watched repositories.
7177
curl https://api.github.com/user/watched \
@@ -77,6 +83,6 @@
7783
point, you should be using the starring endpoints for starred repositories, and
7884
the watch endpoints for watched repositories.
7985

80-
At this point, keep on passing the "v3" mimetype in your application, until the
81-
API has another breaking change to make.
86+
Keep on passing the "v3" mimetype in your application, until the API has
87+
another breaking change to make.
8288

0 commit comments

Comments
 (0)