class Minered def initialize(host, key) @host = host @key = key end def issues response = Typhoeus.get("http://#{@host}/issues.xml?key=#{@key}") get_response(response.body)['issues'] end def new_ticket(project_id, subject) response = Typhoeus.post( "http://#{@host}/issues.xml?key=#{@key}", body: { issue: { project_id: project_id, subject: subject } } ) get_response(response.body) end private def get_reponse(body) Crack::XML.parse(body) end end require 'minered/issue'