Merge pull request #76 from travis-ci/rkh-more-endpoints

endpoints for find_branch and find_branches
This commit is contained in:
Konstantin Haase 2013-10-03 07:39:00 -07:00
commit 02feeeb0fe
2 changed files with 22 additions and 2 deletions

View File

@ -23,7 +23,7 @@ GIT
GIT GIT
remote: git://github.com/travis-ci/travis-core.git remote: git://github.com/travis-ci/travis-core.git
revision: cae4cfbfbbc6c24354a9b4360d021a10f95f4e64 revision: e46364c38f57ae08d66aa2e00b0e76104712e35c
specs: specs:
travis-core (0.0.1) travis-core (0.0.1)
actionmailer (~> 3.2.12) actionmailer (~> 3.2.12)
@ -52,7 +52,7 @@ GIT
GIT GIT
remote: git://github.com/travis-ci/travis-support.git remote: git://github.com/travis-ci/travis-support.git
revision: 7c69fe727968b31551ce3acbe0d4f2e0e5bc8fa3 revision: fffb09b3e6967cdb6c33f04ac7f7840a8df77400
specs: specs:
travis-support (0.0.1) travis-support (0.0.1)

View File

@ -50,6 +50,16 @@ class Travis::Api::App
respond_with service(:regenerate_repo_key, params), version: :v2 respond_with service(:regenerate_repo_key, params), version: :v2
end 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. # Gets the repository with the given name.
# #
# ### Response # ### Response
@ -101,6 +111,16 @@ class Travis::Api::App
post '/:owner_name/:name/key' do post '/:owner_name/:name/key' do
respond_with service(:regenerate_repo_key, params), version: :v2 respond_with service(:regenerate_repo_key, params), version: :v2
end 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 end
end end