class Github::GitData::Trees
def get(user_name, repo_name, sha, params={})
github.git_data.trees.get 'user-name', 'repo-name', 'sha', 'recursive' => true
github = Github.new
= Examples
Get a tree recursively
end
file.path
github.git_data.trees.get 'user-name', 'repo-name', 'sha' do |file|
github.git_data.trees.get 'user-name', 'repo-name', 'sha'
github = Github.new
= Examples
Get a tree
def get(user_name, repo_name, sha, params={}) set :user => user_name, :repo => repo_name assert_presence_of user, repo, sha normalize! params response = if params['recursive'] params['recursive'] = 1 get_request("/repos/#{user}/#{repo}/git/trees/#{sha}", params) else get_request("/repos/#{user}/#{repo}/git/trees/#{sha.to_s}", params) end return response unless block_given? response.tree.each { |el| yield el } end