Method: Cloudant::Client#get_doc
- Defined in:
- lib/cloudant/client.rb
#get_doc(id, *opts) ⇒ Object Also known as: get, doc
Accepts a single document id and returns it if found
26 27 28 29 30 31 |
# File 'lib/cloudant/client.rb', line 26 def get_doc(id,*opts) q = "#{database}/#{id}" q << build_query_string(opts.first,"doc") if opts && opts.any? && opts.first.is_a?(Hash) @conn.query({url_path: q, method: :get}) end |