Class: CodecovApi::Api::Commits

Inherits:
Base
  • Object
show all
Defined in:
lib/codecov_api/api/commits.rb

Instance Method Summary collapse

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