|
1 | 1 | --- |
2 | | -title: Repo Watching | GitHub API |
| 2 | +title: Repository Watching | GitHub API |
3 | 3 | --- |
4 | 4 |
|
5 | | -# Repo Watching API |
| 5 | +# Repository Watching API |
| 6 | + |
| 7 | +Watching a Repository registers the user to receive notificactions on new |
| 8 | +discussions, as well as events in the user's activity feed. See [Repository |
| 9 | +Starring](/v3/repos/starring) for simple repository bookmarks. |
6 | 10 |
|
7 | 11 | We recently [changed the way watching |
8 | | -works](https://github.com/blog/1204-notifications-stars) on GitHub. We hope to |
9 | | -roll out many of these features in the API soon. Until then, the [Watchers |
10 | | -method](#list-watchers) below will return "stargazers", and the [Watched |
11 | | -methods](#list-repos-being-watched) return repositories that have been |
12 | | -"starred." |
| 12 | +works](https://github.com/blog/1204-notifications-stars) on GitHub. Until 3rd |
| 13 | +party applications stop using the "watcher" endpoints for the current Starring |
| 14 | +API, the Watching API will use the below "subscription" endpoints. |
13 | 15 |
|
14 | 16 | ## List watchers |
15 | 17 |
|
16 | | - GET /repos/:user/:repo/watchers |
| 18 | + GET /repos/:user/:repo/subscribers |
17 | 19 |
|
18 | 20 | ### Response |
19 | 21 |
|
20 | 22 | <%= headers 200, :pagination => true %> |
21 | 23 | <%= json(:user) { |h| [h] } %> |
22 | 24 |
|
23 | | -## List repos being watched |
| 25 | +## List repositories being watched |
24 | 26 |
|
25 | | -List repos being watched by a user |
| 27 | +List repositories being watched by a user. |
26 | 28 |
|
27 | | - GET /users/:user/watched |
| 29 | + GET /users/:user/subscriptions |
28 | 30 |
|
29 | | -List repos being watched by the authenticated user |
| 31 | +List repositories being watched by the authenticated user. |
30 | 32 |
|
31 | | - GET /user/watched |
| 33 | + GET /user/subscriptions |
32 | 34 |
|
33 | 35 | ### Response |
34 | 36 |
|
35 | 37 | <%= headers 200, :pagination => true %> |
36 | 38 | <%= json(:repo) { |h| [h] } %> |
37 | 39 |
|
38 | | -## Check if you are watching a repo |
| 40 | +## Check if you are watching a repository |
39 | 41 |
|
40 | | -Requires for the user to be authenticated |
| 42 | +Requires for the user to be authenticated. |
41 | 43 |
|
42 | | - GET /user/watched/:user/:repo |
| 44 | + GET /user/subscriptions/:user/:repo |
43 | 45 |
|
44 | | -### Response if this repo is watched by you |
| 46 | +### Response if this repository is watched by you |
45 | 47 |
|
46 | 48 | <%= headers 204 %> |
47 | 49 |
|
48 | | -### Response if this repo is not watched by you |
| 50 | +### Response if this repository is not watched by you |
49 | 51 |
|
50 | 52 | <%= headers 404 %> |
51 | 53 |
|
52 | | -## Watch a repo |
| 54 | +## Watch a repository |
53 | 55 |
|
54 | | -Requires for the user to be authenticated |
| 56 | +Requires for the user to be authenticated. |
55 | 57 |
|
56 | | - PUT /user/watched/:user/:repo |
| 58 | + PUT /user/subscriptions/:user/:repo |
57 | 59 |
|
58 | 60 | ### Response |
59 | 61 |
|
60 | 62 | <%= headers 204 %> |
61 | 63 |
|
62 | | -## Stop watching a repo |
| 64 | +## Stop watching a repository |
63 | 65 |
|
64 | | -Requires for the user to be authenticated |
| 66 | +Requires for the user to be authenticated. |
65 | 67 |
|
66 | | - DELETE /user/watched/:user/:repo |
| 68 | + DELETE /user/subscriptions/:user/:repo |
67 | 69 |
|
68 | 70 | ### Response |
69 | 71 |
|
|
0 commit comments