Class: SalesforceConnector::OauthObject
- Inherits:
-
Object
- Object
- SalesforceConnector::OauthObject
show all
- Includes:
- HTTParty
- Defined in:
- lib/salesforce_connector/oauth_object.rb
Class Method Summary
collapse
Class Method Details
.find(str) ⇒ Object
22
23
24
25
26
|
# File 'lib/salesforce_connector/oauth_object.rb', line 22
def self.find(str)
self.
result = get(self.root_url+"/#{self.class}/#{CGI::escape(str)}")
return result.parsed_response["records"] || []
end
|
.query(str) ⇒ Object
16
17
18
19
20
|
# File 'lib/salesforce_connector/oauth_object.rb', line 16
def self.query(str)
self.
result = get(self.root_url+"/query/?q=#{CGI::escape(str)}")
return result.parsed_response["records"] || []
end
|
.root_url ⇒ Object
12
13
14
|
# File 'lib/salesforce_connector/oauth_object.rb', line 12
def self.root_url
@root_url = ENV['sfdc_instance_url']+"/services/data/v"+ENV['sfdc_api_version']
end
|
8
9
10
|
# File 'lib/salesforce_connector/oauth_object.rb', line 8
def self.
'Authorization' => "OAuth #{ENV['sfdc_token']}"
end
|