module Restforce::Concerns::API

def describe(sobject = nil)

Returns the Hash representation of the describe call.

# => { ... }
client.describe('Account')
# get the describe for the Account object

# => { ... }
client.describe
# get the global describe for all sobjects

Examples

sobject - Stringish name of the sobject (default: nil).

Public: Returns a detailed describe result for the specified sobject
def describe(sobject = nil)
  if sobject
    api_get("sobjects/#{sobject}/describe").body
  else
    api_get('sobjects').body['sobjects']
  end
end