Module: SearchDo::Backends::HyperEstraier::EstraierPureExtention::Node

Defined in:
lib/search_do/backends/hyper_estraier/estraier_pure_extention.rb

Instance Method Summary collapse

Instance Method Details

#listObject



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/search_do/backends/hyper_estraier/estraier_pure_extention.rb', line 13

def list
  return false unless @url
  turl = @url + "/list"
  reqheads = [ "Content-Type: application/x-www-form-urlencoded" ]
  reqheads.push("Authorization: Basic " + Utility::base_encode(@auth)) if @auth
  reqbody = ""
  resbody = StringIO::new
  rv = Utility::shuttle_url(turl, @pxhost, @pxport, @timeout, reqheads, reqbody, nil, resbody)
  @status = rv
  return nil if rv != 200
  lines = resbody.string.split(/\n/)
  lines.collect { |l| val = l.split(/\t/) and { :id => val[0], :uri => val[1], :digest => val[2] } }
end