Permalink
Browse files

add basic gist api docs

  • Loading branch information...
1 parent 2e3d377 commit b762b1e0b1ee310c7140a5363e83a01a0c549811 @defunkt defunkt committed Apr 23, 2010
Showing with 61 additions and 12 deletions.
  1. +58 −10 _posts/2010-04-23-gist.markdown
  2. +3 −2 index.html
@@ -1,29 +1,77 @@
+---
+layout: default
+title: Commits API
+---
+
## Gist API ##
-The API for the Gist code paste service.
-
-### Find A Gist ###
+The API for the [Gist](http://gist.github.com) code paste
+service. Gist's API is a bit different from GitHub proper's - the
+domain is always `gist.github.com` and we're still on `v1`.
+
+### Get a Gist's Metadata ###
+
+ http://gist.github.com/api/v1/:format/:gist_id
+
+Example:
+
+ $ curl http://gist.github.com/api/v1/yaml/374130
+ ---
+ gists:
+ - :description: List what ports are in use on OS X
+ :repo: "374130"
+ :public: true
+ :created_at: 2010-04-21 10:24:32 -07:00
+ :files: ["ports.sh"]
+
+### Get a Gist's Content ###
+
+ http://gist.github.com/raw/:gist_id/:filename
+Example:
-### My Public/Private Gists ###
+ $ curl http://gist.github.com/raw/374130/ports.sh
+ # List what ports are in use on OS X
+ sudo lsof -iTCP -sTCP:LISTEN -P
+### Another User's Public Gists ###
-### Another Users Public Gists ###
+ http://gist.github.com/api/v1/:format/gists/:login
+Example:
+
+ $ curl http://gist.github.com/api/v1/yaml/gists/defunkt
+ ---
+ gists:
+ - :description: List what ports are in use on OS X
+ :repo: "374130"
+ :public: true
+ :created_at: 2010-04-21 10:24:32 -07:00
+ - :description: A list of Gist clients.
+ :repo: "370230"
+ :public: true
+ :created_at: 2010-04-18 07:09:27 -07:00
+ - :description: Awesome option parsing.
+ :repo: "359895"
+ :public: true
+ :created_at: 2010-04-08 01:09:29 -07:00
+
+### My Public & Private Gists ###
+
+Coming soon
### Create a New Gist ###
+Coming soon.
### Fork a Gist ###
+Coming soon.
### Delete a Gist ###
+Coming soon.
### Edit a Gist ###
-(description)
-
-(files)
-
-
+Coming soon.
View
@@ -1,6 +1,6 @@
---
layout: default
-title: ones zeros majors and minors
+title: Home
---
<div class="span-21" id="welcome">
@@ -24,11 +24,12 @@ <h1>Welcome to the GitHub Developer site</h1>
<p>Listing issues, searching, editing and closing your projects issues.</p>
</div>
- <!--
<div class='episode'>
<div class="title"><a href="p/gist.html">Gist API</a></div>
<p>Listing your Gists, finding, editing and deleting specific Gists and creating new Gists.</p>
</div>
+
+ <!--
<div class='episode'>
<div class="title">Messaging API</div>
<p>Listing your messages, deleting messages and sending messages to other users.</p>

0 comments on commit b762b1e

Please sign in to comment.