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) issue = Minered::Issue.new(@host, @key, project_id, subject) get_response(issue) end private def get_reponse(body) Crack::XML.parse(body) end end require 'minered/issue'