Skip to content

Commit

Permalink
Added API docs for new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilger committed Jun 24, 2011
1 parent c8cd183 commit 6bba4a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/github_v3_api/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Org < Entity
:private_gists, :private_repos, :public_gists, :public_repos, :space,
:total_private_repos, :type, :url

# Returns an array of GitHubV3API::Repo instances representing the repos
# that belong to this org
def repos
api.list_repos(login)
end
Expand Down
4 changes: 4 additions & 0 deletions lib/github_v3_api/orgs_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def get(org_login)
GitHubV3API::Org.new_with_all_data(self, org_data)
end

# Returns an array of GitHubV3API::Repo instances representing the repos
# that belong to the specified org.
#
# +org_login+:: the string ID of the organization, e.g. "github"
def list_repos(org_login)
@connection.get("/orgs/#{org_login}/repos").map do |repo_data|
GitHubV3API::Repo.new(@connection.repos, repo_data)
Expand Down

0 comments on commit 6bba4a8

Please sign in to comment.