class PactBroker::Client::Pacticipants

Public Instance Methods

get1(options) click to toggle source
# File lib/pact_broker/client/pacticipants.rb, line 25
def get1 options
  response = get(pacticipant_base_url(options), headers: default_get_headers)
  handle_response(response) do
    JSON.parse(response.body)
  end
end
list() click to toggle source
# File lib/pact_broker/client/pacticipants.rb, line 32
def list
  response = get("/pacticipants", headers: default_get_headers)
  handle_response(response) do
    JSON.parse(response.body)
  end
end
repository_url(options) click to toggle source
# File lib/pact_broker/client/pacticipants.rb, line 39
def repository_url options
  response = get("#{pacticipant_base_url(options)}/repository_url", headers: default_get_headers.merge('Accept' => 'text/plain'))
  handle_response(response) do
    response.body
  end
end
update(options) click to toggle source
# File lib/pact_broker/client/pacticipants.rb, line 17
def update options
  body = options.select{ | key, v | [:repository_url].include?(key)}
  response = patch(pacticipant_base_url(options), body: body, headers: default_patch_headers)
  handle_response(response) do
    true
  end
end
versions() click to toggle source
# File lib/pact_broker/client/pacticipants.rb, line 13
def versions
  Versions.new base_url: base_url, client_options: client_options
end

Private Instance Methods

pacticipant_base_url(options) click to toggle source
# File lib/pact_broker/client/pacticipants.rb, line 48
def pacticipant_base_url options
  "/pacticipants/#{encode_param(options[:pacticipant])}"
end