8000 Merge pull request #664 from github/update-with-latest-upstream · Alguar03/developer.github.com@5db667a · GitHub
[go: up one dir, main page]

Skip to content

Commit 5db667a

Browse files
committed
Merge pull request github#664 from github/update-with-latest-upstream
Fetch upstream and resolve merge conflict
2 parents 3141b6e + 9821655 commit 5db667a

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
kind: change
3+
title: New Attributes for Starring API
4+
created_at: 2014-12-09
5+
author_name: arfon
6+
---
7+
8+
You can now see when a user starred a repository. To receive the new response format containing the `starred_at` field, request the new media type:
9+
10+
curl -H "Accept: application/vnd.github.v3.star+json" https://api.github.com/users/andrew/starred
11+
12+
Note the starred repository is now available in the repo field.
13+
14+
### Feedback
15+
16+
If you have any questions or feedback about these changes, please [drop us a line][contact].
17+
18+
[starring]: /v3/activity/starring/#list-repositories-being-starred-with-star-creation-timestamps
19+
[contact]: https://github.com/contact?form[subject]=New+Attributes+for+Starring+API

content/v3/activity/starring.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,21 @@ Name | Type | Description
4747
`sort`|`string` | One of `created` (when the repository was starred) or `updated` (when it was last pushed to). Default: `created`
4848
`direction`|`string` | One of `asc` (ascending) or `desc` (descending). Default: `desc`
4949

50-
5150
### Response
5251

5352
<%= headers 200, :pagination => default_pagination_rels %>
5453
<%= json(:repo) { |h| [h] } %>
5554

55+
## List repositories being starred with star creation timestamps
56+
57+
You can also find out _when_ stars were created by passing the following custom content-type via the `Accept` header.
58+
59+
Accept: application/vnd.github.v3.star+json
60+
61+
### Response
62+
<%= headers 200, :pagination => default_pagination_rels %>
63+
<%= json(:starred_repo) { |hash| [hash] } %>
64+
5665
## Check if you are starring a repository
5766

5867
Requires for the user to be authenticated.

lib/resources.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ def fetch_content(key)
251251
"source" => REPO
252252
})
253253

254+
STARRED_REPO ||= {
255+
"starred_at" => "2011-01-16T19:06:43Z",
256+
"repo" => REPO
257+
}
258+
254259
TAG ||= {
255260
"name" => "v0.1",
256261
"commit" => {

0 commit comments

Comments
 (0)
0