Fetch builds for branches from /builds endpoint (closes #123)

This commit is contained in:
Piotr Sarnacki 2013-01-26 12:04:39 +01:00
parent 0e925c0eed
commit e9092418a7
2 changed files with 4 additions and 1 deletions

View File

@ -70,6 +70,9 @@ require 'travis/model'
byRepoId: (id, parameters) ->
@find($.extend(parameters || {}, repository_id: id))
branches: (options) ->
@find repository_id: options.repoId, branches: true
olderThanNumber: (id, build_number) ->
# TODO fix this api and use some kind of pagination scheme
@find(url: "/builds", repository_id: id, after_number: build_number)

View File

@ -62,7 +62,7 @@ require 'travis/model'
).property()
branches: (->
Travis.Branch.byRepoId @get('id')
Travis.Build.branches repoId: @get('id')
).property()
events: (->