Skip to content

Commit 0d6f4de

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent b832a38 commit 0d6f4de

4 files changed

Lines changed: 66 additions & 5 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
kind: change
3+
title: Changing organization feeds in the Feeds API
4+
created_at: 2014-09-12
5+
author_name: mastahyeti
6+
---
7+
8+
We have deprecated the `current_user_organization_url` attribute and the
9+
`current_user_organization.href` attribute in the [Feeds API][docs]. If you make
10+
use of these attributes, you'll want to update your code to use the new
11+
`current_user_organization_urls` attribute instead.
12+
13+
### Changes to the deprecated attributes
14+
15+
Previously, the deprecated attributes returned URI template. For example:
16+
17+
<pre><code class="language-javascript">
18+
"current_user_organization_url":
19+
"https://github.com/organizations/{org}/mastahyeti.private.atom?token=abc123"
20+
</code></pre>
21+
22+
The template included a deprecated authentication token. Our new tokens are
23+
valid only for a concrete feed URL (not for a URI template). Because the
24+
deprecated attributes were templates and did not specify a concrete URL, the API
25+
could not provide a token that could be used for organization feeds.
26+
27+
Starting today, the API returns empty values for the deprecated attributes.
28+
29+
### New attribute for organization feeds
30+
31+
In order to preserve the functionality of this API, we have added a new
32+
attribute that lists specific Atom feed urls for each of the user's
33+
organizations.
34+
35+
<pre><code class="language-javascript">
36+
"current_user_organization_urls": [
37+
"https://github.com/organizations/github/mastahyeti.private.atom?token=abc123"
38+
"https://github.com/organizations/requests/mastahyeti.private.atom?token=token=def456"
39+
]
40+
</code></pre>
41+
42+
Check out the updated [Feeds API documentation][docs] for the new fields. If you
43+
have any questions or feedback, please [get drop us a line][contact].
44+
45+
[docs]: /v3/activity/feeds/
46+
[contact]: https://github.com/contact?form[subject]=Changing+organization+feeds+in+the+Feeds+API

content/v3/activity/feeds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lists all the feeds available to the authenticating user:
1717
* **Current user public**: The public timeline for the authenticated user
1818
* **Current user**: The private timeline for the authenticated user
1919
* **Current user actor**: The private timeline for activity created by the authenticated user
20-
* **Current user organization**: The private timeline for the authenticated user for a given organization, using [URI template][]
20+
* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
2121

2222
**Note**: Private feeds are only returned when [authenticating via Basic
2323
Auth][authenticating] since current feed URIs use the older, non revokable auth

content/v3/versions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ The recommendations below will help you prepare your application for the next ma
9797
1. User attribute: gravatar_id
9898
: Recommendation: Use **avatar_url** instead.
9999

100+
1. Feed attribute: current_user_organization_url
101+
: Recommendation: Use **current_user_organization_urls** instead.
102+
103+
1. Feed attribute: current_user_organization
104+
: Recommendation: Use **current_user_organizations** instead.
105+
100106
1. Pagination parameters `top` and `sha` for method: /repos/:owner/:repo/commits
101107
: Recommendation: When fetching [the list of commits for a repository](/v3/repos/commits/#list-commits-on-a-repository)
102108
use the [standard `per_page` and `page` parameters](/v3/#pagination) for pagination, instead of `per_page`,

lib/resources.rb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,10 @@ def fetch_content(key)
18471847
:current_user_public_url => "https://github.com/defunkt",
18481848
:current_user_url => "https://github.com/defunkt.private?token=abc123",
18491849
:current_user_actor_url => "https://github.com/defunkt.private.actor?token=abc123",
1850-
:current_user_organization_url => "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123",
1850+
:current_user_organization_url => "",
1851+
:current_user_organization_urls => [
1852+
"https://github.com/organizations/github/defunkt.private.atom?token=abc123"
1853+
],
18511854
:_links => {
18521855
:timeline => {
18531856
:href => "https://github.com/timeline",
@@ -1870,9 +1873,15 @@ def fetch_content(key)
18701873
:type => "application/atom+xml"
18711874
},
18721875
:current_user_organization => {
1873-
:href => "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123",
1874-
:type => "application/atom+xml"
1875-
}
1876+
:href => "",
1877+
:type => ""
1878+
},
1879+
:current_user_organizations => [
1880+
{
1881+
:href => "https://github.com/organizations/github/defunkt.private.atom?token=abc123",
1882+
:type => "application/atom+xml"
1883+
}
1884+
]
18761885
}
18771886
}
18781887

0 commit comments

Comments
 (0)