add repo endpoints for fetching branches

This commit is contained in:
Konstantin Haase 2013-10-03 16:24:35 +02:00
parent bb919bdf42
commit 93277035cd

View File

@ -50,6 +50,16 @@ class Travis::Api::App
respond_with service(:regenerate_repo_key, params), version: :v2
end
# Gets list of branches
get '/:id/branches' do
respond_with service(:find_branches, params), type: :branches, version: :v2
end
# Gets lastest build on a branch branches
get '/:id/branches/:branch' do
respond_with service(:find_branch, params), type: :branch, version: :v2
end
# Gets the repository with the given name.
#
# ### Response
@ -101,6 +111,16 @@ class Travis::Api::App
post '/:owner_name/:name/key' do
respond_with service(:regenerate_repo_key, params), version: :v2
end
# Gets list of branches
get '/:owner_name/:name/branches' do
respond_with service(:find_branches, params), type: :branches, version: :v2
end
# Gets lastest build on a branch branches
get '/:owner_name/:name/branches/:branch' do
respond_with service(:find_branch, params), type: :branch, version: :v2
end
end
end
end