Method: Frodo::Concerns::API#find

Defined in:
lib/frodo/concerns/api.rb

#find(entity_set, id) ⇒ Object

Public: Finds a single record and returns all fields.

entity_set - The set the entity belongs to id - The id of the record. If field is specified, id should be the id

of the external field.

Returns the Entity record.



206
207
208
209
210
211
212
# File 'lib/frodo/concerns/api.rb', line 206

def find(entity_set, id)
  query = service[entity_set].query
  url_chunk = query.find(id)

  body = api_get(url_chunk).body
  build_entity(entity_set, body)
end