lib/buildbox/api.rb in buildbox-0.4.1 vs lib/buildbox/api.rb in buildbox-0.4.2
- old
+ new
@@ -38,11 +38,17 @@
else
raise ServerError.new(e, e.response)
end
end
- def scheduled_builds(access_token)
- get("#{access_token}/builds/scheduled").map { |build| Buildbox::Build.new(build) }
+ def next_build(access_token)
+ build = get("#{access_token}/builds/queue/next").build
+
+ if build
+ Buildbox::Build.new(build)
+ else
+ nil
+ end
end
def update_build(access_token, build, options)
put("#{access_token}/builds/#{build.id}", options)
end