Skip to content
Browse files

document the new blob/full call, as well as ways to get just the meta…

… data of single blobs
  • Loading branch information...
1 parent 1122170 commit 832d12fcfda9eb985d4b474f77dba80cfd4f55f0 @technoweenie technoweenie committed
Showing with 23 additions and 0 deletions.
  1. +23 −0 _posts/2010-04-23-object.markdown
View
23 _posts/2010-04-23-object.markdown
@@ -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:
@@ -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:

0 comments on commit 832d12f

Please sign in to comment.
Something went wrong with that request. Please try again.