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={}) _update_user_repo_params(user_name, repo_name) _validate_user_repo_params(user, repo) unless user? && repo? _validate_presence_of sha _normalize_params_keys(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