Permalink
Browse files

Merge pull request #77 from jgable/addRepoReleases

Add repo releases
  • Loading branch information...
pksunkara committed Dec 7, 2013
2 parents cb4beff + ab6aac4 commit fe1ce374e99387344f123db6048fecdda4d1c7d3
Showing with 26 additions and 0 deletions.
  1. +6 −0 README.md
  2. +13 −0 lib/octonode/repo.js
  3. +7 −0 src/octonode/repo.coffee
View
@@ -437,6 +437,12 @@ ghrepo.commit('18293abcd72', callback); //commit
ghrepo.tags(callback); //array of tags
```
+#### Get the releases for a repository (GET /repos/pksunkara/hub/releases)
+
+```js
+ghrepo.releases(callback); //array of releases
+```
+
#### Get the languages for a repository (GET /repos/pksunkara/hub/languages)
```js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -57,6 +57,13 @@ class Repo
return cb(err) if err
if s isnt 200 then cb(new Error("Repo tags error")) else cb null, b, h
+ # Get the releases for a repository
+ # '/repos/pksunkara/hub/releases' GET
+ releases: (cb) ->
+ @client.get "/repos/#{@name}/releases", (err, s, b, h) ->
+ return cb(err) if err
+ if s isnt 200 then cb(new Error("Repo releases error")) else cb null, b, h
+
# Get the languages for a repository
# '/repos/pksunkara/hub/languages' GET
languages: (cb) ->

0 comments on commit fe1ce37

Please sign in to comment.