Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Document v3 media type, emails response #188

Merged
merged 1 commit into from
Dec 18, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 4 additions & 11 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ to the actual date.
We consider the "beta" API unchangeable. [File a support issue](https://github.com/contact)
if you have problems.

#### Expected Changes <a name="changes"></a>
#### Expected Changes

These changes are _not_ implemented, just planned for the next major API version.

Expand All @@ -42,19 +42,10 @@ objects.
* `[ ]` Use the `private` attribute when creating a private repository,
instead of setting `public` to false.
* `[ ]` Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string.
* `[ ]` User Emails come back as a hash instead of a string.

{"email": "email@whatev.com", "state": "verified"}
* `[✓]` <del>User Emails come back [as a hash][v3-email] instead of a string.</del>

### Breaking Beta Changes

##### August 30, 2012
* Added `repo:status` scope
* Added Status API

##### August 7, 2012
* Clarified watching/stargazing

##### June 12, 2012:
* Removed API v1 support
* Removed API v2 support
Expand All @@ -77,3 +68,5 @@ objects.
returned in the Link header instead.
* JSON-P response has completely changed to a more consistent format.
* Starring gists now uses PUT verb (instead of POST) and returns 204.

[v3-email]: /v3/users/emails/#future-response
16 changes: 15 additions & 1 deletion content/v3/media.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ for the `X-GitHub-Media-Type` header:
HTTP/1.1 200 OK
X-GitHub-Media-Type: github.v3; param=full; format=json

For specifics on versions, check the [API changelog](/v3/changelog).

## API v3 media type and the future

Ultimately, we aim for a version-less, [Hypermedia][hypermedia]-driven API.
Before we get there, we [expect a few changes][expected-changes]. As we roll
out these changes, certain methods will support the API v3 media type:

application/vnd.github.v3

We'll clearly mark those methods that publicly support the v3 media type.

**NOTE:** _Using the v3 media type for methods other than those marked may yield
unexpected results._

## Comment Body Properties

Expand Down Expand Up @@ -118,3 +130,5 @@ The Commit, Commit Comparison, and Pull Request resources support
[gfm]:http://github.github.com/github-flavored-markdown/
[git-diff]: http://git-scm.com/docs/git-diff
[git-patch]: http://git-scm.com/docs/git-format-patch
[hypermedia]: /v3/#hypermedia
[expected-changes]: /#expected-changes
15 changes: 15 additions & 0 deletions content/v3/users/emails.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ authenticated.

<%= headers 200 %>
<%= json ["octocat@github.com", "support@github.com"] %>
<br>

#### Future response

In the final version of the API, this method will return an array of hashes
with extended information for each email address indicating if the address has
been verified and if it's the user's primary email address for GitHub.

Until API v3 is finalized, use the `application/vnd.github.v3`
[mediatype][media-types] to get this response format.

<%= headers 200 %>
<%= json(:user_email) {|e| [e]} %>

## Add email address(es)

Expand Down Expand Up @@ -48,3 +61,5 @@ You can include a single email address or an array of addresses:

<%= headers 204 %>


[media-types]: /v3/media
6 changes: 6 additions & 0 deletions lib/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,12 @@ def text_html(response, status, head = {})
"C",
"C++"
]

USER_EMAIL = {
:email => "octocat@github.com",
:verified => true,
:primary => true
}
end
end

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy