Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
Regenerate pages
Browse files Browse the repository at this point in the history
  • Loading branch information
paul committed Aug 2, 2012
1 parent ee67362 commit 444f1b4
Show file tree
Hide file tree
Showing 8 changed files with 2,590 additions and 126 deletions.
346 changes: 346 additions & 0 deletions general/mime_type.html
@@ -0,0 +1,346 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>GitHub API Documentation - Mime Type</title>
<link rel="icon" type="image/png" href="./favicon.ico" />
<link rel="stylesheet" href="./stylesheets/main.css" type="text/css" />
</head>
<body>

<header>
<div class="wrapper">
<a href="/" class="logo"><img src="./images/main/octocat-brand.png" width="32" height="32" /></a>

<nav role="alternate">
<ul>
<li>logged in as <a href="https://github.com/paul">paul</a></li>
<li><a href="/logout">logout</a></li>
</ul>
</nav>

<form action="/search" method="get" class="search">
<input type="text" name="q" placeholder="Search API Documentation" value="" />
</form>
</div>
</header>

<div id="wrapper">

<nav role="main">
<h1>Table of Contents</h1>
<ul class='categories'>
<li class='category'>
<a href="#general">General</a>
</li>
<ul class='pages'>
<li class='page'>
<a href="#mime-type">Mime Type</a>
</li>
<li class='page'>
<a href="#quick-reference">Quick Reference</a>
</li>
</ul>
<li class='category'>
<a href="#user">User</a>
</li>
<ul class='pages'>
<li class='page'>
<a href="#user-representation">Representation</a>
</li>
<li class='page'>
<a href="#retrieve-current-user">Retrieve current user</a>
</li>
<li class='page'>
<a href="#update-current-user">Update current user</a>
</li>
<li class='page'>
<a href="#fetch-user-by-login">Fetch user by login</a>
</li>
</ul>
</ul>

</nav>

<h1>GitHub API</h1>

<p>This describes the resources that make up the official GitHub API v3. If<br>
you have any problems or requests please contact<br>
<a href="mailto:support@github.com?subject=APIv3">support</a>.</p>

<p>View the <a href="/v3/changelog">API Changelog</a> for information on existing and<br>
planned changes to the API.</p>
<h1>Content Type</h1>

<p>The GitHub API uses a vendor-specific mime type for web service requests and responses.</p>

<pre><code>application/vnd.github.v3+json
</code></pre>

<p>We also accept the common <code>application/json</code> as an alias, but strongly discourage its use. It will always be mapped to the latest version of the API. If we upgrade the API at some point in the future, and you are relying on the previous version, bad things will probably happen.</p>
<h1>Quick Reference</h1>
<h2>
<a href="#user">User</a>
</h2>
<table class='quickref'>
<thead>
<tr>
<th>Usage</th>
<th>Supported Methods</th>
<th>URL</th>
</tr>
</thead>
<tbody>
<tr>
<td class='usage'>
<a href="#retrieve-current-user">Retrieve current user</a>
</td>
<td class='method'>
GET
</td>
<td class='url'>
/user
</td>
</tr>
<tr>
<td class='usage'>
<a href="#update-current-user">Update current user</a>
</td>
<td class='method'>

</td>
<td class='url'>
/user
</td>
</tr>
<tr>
<td class='usage'>
<a href="#fetch-user-by-login">Fetch user by login</a>
</td>
<td class='method'>
GET
</td>
<td class='url'>
/users/{login}
</td>
</tr>
</tbody>
</table>
<h1>User</h1>

<p>A <strong>User</strong> represents a person or automated actor on GitHub. They may own and<br>
contribute to <a href="#repository">repositories</a> and belong to zero or more<br>
<a href="#organization">organizations</a>. Users have email addresses and ssh keys, as well<br>
as other relevant profile data.</p>
<h2 id='user-representation'>Representation</h2>
<h3>Attributes</h3>
<dl class='attributes'>
<dt>login</dt>
<dd class='tags'>
<ul>
<li>string</li>
</ul>
</dd>
<dd>The login name for the user</dd>
<dt>name</dt>
<dd class='tags'>
<ul>
<li>string</li>
</ul>
</dd>
<dd>The user's meatspace name</dd>
<dt>last_login</dt>
<dd class='tags'>
<ul>
<li>iso8601</li>
</ul>
</dd>
<dd>Date and time of the user's last login to github.com</dd>
</dl>
<h3>Links</h3>
<dl class='attributes links'>
<dt>organizations_href</dt>
<dd class='tags'>
<ul>
<li>organization</li>
</ul>
</dd>
<dd>[Organizations](#organization) of which this user is a public member</dd>
<dt>emails_href</dt>
<dd class='tags'>
<ul>
<li>email</li>
</ul>
</dd>
<dd>The public [emails](#mail) registered to this user</dd>
<dt>ssh_keys</dt>
<dd class='tags'>
<ul>
<li>key</li>
</ul>
</dd>
<dd>Public [SSH keys](#ssh_key) for this user</dd>
</dl>
<h3>Example</h3>
<pre><code>{
"followers": 37,
"type": "User",
"gravatar_id": "d587890d0fcf8f45724baa8b1bfe1bf4",
"hireable": false,
"avatar_url": "https://secure.gravatar.com/avatar/d587890d0fcf8f45724baa8b1bfe1bf4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
"blog": "blog.theamazingrando.com",
"public_gists": 323,
"bio": "The GitHub API Dude",
"login": "paul",
"following": 1,
"company": "GitHub",
"location": "Boulder, CO",
"email": "psadauskas@gmail.com",
"public_repos": 83,
"created_at": "2008-02-11T18:44:09Z",
"html_url": "https://github.com/paul",
"name": "Paul Sadauskas",
"url": "https://api.github.com/users/paul",
"id": 184
}</code></pre>
<h2 id='retrieve-current-user'>Retrieve current user</h2>
<pre><code>GET /user</code></pre>
<p class='alert'>Requires authentication</p>
<p>You can use <code>/user</code> to get the currently logged in user. This is a shortcut to <code>/user/{login}</code> for<br>
your particular login.</p>

<pre lang="bash"><code>curl -u &quot;paul:{{password}}&quot; \
-H &quot;Accept: application/vnd.github.v3+json&quot; \
https://api.github.com/user

{
&quot;html_url&quot;: &quot;https://github.com/paul&quot;,
&quot;type&quot;: &quot;User&quot;,
&quot;email&quot;: &quot;psadauskas@gmail.com&quot;,
&quot;created_at&quot;: &quot;2008-02-11T18:44:09Z&quot;,
&quot;blog&quot;: &quot;blog.theamazingrando.com&quot;,
&quot;hireable&quot;: false,
&quot;collaborators&quot;: 3,
&quot;public_repos&quot;: 83,
&quot;followers&quot;: 37,
&quot;gravatar_id&quot;: &quot;d587890d0fcf8f45724baa8b1bfe1bf4&quot;,
&quot;bio&quot;: &quot;The GitHub API Dude&quot;,
&quot;public_gists&quot;: 323,
&quot;total_private_repos&quot;: 5,
&quot;disk_usage&quot;: 57572,
&quot;private_gists&quot;: 103,
&quot;following&quot;: 1,
&quot;company&quot;: &quot;GitHub&quot;,
&quot;location&quot;: &quot;Boulder, CO&quot;,
&quot;owned_private_repos&quot;: 5,
&quot;plan&quot;: {
&quot;collaborators&quot;: 100,
&quot;private_repos&quot;: 300,
&quot;name&quot;: &quot;giga&quot;,
&quot;space&quot;: 62914560
},
&quot;name&quot;: &quot;Paul Sadauskas&quot;,
&quot;url&quot;: &quot;https://api.github.com/users/paul&quot;,
&quot;avatar_url&quot;: &quot;https://secure.gravatar.com/avatar/d587890d0fcf8f45724baa8b1bfe1bf4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png&quot;,
&quot;id&quot;: 184,
&quot;login&quot;: &quot;paul&quot;
}

</code></pre>

<pre lang="ruby"><code>@github = GitHub::Client.new(token)
@github.current_user

-- No result, because I don&#39;t know what to do with &quot;ruby&quot;
</code></pre>
<h2 id='update-current-user'>Update current user</h2>
<pre><code></code></pre>
<p class='alert'>Requires authentication</p>
<p>To update your user profile data, you can <code>PUT</code> (or <code>PATCH</code>) some the <a href="#user">user</a> attributes you want modified.</p>

<pre lang="bash"><code>curl -u &quot;paul:{{password}}&quot; \
-H &quot;Accept: application/vnd.github.v3+json&quot; \
-H &quot;Content-Type: application/vnd.github.v3+json&quot; \
-d &#39;{&quot;bio&quot;: &quot;The GitHub API Dude&quot;}&#39; \
https://api.github.com/user

{
&quot;html_url&quot;: &quot;https://github.com/paul&quot;,
&quot;type&quot;: &quot;User&quot;,
&quot;email&quot;: &quot;psadauskas@gmail.com&quot;,
&quot;created_at&quot;: &quot;2008-02-11T18:44:09Z&quot;,
&quot;blog&quot;: &quot;blog.theamazingrando.com&quot;,
&quot;hireable&quot;: false,
&quot;public_gists&quot;: 323,
&quot;followers&quot;: 37,
&quot;bio&quot;: &quot;The GitHub API Dude&quot;,
&quot;gravatar_id&quot;: &quot;d587890d0fcf8f45724baa8b1bfe1bf4&quot;,
&quot;total_private_repos&quot;: 5,
&quot;private_gists&quot;: 103,
&quot;collaborators&quot;: 3,
&quot;disk_usage&quot;: 57572,
&quot;owned_private_repos&quot;: 5,
&quot;public_repos&quot;: 83,
&quot;following&quot;: 1,
&quot;company&quot;: &quot;GitHub&quot;,
&quot;location&quot;: &quot;Boulder, CO&quot;,
&quot;avatar_url&quot;: &quot;https://secure.gravatar.com/avatar/d587890d0fcf8f45724baa8b1bfe1bf4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png&quot;,
&quot;plan&quot;: {
&quot;private_repos&quot;: 300,
&quot;collaborators&quot;: 100,
&quot;name&quot;: &quot;giga&quot;,
&quot;space&quot;: 62914560
},
&quot;name&quot;: &quot;Paul Sadauskas&quot;,
&quot;url&quot;: &quot;https://api.github.com/users/paul&quot;,
&quot;id&quot;: 184,
&quot;login&quot;: &quot;paul&quot;
}

</code></pre>

<p>The API will return 200 OK and the updated <a href="#user">user</a> in the response body, or an [error][#errors] if there was a problem.</p>
<h2 id='fetch-user-by-login'>Fetch user by login</h2>
<pre><code>GET /users/{login}</code></pre>
<p>To lookup a particular user&#39;s public profile data, you can find them by their login name.</p>

<pre lang="bash"><code>curl -H &quot;Accept: application/vnd.github.v3+json&quot; \
https://api.github.com/users/paul

{
&quot;html_url&quot;: &quot;https://github.com/paul&quot;,
&quot;type&quot;: &quot;User&quot;,
&quot;email&quot;: &quot;psadauskas@gmail.com&quot;,
&quot;hireable&quot;: false,
&quot;created_at&quot;: &quot;2008-02-11T18:44:09Z&quot;,
&quot;blog&quot;: &quot;blog.theamazingrando.com&quot;,
&quot;public_repos&quot;: 83,
&quot;bio&quot;: &quot;The GitHub API Dude&quot;,
&quot;followers&quot;: 37,
&quot;gravatar_id&quot;: &quot;d587890d0fcf8f45724baa8b1bfe1bf4&quot;,
&quot;following&quot;: 1,
&quot;company&quot;: &quot;GitHub&quot;,
&quot;location&quot;: &quot;Boulder, CO&quot;,
&quot;name&quot;: &quot;Paul Sadauskas&quot;,
&quot;url&quot;: &quot;https://api.github.com/users/paul&quot;,
&quot;avatar_url&quot;: &quot;https://secure.gravatar.com/avatar/d587890d0fcf8f45724baa8b1bfe1bf4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png&quot;,
&quot;id&quot;: 184,
&quot;public_gists&quot;: 323,
&quot;login&quot;: &quot;paul&quot;
}

</code></pre>

<pre lang="ruby"><code>@github = GitHub::Client.new(token)
@github.current_user

-- No result, because I don&#39;t know what to do with &quot;ruby&quot;
</code></pre>


</div><!-- /#wrapper -->

</body>
</html>


0 comments on commit 444f1b4

Please sign in to comment.