From 3dfaa3f9be94500fa1439d996b226f31a878f629 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 2 Jun 2010 16:43:59 -0700 Subject: tweak api guide --- _posts/2010-01-16-api.markdown | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to '_posts/2010-01-16-api.markdown') diff --git a/_posts/2010-01-16-api.markdown b/_posts/2010-01-16-api.markdown index 77820dc..051812f 100644 --- a/_posts/2010-01-16-api.markdown +++ b/_posts/2010-01-16-api.markdown @@ -4,38 +4,7 @@ title: GitHub API categories: other --- -__This page is for version 1 of the API. While this API still works, it has been replaced. We highly recommend you use the [new version](http://develop.github.com/).__ - -The API -======= - -Request will follow a common URL pattern: - - http://github.com/api/v1/:format/:username/:repository/:type/:object - -* Acceptable formats: json, xml, yaml - -* Acceptable types: commits, commit - -Grabbing all recent commits: - - $ curl -i http://github.com/api/v1/xml/caged/gitnub/commits/master | less - -Grabbing a single commit: - - $ curl -i http://github.com/api/v1/json/defunkt/github-gem/commit/c26d4ce9807ecf57d3f9eefe19ae64e75bcaaa8b | less - -Repository search: - - $ curl -i http://github.com/api/v1/xml/search/merb | less - -You can also grab a user's info, including a list of his repositories (Using [token authentication](http://github.com/blog/170-token-authentication) will enable listing of private repositories.): - - $ curl -i http://github.com/api/v1/json/defunkt | less - -With JSON requests, you can have the result passed to a callback method of your choice: - - $ curl -i http://github.com/api/v1/json/defunkt?callback=myCallbackMethod | less +The GitHub API is documented at Projects using the API ====================== -- cgit v1.3.1