class RedHatSupportLib::Brokers::Solution
Public Class Methods
new(connection)
click to toggle source
Calls superclass method
RedHatSupportLib::Brokers::Broker::new
# File lib/brokers/solution.rb, line 5 def initialize(connection) super end
Public Instance Methods
get_solution(id)
click to toggle source
# File lib/brokers/solution.rb, line 15 def get_solution(id) #error handling result = @connection.get("/rs/solutions/#{id}", {:accept => :json}) #result.parsed_response end
search(text, limit=10)
click to toggle source
# File lib/brokers/solution.rb, line 9 def search(text, limit=10) text = URI::encode(text) result = @connection.get("/rs/solutions?keyword=#{text}&limit=#{limit}", {:accept => :json}) result['solution'] end