forked from github/developer.github.com
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add events api docs, start on event type docs
- Loading branch information
1 parent
a5cf0e1
commit 39b8fce
Showing
4 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: Events | GitHub API | ||
--- | ||
|
||
# Events | ||
|
||
This is a read-only API to the GitHub events. These events power the | ||
various activity streams on the site. | ||
|
||
All Events have the same response format: | ||
|
||
<%= headers 200, :pagination => true %> | ||
<%= json(:event) { |h| [h] } %> | ||
|
||
## List public events | ||
|
||
GET /events | ||
|
||
## List repository events | ||
|
||
GET /repos/:user/:repo/events | ||
|
||
## List issue events for a repository | ||
|
||
GET /repos/:user/:repo/issues/events | ||
|
||
## List public events for a network of repositories | ||
|
||
GET /networks/:user/:repo/events | ||
|
||
## List public events for an organization | ||
|
||
GET /orgs/:org/events | ||
|
||
## List events that a user has received | ||
|
||
These are events that you've received by watching repos and following | ||
users. If you are authenticated as the given user, you will see private | ||
events. Otherwise, you'll only see public events. | ||
|
||
GET /users/:user/received_events | ||
|
||
## List public events that a user has received | ||
|
||
GET /users/:user/received_events/public | ||
|
||
## List events performed by a user | ||
|
||
If you are authenticated as the given user, you will see your private | ||
events. Otherwise, you'll only see public events. | ||
|
||
GET /users/:user/events | ||
|
||
## List public events performed by a user | ||
|
||
GET /users/:user/events/public | ||
|
||
## List events for an organization | ||
|
||
This is the user's organization dashboard. You must be authenticated as | ||
the user to view this. | ||
|
||
GET /users/:user/events/orgs/:org | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Event types | GitHub API | ||
--- | ||
|
||
# Event Types | ||
|
||
Each event has a similar JSON schema, but a unique `payload` object that is | ||
determined by its event type. [Repository hook](http://developer.github.com/v3/repos/hooks/) names relate to event types, and will have the exact same payload. The only exception to this is the `push` hook, which has a larger, more detailed payload. | ||
|
||
## PushEvent | ||
|
||
Hook name: push | ||
|
||
head | ||
: **string** - The SHA of the HEAD commit on the repository. | ||
|
||
ref | ||
: **string** - The full Git ref that was pushed. Example: | ||
"refs/heads/master" | ||
|
||
size | ||
: **integer** - The number of commits in the push. | ||
|
||
commits | ||
: **array** - The list of pushed commits. | ||
|
||
commits[][sha] | ||
: **string** - The SHA of the commit. | ||
|
||
commits[][message] | ||
: **message** - The commit message. | ||
|
||
commits[][author] | ||
: **object** - The git author of the commit. | ||
|
||
commits[][author][name] | ||
: **string** - The git author's name. | ||
|
||
commits[][author][email] | ||
: **string** - The git author's email address. | ||
|
||
commits[][url] | ||
: **url** - Points to the commit API resource. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters