Permalink
Browse files

Add Contents API

  • Loading branch information...
devth committed Sep 29, 2012
1 parent 68d4028 commit 13315782a47e342941b154ea3dd9434698f9d915
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/tentacles/repos.clj
View
@@ -402,4 +402,16 @@
user repo event)
"hub.callback" callback}
(when-let [secret (:secret options)]
- {"hub.secret" secret}))})))
+ {"hub.secret" secret}))})))
+
+;; ## Repo Contents API
+
+(defn readme
+ "Get the preferred README for a repository."
+ [user repo options]
+ (api-call :get "repos/%s/%s/readme" [user repo] options))
+
+(defn contents
+ "Get the contents of any file or directory in a repository."
+ [user repo path options]
+ (api-call :get "repos/%s/%s/contents/%s" [user repo path] options))

0 comments on commit 1331578

Please sign in to comment.