lib/frodo/concerns/api.rb
# Public: Finds a single record and returns select 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.
# fields  - A String array denoting the fields to select.  If nil or empty array
#           is passed, all fields are selected.
Finds a single record and returns select 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.
fields  - A String array denoting the fields to select.  If nil or empty array
is passed, all fields are selected.
Finds a single record and returns select 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 . fields - A String array denoting the fields to select . If nil or empty array is passed all fields are selected .
def select(entity_set, id, fields)
        query = service[entity_set].query
        fields.each{|field| query.select(field)}
        url_chunk = query.find(id)
        body = api_get(url_chunk).body
        build_entity(entity_set, body)
      end
def select ( entity_set , id , fields ) query = service [ entity_set ] . query fields . each { | field | query . select ( field ) } url_chunk = query . find ( id ) body = api_get ( url_chunk ) . body build_entity ( entity_set , body ) end
Public: Finds a single record and returns select fields.
Public : Finds a single record and returns select fields .
entity_set
id
fields