Method: Github::Client::Repos::Contents#get

Defined in:
lib/github_api/client/repos/contents.rb

#get(*args) ⇒ Object Also known as: find

Get contents

This method returns the contents of any file or directory in a repository.

Examples:

github = Github.new
github.repos.contents.get 'user-name', 'repo-name', 'path'
github = Github.new user: 'user-name', repo: 'repo-name'
github.repos.contents.get path: 'README.md'

Parameters:



73
74
75
76
77
# File 'lib/github_api/client/repos/contents.rb', line 73

def get(*args)
  arguments(args, required: [:user, :repo, :path])

  get_request("/repos/#{arguments.user}/#{arguments.repo}/contents/#{arguments.path}", arguments.params)
end