Class: Buildbox::API
- Inherits:
-
Object
- Object
- Buildbox::API
- Defined in:
- lib/buildbox/api.rb
Instance Method Summary collapse
-
#initialize(config = Buildbox.config) ⇒ API
constructor
A new instance of API.
- #scheduled_builds(project) ⇒ Object
- #update_build(build) ⇒ Object
- #worker(access_token: access_token, hostname: hostname) ⇒ Object
Constructor Details
Instance Method Details
#scheduled_builds(project) ⇒ Object
16 17 18 |
# File 'lib/buildbox/api.rb', line 16 def scheduled_builds(project) get(project.scheduled_builds_url).map { |build| Buildbox::Build.new(build) } end |
#update_build(build) ⇒ Object
20 21 22 |
# File 'lib/buildbox/api.rb', line 20 def update_build(build) put(build.url, :output => build.output, :exit_status => build.exit_status) end |
#worker(access_token: access_token, hostname: hostname) ⇒ Object
12 13 14 |
# File 'lib/buildbox/api.rb', line 12 def worker(access_token: access_token, hostname: hostname) put("workers/#{access_token}", :hostname => hostname) end |