Module: Analysand::Reading

Included in:
Database
Defined in:
lib/analysand/reading.rb

Instance Method Summary collapse

Instance Method Details

#get(doc_id, credentials = nil) ⇒ Object



6
7
8
# File 'lib/analysand/reading.rb', line 6

def get(doc_id, credentials = nil)
  Response.new(_get(doc_id, credentials))
end

#get!(doc_id, credentials = nil) ⇒ Object



10
11
12
13
14
# File 'lib/analysand/reading.rb', line 10

def get!(doc_id, credentials = nil)
  get(doc_id, credentials).tap do |resp|
    raise ex(CannotAccessDocument, resp) unless resp.success?
  end
end

#get_attachment(loc, credentials = nil) ⇒ Object



20
21
22
# File 'lib/analysand/reading.rb', line 20

def get_attachment(loc, credentials = nil)
  _get(loc, credentials)
end

#head(doc_id, credentials = nil) ⇒ Object



16
17
18
# File 'lib/analysand/reading.rb', line 16

def head(doc_id, credentials = nil)
  Response.new(_head(doc_id, credentials))
end