Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #77 from jgable/addRepoReleases
Browse files Browse the repository at this point in the history
Add repo releases
  • Loading branch information
pksunkara committed Dec 7, 2013
2 parents cb4beff + ab6aac4 commit fe1ce37
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ ghrepo.commit('18293abcd72', callback); //commit
ghrepo.tags(callback); //array of tags 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) #### Get the languages for a repository (GET /repos/pksunkara/hub/languages)


```js ```js
Expand Down
13 changes: 13 additions & 0 deletions lib/octonode/repo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/octonode/repo.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ class Repo
return cb(err) if err return cb(err) if err
if s isnt 200 then cb(new Error("Repo tags error")) else cb null, b, h 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 # Get the languages for a repository
# '/repos/pksunkara/hub/languages' GET # '/repos/pksunkara/hub/languages' GET
languages: (cb) -> languages: (cb) ->
Expand Down

0 comments on commit fe1ce37

Please sign in to comment.