Class: CodecovApi::Api::Commits
- Defined in:
- lib/codecov_api/api/commits.rb
Instance Method Summary collapse
- #folder_totals(path, branch = 'master') ⇒ Object
- #get(sha) ⇒ Object
-
#initialize(owner, repo) ⇒ Commits
constructor
A new instance of Commits.
- #list(from = nil, to = nil) ⇒ Object
Constructor Details
#initialize(owner, repo) ⇒ Commits
Returns a new instance of Commits.
6 7 8 9 |
# File 'lib/codecov_api/api/commits.rb', line 6 def initialize(owner, repo) @owner = owner @repo = repo end |
Instance Method Details
#folder_totals(path, branch = 'master') ⇒ Object
20 21 22 |
# File 'lib/codecov_api/api/commits.rb', line 20 def folder_totals(path, branch = 'master') get_request("/tree/#{branch}/#{path}") end |
#get(sha) ⇒ Object
16 17 18 |
# File 'lib/codecov_api/api/commits.rb', line 16 def get(sha) get_request("/commit/#{sha}") end |
#list(from = nil, to = nil) ⇒ Object
11 12 13 14 |
# File 'lib/codecov_api/api/commits.rb', line 11 def list(from = nil, to = nil) # todo: add from and to parameters get_request('/commits') end |