Skip to content

Commit

Permalink
document the new blob/full call, as well as ways to get just the meta…
Browse files Browse the repository at this point in the history
… data of single blobs
  • Loading branch information
technoweenie committed May 27, 2010
1 parent 1122170 commit 832d12f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions _posts/2010-04-23-object.markdown
Expand Up @@ -81,6 +81,17 @@ For example, to get the README.txt metadata from a specific tree in Facebox:
Need help? Join our Google Groups mailing list:
http://groups.google.com/group/facebox/

If you want just the meta data and not the blob data, pass a `?code` parameter:

$ curl http://github.com/api/v2/yaml/blob/show/defunkt/facebox/365b84e0fd92c47ecdada91da47f2d67500b8e31/README.txt?meta=1
---
blob:
name: README.txt
size: 178
sha: d4fc2d5e810d9b4bc1ce67702603080e3086a4ed
mode: "100644"
mime_type: text/plain

You can also get a list of all blobs (their names and shas) for a
specific SHA:

Expand Down Expand Up @@ -120,6 +131,18 @@ For example, to get all blobs for Facebox:
screenshots/photo_small.png: 933df8b638d4ada
remote.html: 98d3e92373d1bc5

If you want to get the metadata of each blob (including sha, name, and mime type), use:

blob/full/:user/:repo/:tree_sha

$ curl http://github.com/api/v2/yaml/blob/full/defunkt/facebox/365b84e0fd92c47ecdada91da47f2d67500b8e31
---
blobs:
- name: README.txt
sha: d4fc2d5e810d9b4bc1ce67702603080e3086a4ed
mode: "100644"
mime_type: text/plain

### Raw Git Data ###

You can get the contents of a blob with the blob's SHA via:
Expand Down

0 comments on commit 832d12f

Please sign in to comment.