module Restforce::Concerns::API

def find(sobject, id, field = nil)

Raises NotFoundError if nothing is found.
Returns the Restforce::SObject sobject record.

field - External ID field to use (default: nil).
of the external field.
id - The id of the record. If field is specified, id should be the id
sobject - The String name of the sobject.

Public: Finds a single record and returns all fields.
def find(sobject, id, field = nil)
  url = if field
          "sobjects/#{sobject}/#{field}/#{ERB::Util.url_encode(id)}"
        else
          "sobjects/#{sobject}/#{ERB::Util.url_encode(id)}"
        end
  api_get(url).body
end