def search(term)
      encoded_term = URI.encode(term)

      room_messages = connection.get("/search/#{encoded_term}.json")["messages"].select do |message|
        message[:room_id] == id
      end

      room_messages.map do |message|
        parse_message(message)
      end
    end
def search(term)
      encoded_term = URI.encode(term)

      room_messages = connection.get("/search/#{encoded_term}.json")["messages"].select do |message|
        message[:room_id] == id
      end

      room_messages.map do |message|
        parse_message(message)
      end
    end
Search transcripts for the given term (returns an array of messages parsed
 via #parse_message, see #parse_message for format of returned message)