| title | Starring |
|---|
{:toc}
Repository Starring is a feature that lets users bookmark repositories. Stars are shown next to repositories to show an approximate level of interest. Stars have no effect on notifications or the activity feed. For that, see Repository Watching.
In August 2012, we changed the way watching works on {{ site.data.variables.product.product_name }}. Many API client applications may be using the original "watcher" endpoints for accessing this data. You can now start using the "star" endpoints instead (described below). Check out the Watcher API Change post for more details.
GET /repos/:owner/:repo/stargazers
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:user) { |h| [h] } %>
You can also find out when stars were created by passing the following custom media type via the Accept header:
Accept: application/vnd.github.v3.star+json
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:stargazer_with_timestamps) { |hash| [hash] } %>
List repositories being starred by a user.
GET /users/:username/starred
List repositories being starred by the authenticated user.
GET /user/starred
| Name | Type | Description |
|---|---|---|
sort |
string |
One of created (when the repository was starred) or updated (when it was last pushed to). Default: created |
direction |
string |
One of asc (ascending) or desc (descending). Default: desc |
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:repo) { |h| [h] } %>
You can also find out when stars were created by passing the following custom media type via the Accept header:
Accept: application/vnd.github.v3.star+json
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:starred_repo) { |hash| [hash] } %>
Requires for the user to be authenticated.
GET /user/starred/:owner/:repo
<%= headers 204 %>
<%= headers 404 %>
Requires for the user to be authenticated.
PUT /user/starred/:owner/:repo
<%= fetch_content(:put_content_length) %>
<%= headers 204 %>
Requires for the user to be authenticated.
DELETE /user/starred/:owner/:repo
<%= headers 204 %>