class Jenkins::Rest::Client
Constants
- VERSION
Attributes
server[R]
Public Class Methods
new(server:, username:, password:)
click to toggle source
# File lib/jenkins/rest/client.rb, line 10 def initialize(server:, username:, password:) @server = Faraday.new(server) do |connection| connection.basic_auth(username, password) connection.adapter(Faraday.default_adapter) end end
Public Instance Methods
job(job)
click to toggle source
# File lib/jenkins/rest/client.rb, line 16 def job(job) return Job.new(JSON.parse(@server.get("/job/#{job}/api/json").body), @server) end