Skip to content

Commit

Permalink
generated new pages
Browse files Browse the repository at this point in the history
  • Loading branch information
schacon committed Sep 23, 2009
1 parent 517b2fd commit 1f976fa
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 29 deletions.
85 changes: 56 additions & 29 deletions p/object.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ <h2 id='git_object_api'>Git Object API</h2>

<h3 id='trees'>Trees</h3>

<p>Can get the contents of a tree by tree sha</p>
<p>Can get the contents of a tree by tree SHA</p>

<pre><code>tree/show/:user/:repo/:tree_sha</code></pre>

<p>To get a listing of the root tree for the facebox project from our commit listing, we can call this:</p>

<pre><code>$ curl http://github.com/api/v2/yaml/tree/show/defunkt/facebox/f7a5de2e224ec94182a3c2c081f4e7f4df70da4
<pre><code>$ curl http://github.com/api/v2/yaml/tree/show/defunkt/facebox/a47803c9ba26213ff194f042ab686a7749b17476
---
tree:
- name: .gitignore
Expand All @@ -65,17 +65,43 @@ <h3 id='trees'>Trees</h3>
- name: bl.png
sha: f6271859d51654b6fb2719df5fe192c8398ecefc
mode: &quot;100644&quot;
type: blob
- name: br.png
sha: 31f204fc451cd9dd5cfdadfad2d86ed0e1104882
mode: &quot;100644&quot;
type: blob
- name: build_tar.sh
sha: 08f6f1fce2f6a02dcb15b6c66244470794587bb0
mode: &quot;100755&quot;
type: blob
- name: closelabel.gif
sha: 87b4f8bd699386e3a6fcc2e50d7c61bfc4aabb8d
mode: &quot;100755&quot;
type: blob
- name: facebox.css
sha: 08e190d5f81959d73d2bdd3e4f752271800886bf
mode: &quot;100644&quot;
type: blob
- name: facebox.js
sha: 43245f3b1b50a0568ece00b44d2dc67be413f2a4
mode: &quot;100644&quot;
type: blob
- name: faceplant.css
sha: dc61a86c3f342b930f0a0447cae33fee812e27d3
mode: &quot;100644&quot;
type: blob</code></pre>

<p>(Output truncated for display purposes).</p>

<h3 id='blobs'>Blobs</h3>

<p>Can get the data about a blob by tree sha and path</p>
<p>Can get the data about a blob by tree SHA and path</p>

<pre><code>blob/show/:user/:repo/:tree_sha/:path</code></pre>

<p>For example, to get the README.txt metadata from a specific tree in Facebox:</p>

<pre><code>$ curl http://localhost:3000/api/v2/yaml/blob/show/defunkt/facebox/f7a5de2e224ec94182a3c2c081f4e7f4d/README.txt
<pre><code>$ curl http://github.com/api/v2/yaml/blob/show/defunkt/facebox/365b84e0fd92c47ecdada91da47f2d67500b8e31/README.txt
---
blob:
name: README.txt
Expand All @@ -85,13 +111,13 @@ <h3 id='blobs'>Blobs</h3>
mime_type: text/plain
data: |
Please visit http://famspam.com/facebox/ or open index.html in your favorite browser.

Need help? Join our Google Groups mailing list:
http://groups.google.com/group/facebox/</code></pre>

<h3 id='raw_git_data'>Raw Git Data</h3>

<p>You can get the contents of a blob with the blobs s via:</p>
<p>You can get the contents of a blob with the blob&#8217;s SHA via:</p>

<pre><code>blob/show/:user/:repo/:sha</code></pre>

Expand All @@ -107,29 +133,30 @@ <h3 id='raw_git_data'>Raw Git Data</h3>

<p>You can actually get raw trees and commits this way, too. If you give it a tree SHA instead, you&#8217;ll get this:</p>

<pre><code>$ curl http://github.com/api/v2/yaml/blob/show/defunkt/facebox/f7a5de2e224ec94182a3c2c081f4e7f4d
100644 blob e43b0f988953ae3a84b00331d0ccf5f7d51cb3cf .gitignore
100644 blob d4fc2d5e810d9b4bc1ce67702603080e3086a4ed README.txt
100644 blob f184e6269b343014f58694093b55558dd5dde193 b.png
100644 blob f6271859d51654b6fb2719df5fe192c8398ecefc bl.png
100644 blob 31f204fc451cd9dd5cfdadfad2d86ed0e1104882 br.png
100755 blob 08f6f1fce2f6a02dcb15b6c66244470794587bb0 build_tar.sh
100755 blob 87b4f8bd699386e3a6fcc2e50d7c61bfc4aabb8d closelabel.gif
100644 blob 97ebe3cab3eab76253f9cc5fc894b339456da86e facebox.css
100644 blob 2ea88c96ebb00d38d5ae6abad57c917f156802cc facebox.js
100644 blob dc61a86c3f342b930f0a0447cae33fee812e27d3 faceplant.css
100644 blob 355442b51047a30479c21096e06e0906e4e9a4ee index.html
100644 blob ebe02bdd357c337e0e817fcbce2a034a54a13287 jquery.js
100755 blob f864d5fd38b7466c76b5a36dc0e3e9455c0126e2 loading.gif
100644 blob e41cfe5c654e8e05ad46f15af1c462a1360e9764 logo.png
040000 tree 82e3a754b6a0fcb238b03c0e47d05219fbf9cf89 releases
100644 blob 98d3e92373d1bc541e7f516e5e73b645a991ddc2 remote.html
040000 tree bbf747873075ac28667d246491ffdefbd314fe4f screenshots
100644 blob e58b35b362ce5347bb5064e91a3bf8e4fed4f6ef shadow.gif
100644 blob 63459bb418f5f6d896a8eb925c01f45024933ed6 stairs.jpg
100644 blob 38756c5ecc3ce53b8da9555a497bd9cc20b1b1c9 test.html
100644 blob d99c8f6c6eaa12d7b49a20f41f08a5006f3ea8b7 tl.png
100644 blob e99b6ec8310e859fd27519694f04e1babf2ab2c4 tr.png</code></pre>
<pre><code>$ curl http://github.com/api/v2/yaml/blob/show/defunkt/facebox/73afb1ed4d16d084eee5696fcf25cd4b03b9201e
100644 blob e43b0f988953ae3a84b00331d0ccf5f7d51cb3cf .gitignore
100644 blob d4fc2d5e810d9b4bc1ce67702603080e3086a4ed README.txt
100644 blob f184e6269b343014f58694093b55558dd5dde193 b.png
100644 blob f6271859d51654b6fb2719df5fe192c8398ecefc bl.png
100644 blob 31f204fc451cd9dd5cfdadfad2d86ed0e1104882 br.png
100755 blob 08f6f1fce2f6a02dcb15b6c66244470794587bb0 build_tar.sh
100755 blob 87b4f8bd699386e3a6fcc2e50d7c61bfc4aabb8d closelabel.gif
100644 blob 97ebe3cab3eab76253f9cc5fc894b339456da86e facebox.css
100644 blob 932664fafa412478a06b86de0fe8eefe00441289 facebox.js
100644 blob dc61a86c3f342b930f0a0447cae33fee812e27d3 faceplant.css
100644 blob a9d1c235d08ae383e4d9dedf5e2cc0236defdaa6 index.html
100644 blob ebe02bdd357c337e0e817fcbce2a034a54a13287 jquery.js
100755 blob f864d5fd38b7466c76b5a36dc0e3e9455c0126e2 loading.gif
100644 blob e41cfe5c654e8e05ad46f15af1c462a1360e9764 logo.png
040000 tree 82e3a754b6a0fcb238b03c0e47d05219fbf9cf89 releases
100644 blob 98d3e92373d1bc541e7f516e5e73b645a991ddc2 remote.html
040000 tree bbf747873075ac28667d246491ffdefbd314fe4f screenshots
100644 blob e58b35b362ce5347bb5064e91a3bf8e4fed4f6ef shadow.gif
100644 blob 63459bb418f5f6d896a8eb925c01f45024933ed6 stairs.jpg
100644 blob 0a279c66167d358e40682186864935d0f856c4c4 test.html
100644 blob 0249382efbdc7412a67976d19154ef07ac51437f test_programmatic.html
100644 blob d99c8f6c6eaa12d7b49a20f41f08a5006f3ea8b7 tl.png
100644 blob e99b6ec8310e859fd27519694f04e1babf2ab2c4 tr.png</code></pre>

<p>Here is an example of a commit:</p>

Expand Down
15 changes: 15 additions & 0 deletions p/repo.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,21 @@ <h3 id='network'>Network</h3>
:homepage: http://jointheconversation.org/rubygit/
...</code></pre>

<h3 id='language_breakdown'>Language Breakdown</h3>

<p>To see a list of the languages used in a particular repository, you can call the language breakdown API. Values are in bytes calculated.</p>

<pre><code>/repos/show/:user/:repo/languages</code></pre>

<p>You can get the language breakdown for mojombo/grit like this:</p>

<pre><code>$ curl http://github.com/api/v2/yaml/repos/show/mojombo/grit/languages
---
languages:
Ruby: 35097</code></pre>

<p>Note that this is based on a very simple algorithm and is not perfect. Common large libraries are removed and languages are solely identified by file extension.</p>

<h3 id='repository_refs'>Repository Refs</h3>

<p>To get a list of tags on your repo</p>
Expand Down
31 changes: 31 additions & 0 deletions p/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,37 @@ <h3 id='following_network'>Following Network</h3>

/user/unfollow/:user [POST]</code></pre>

<h3 id='watched_repos'>Watched Repos</h3>

<p>To see which repositories a user is watching, you can call:</p>

<pre><code>/repos/watched/:user</code></pre>

<p>For example,</p>

<pre><code>$ curl http://github.com/api/v2/yaml/repos/watched/schacon
repositories:
- :watchers: 42
:owner: ddollar
:name: git-db
:description: CouchDB-based git server
:private: false
:url: http://github.com/ddollar/git-db
:open_issues: 0
:fork: false
:homepage: http://github.com/ddollar/git-db
:forks: 2
- :watchers: 2
:owner: schacon
:name: git-db
:description: CouchDB-based git server
:private: false
:url: http://github.com/schacon/git-db
:open_issues: 0
:fork: true
:homepage: http://github.com/ddollar/git-db
:forks: 0</code></pre>

<h4 id='public_key_management'>Public Key Management</h4>

<pre><code> /user/keys
Expand Down

0 comments on commit 1f976fa

Please sign in to comment.