Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
b5db502
Document auto_init
pengwynn Sep 28, 2012
316b1e6
Post on auto init'ing
pengwynn Sep 28, 2012
379f341
Add forks_count and watchers_count.
sigmavirus24 Sep 28, 2012
7dd92da
Merge pull request #151 from sigmavirus24/master
pengwynn Sep 28, 2012
e1c1406
Reswizzle, stub Notifications docs
pengwynn Sep 28, 2012
baf123f
Document Issues API creator param
pengwynn Sep 30, 2012
e12e2d5
Update content/v3/search.md
bradchoate Oct 1, 2012
83475ab
add gh.el to libraries list
tarsius Oct 1, 2012
95b33cc
Merge pull request #152 from tarsius/master
pengwynn Oct 1, 2012
3a1fbd5
Correct param requirements for commit comments
pengwynn Oct 2, 2012
38b598d
some tweaks
technoweenie Oct 2, 2012
9a59a71
tweak the settings endpoints
technoweenie Oct 2, 2012
22fd41c
Document new merge_commit_sha
pengwynn Oct 3, 2012
30fa6db
move settings api to an unlinked/unimplemented file
technoweenie Oct 3, 2012
8915c08
gist listings dont list every included file
technoweenie Oct 3, 2012
f875a09
stop modifying a shared hash
technoweenie Oct 3, 2012
69db0aa
added caveat about support for ?per_page in pagination section
Oct 6, 2012
1ddcc1e
Merge pull request #154 from y-p/master
pengwynn Oct 6, 2012
e0d53c3
typo fix
Oct 6, 2012
22cfb34
Merge pull request #155 from y-p/master
pengwynn Oct 8, 2012
044ac36
No margin on UL inside DD
pengwynn Oct 9, 2012
22a13da
Add two new Issues listing methods
pengwynn Oct 9, 2012
42fb154
describe hook config changes better
technoweenie Oct 9, 2012
4e8c35e
Merge branch 'master' into api-notifications
technoweenie Oct 9, 2012
1aa03a7
document notification format
technoweenie Oct 9, 2012
bf630a4
document the new 'since' parameter
technoweenie Oct 9, 2012
7b0761f
typos
technoweenie Oct 9, 2012
fa3f19a
Add example to clarify a valid gitignore_template
haacked Oct 11, 2012
36d1675
Document new 'all' filter for listing issues
pengwynn Oct 11, 2012
65fe87d
Merge pull request #156 from Haacked/master
pengwynn Oct 11, 2012
c70ee16
Add parameter JSON example
haacked Oct 11, 2012
b73b251
Merge pull request #157 from github/commit-status-examples
pengwynn Oct 12, 2012
983f527
Document redirection behavior of api
Oct 12, 2012
d0c2074
Provide a better example of a JSON request
haacked Oct 12, 2012
b108c90
Merge pull request #159 from Haacked/initial-example-fix
pengwynn Oct 12, 2012
de55dd9
Updated members page and added a changes entry to reflect github/gith…
Oct 13, 2012
0f7a142
Document new lower rate limits
pengwynn Oct 15, 2012
cc14da9
Fix typo. lolz ruby
pengwynn Oct 15, 2012
5612df8
Add my gravatar id
Oct 15, 2012
f0d9544
Fixed wrong fieldname in JSON example
haacked Oct 15, 2012
d862e44
Merge pull request #161 from Haacked/json-example-fix
pengwynn Oct 15, 2012
144899c
add githubpy
michaelliao Oct 17, 2012
4b80a31
Merge pull request #162 from michaelliao/master
pengwynn Oct 17, 2012
6a733a5
Merge pull request #160 from github/org-members-redirection
pezra Oct 18, 2012
f5b74cd
final tweaks to the changes section.
Oct 18, 2012
fa79819
Update urls to match docs convention
pengwynn Oct 18, 2012
f48a221
Updated README.md
parndt Oct 23, 2012
a4ade3c
Document default_branch parameter for repos
pengwynn Oct 23, 2012
f99760a
Post for default branch
pengwynn Oct 24, 2012
7145ef9
Merge pull request #164 from parndt/patch-1
pengwynn Oct 24, 2012
7e51845
add hypermedia to summaries, show commit vs issue summary
technoweenie Oct 24, 2012
8b0c03b
Merge branch 'master' into api-notifications
technoweenie Oct 24, 2012
23fc996
simplified structure
technoweenie Oct 24, 2012
a038f90
Fix missing helper
pengwynn Oct 24, 2012
e4f5b28
only 1 type of notification, dont need the SUMMARIES array anymore
technoweenie Oct 24, 2012
0e45b1e
add the rest of the summary hypermedia urls
technoweenie Oct 24, 2012
c1fc3e8
Add message for 405 status code
pangratz Oct 25, 2012
341f263
Merge pull request #165 from pangratz/add_405_status_code
pengwynn Oct 25, 2012
40b2793
Event polling instructions
technoweenie Oct 25, 2012
ac3ef2c
describe notifications polling
technoweenie Oct 25, 2012
1395c47
add hypermedia urls to subscriptions
technoweenie Oct 25, 2012
283b062
describe activity sub sections
technoweenie Oct 25, 2012
fac7eb4
Intro for Activity
pengwynn Oct 25, 2012
f223a5b
Document 205
pengwynn Oct 25, 2012
40ae5b8
more tweaks
technoweenie Oct 25, 2012
05aad2d
mention the notifications scope
technoweenie Oct 25, 2012
9647a89
list the notifications scope on the OAuth page.
technoweenie Oct 25, 2012
c0fae72
Merge pull request #153 from github/api-notifications
technoweenie Oct 26, 2012
8fd23eb
remove mention of the specific upcoming api version
technoweenie Oct 26, 2012
8dbc53d
mention uri templates
technoweenie Oct 26, 2012
c5bf5da
notifications api post
technoweenie Oct 26, 2012
4674dbe
add terminal styles to curl examples
technoweenie Oct 26, 2012
b988671
woops, should be a PUT
technoweenie Oct 26, 2012
5966449
Add an apostrophe to the commits information page.
Oct 26, 2012
86228e5
Merge pull request #166 from issyl0/master
technoweenie Oct 26, 2012
75f9338
rfc is not a section
technoweenie Oct 26, 2012
98ed088
Remove wild localhost.
sigmavirus24 Oct 27, 2012
012784c
Fix terminology for setting a thread notification
sigmavirus24 Oct 27, 2012
a849213
Merge pull request #167 from sigmavirus24/master
technoweenie Oct 27, 2012
fcd6553
describe the notifications api scopes
technoweenie Oct 29, 2012
13e5a04
Fix URL parameter name
m4tthumphrey Oct 30, 2012
fb64002
Merge pull request #168 from m4tthumphrey/master
pengwynn Oct 30, 2012
0f80ab6
New favicon
pengwynn Oct 30, 2012
76924ab
update doc for changes to gist comment uris
Oct 31, 2012
66813dc
Update examples to show new style gist comment uris
Oct 31, 2012
0543c92
fixed gist comment uris changes entry date
Oct 31, 2012
9fd50eb
update the gist comment url
technoweenie Oct 31, 2012
7edc23c
Merge branch 'gist-comment-uris'
Oct 31, 2012
6290dee
Add note about new `comments_url` on gists and update examples.
Oct 31, 2012
a757127
remove superflous word from changes post
Oct 31, 2012
fdf6ec0
i rite prety some day...
Oct 31, 2012
c9b955a
More spelling/grammar tweaking...
Oct 31, 2012
9d3e206
More word smithing of gist comment uris changes post
Oct 31, 2012
db2a7ff
removed a couple of stray words from gist comments uris post
Oct 31, 2012
0b037eb
document some weird magic Gist behavior
technoweenie Nov 2, 2012
1caede9
Update content/v3/repos/hooks.md
michaeljoseph Nov 2, 2012
45a6969
Merge pull request #169 from michaeljoseph/patch-1
pengwynn Nov 2, 2012
cf676fa
Fixed header level in Orgs/Members docs
doismellburning Nov 7, 2012
5374e9d
Merge pull request #170 from doismellburning/fix_orgs_members_respons…
pengwynn Nov 7, 2012
436c0be
Stub for Getting Started guide
pengwynn Nov 11, 2012
635da8a
Fix OAuth link
pengwynn Nov 12, 2012
dc5c966
Clarify OAuth scopes
pengwynn Nov 12, 2012
6de8415
Correct output for notifications thread response
pengwynn Nov 12, 2012
343fa22
Fix wording for defining 'users followed by a user'
izuzak Nov 12, 2012
d6b0822
Merge pull request #171 from izuzak/master
pengwynn Nov 12, 2012
ed8ec4b
Document 'distinct' field on PushEvent commits
jspahrsummers Nov 12, 2012
04b8aa1
Merge pull request #172 from github/pushevent-commits-distinct
pengwynn Nov 12, 2012
3e6aef0
Moar getting started
pengwynn Nov 14, 2012
c9a5146
Document since parameter for listing gists
pengwynn Nov 15, 2012
5ba8541
added Javascript github wraper.
coderaiser Nov 19, 2012
81cbbc2
Merge pull request #173 from coderaiser/patch-1
pengwynn Nov 19, 2012
5e0c651
Fix 404 event url
pablof7z Nov 20, 2012
d13bb63
Merge pull request #175 from heelhook/patch-1
pengwynn Nov 20, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ We specify the JSON responses in ruby so that we don't have to write
them by hand all over the docs. You can render the JSON for a resource
like this:

<%= json :issue %>
```erb
<%= json :issue %>
```

This looks up `GitHub::Resources::ISSUE` in `lib/resources.rb`.

Some actions return arrays. You can modify the JSON by passing a block:

<%= json(:issue) { |hash| [hash] } %>
```erb
<%= json(:issue) { |hash| [hash] } %>
```

### Terminal blocks

Expand Down
24 changes: 24 additions & 0 deletions content/changes/2012-10-14-rate-limit-changes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
kind: change
title: Rate limit changes for unauthenticated requests
created_at: 2012-10-14
author_name: pengwynn
---

To ensure a high quality of service for all API consumers, we've reduced the
default rate limit for unauthenticated requests. To enjoy the default rate
limit of 5,000 requests per hour, you'll need to
[authenticate](http://developer.github.com/v3/#authentication) via Basic Auth
or OAuth. Unauthenticated requests will be limited to 60 per hour unless you
[include your OAuth client and
secret](http://developer.github.com/v3/#unauthenticated-rate-limited-requests).

We'll soon require all requests to include a valid [User Agent
header](http://en.wikipedia.org/wiki/User_agent). Setting a
unique value for this header helps us identify requests and get in touch with
developers who are abusing the API. Most HTTP libraries, wrapper libraries, and
even cURL provide a valid header for you already and allow you to change it to
something unique to your application.

If you have any questions or feedback, please drop us a line at
[[email protected]](mailto:[email protected]?subject=API Rate limit).
26 changes: 26 additions & 0 deletions content/changes/2012-10-17-org-members-redirection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
kind: change
title: Organization Members Resource Changes
created_at: 2012-10-17
author_name: pezra
---

Requesting the [member list](/v3/orgs/members/index.html#members-list) of an
organization of which you are not a member now redirects to the [public members
list](v3/orgs/members/index.html#public-members-list). Similarly, requests to
[membership check](/v3/orgs/members/index.html#check-membership) resources of
an organization of which you are not a member are redirected to the equivalent
[public membership check](/v3/orgs/members/index.html#check-public-membership).
One exception to the latter case is that if you are checking about your own
membership the request is not redirected. You are always allowed to know what
organizations you belong to.

The changes where made to clarify the purpose of these various resources. The
`/orgs/:org/members` resources are intended for use by members of the
organization in question. The `/orgs/:org/public_members` resources are for
acquiring information about the public membership of organizations. If you are
not a member you are not allowed to see private membership information so you
should be using the public membership resources.

If you have any questions or feedback, please drop us a line at
[[email protected]](mailto:[email protected]?subject=Org members API).
22 changes: 22 additions & 0 deletions content/changes/2012-10-24-set-default-branch.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
kind: change
title: Set the default branch for a repository
created_at: 2012-10-24
author_name: pengwynn
---

You can set the default branch for a repository to something other than 'master' from the GitHub repository admin screen:

![repo admin](/images/posts/default-branch.png)

Now, you can update this setting via the API. We've added a `default_branch` parameter to the [Edit Repository method][edit-repo]:

<pre class="terminal">
curl -u pengwynn \
-d '{"name": "octokit", "default_branch":"development"}' \
https://api.github.com/repos/pengwynn/octokit
</pre>

If you provide a branch name that hasn't been pushed to GitHub, we'll gracefully fall back to `'master'` or the first branch.

[edit-repo]: /v3/repos/#edit
72 changes: 72 additions & 0 deletions content/changes/2012-10-26-notifications-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
kind: change
title: Notifications API
created_at: 2012-10-26
author_name: technoweenie
---

Now that the dust has settled around [Notifications and Stars][newsies],
we've unleashed all that :sparkles: in a [brand new API][api]. You can now
view and mark notifications as read.

[api]: http://developer.github.com/v3/activity/notifications/
[newsies]: https://github.com/blog/1204-notifications-stars

## Endpoint

The core notifications functionality is under the `/notifications` endpoint.
You can look for unread notifications:

<pre class="terminal">
$ curl https://api.github.com/notifications
</pre>

You can filter these notifications to a single Repository:

<pre class="terminal">
$ curl https://api.github.com/repos/technoweenie/faraday/notifications
</pre>

You can mark them as read:

<pre class="terminal">
# all notifications
$ curl https://api.github.com/notifications \
-X PUT -d '{"read": true}'

# notifications for a single repository
$ curl https://api.github.com/repos/technoweenie/faraday/notifications \
-X PUT -d '{"read": true}'
</pre>

You can also modify subscriptions for a Repository or a single thread.

<pre class="terminal">
# subscription details for the thread (either an Issue or Commit)
$ curl https://api.github.com/notifications/threads/1/subscription

# subscription details for a whole Repository.
$ curl https://api.github.com/repos/technoweenie/faraday/subscription
</pre>

## Polling

The Notifications API is optimized for polling by the last modified time:

<pre class="terminal">
# Add authentication to your requests
$ curl -I https://api.github.com/notifications
HTTP/1.1 200 OK
Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT
X-Poll-Interval: 60

# Pass the Last-Modified header exactly
$ curl -I https://api.github.com/notifications
-H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
HTTP/1.1 304 Not Modified
X-Poll-Interval: 60
</pre>

You can read about the API details in depth in the [Notifications documentation][api].


12 changes: 12 additions & 0 deletions content/changes/2012-10-31-gist-comment-uris.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
kind: change
title: Gist comment URIs
created_at: 2012-10-31
author_name: pezra
---

The URIs of all gist comments are changing immediately. The new URI pattern for gist comments is `/gists/{gist-id}/comments/{id}`. (See [gist comments section of the docs](/v3/gists/comments/) for more details.) This change is necessary because the auto-incremented ids of gist comments are easy to guess. This predictability allows anyone to view comments on private Gists with relative ease. Obviously, comments on private gists should be just as private as the gist itself.

Adding the gist id to the URI of comments makes it impossible, in practical terms, to guess that URI because the id of private gists are very large random numbers. This is, unfortunately, a breaking change but one that cannot be avoided because of the security implications of the current URIs. We apologize for the inconvenience.

We have also added a `comments_url` member to the Gist documents. The `comments_url` link provides access to the comments of a Gist in a way that will insulate clients from changes in the URI patterns used by the GitHub API. We are increasing our use of links in order to make changes such as this one less damaging to clients. We strongly encourage using `url` and `*_url` properties, where possible, rather than constructing URIs using the patterns published on this site. Doing so will result in clients that break less often.
50 changes: 50 additions & 0 deletions content/changes/2012-9-28-auto-init-for-repositories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
kind: change
title: Initialize a repository when creating
created_at: 2012-9-28
author_name: pengwynn
---

Today we've made it easier to add commits to a repository via the GitHub API.
Until now, you could [create a repository](/v3/repos/#create), but you would
need to initialize it locally via your Git client before adding any commits via
the API.

Now you can optionally init a repository when it's created by sending `true`
for the `auto_init` parameter:

<pre class="terminal">
curl -i -u pengwynn \
-d '{"name": "create-repo-test", "auto_init": true}' \
https://api.github.com/user/repos
</pre>

The resulting repository will have a README stub and an initial commit.

![create repo screenshot](/images/posts/create-repo-init.png)

### .gitignore templates

Along with this change, you can set up your `.gitignore` template by passing
the basename of any template in the [GitHub gitignore templates
project](https://github.com/github/gitignore).

<pre class="terminal">
curl -i -u pengwynn \
-d '{"name": "create-repo-test", "auto_init": true, \
"gitignore_template": "Haskell"}' \
https://api.github.com/user/repos
</pre>


As the [docs point out](/v3/repos/#create), the `gitignore_template` parameter
is ignored if `auto_init` is not present and `true`.

If you have any questions or feedback, drop us a line at
[https://github.com/contact][c], [[email protected]][email], or
[@GitHubAPI][twitter].

[twitter]: https://twitter.com/githubapi
[email]: mailto:[email protected]
[c]: https://github.com/c

Loading