module Restforce

Constants

APIVersionError
AuthenticationError
BatchAPIError
Client
CompositeAPIError
EntityTooLargeError
Error
FilePart

Handle pre-1.0 versions of faraday

MatchesMultipleError
NotFoundError

Inherit from Faraday::ResourceNotFound for backwards-compatibility Consumers of this library that rescue and handle Faraday::ResourceNotFound can continue to do so.

ResponseError

Inherit from Faraday::ClientError for backwards-compatibility Consumers of this library that rescue and handle Faraday::ClientError can continue to do so.

ServerError
UnauthorizedError
UploadIO

Deprecated

VERSION

Attributes

log[W]

Public Class Methods

configuration() click to toggle source

Returns the current Configuration

Example

Restforce.configuration.username = "username"
Restforce.configuration.password = "password"
# File lib/restforce/config.rb, line 15
def configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source

Yields the Configuration

Example

Restforce.configure do |config|
  config.username = "username"
  config.password = "password"
end
# File lib/restforce/config.rb, line 27
def configure
  yield configuration
end
data(...) click to toggle source
# File lib/restforce.rb, line 78
def data(...)
  Restforce::Data::Client.new(...)
end
decode_signed_request(*args) click to toggle source

Helper for decoding signed requests.

# File lib/restforce.rb, line 87
def decode_signed_request(*args)
  SignedRequest.decode(*args)
end
log(message) click to toggle source
# File lib/restforce/config.rb, line 35
def log(message)
  return unless Restforce.log?

  configuration.logger.send(configuration.log_level, message)
end
log?() click to toggle source
# File lib/restforce/config.rb, line 31
def log?
  @log ||= false
end
new(...) click to toggle source

Alias for Restforce::Data::Client.new

Shamelessly pulled from github.com/pengwynn/octokit/blob/master/lib/octokit.rb

# File lib/restforce.rb, line 74
def new(...)
  data(...)
end
tooling(...) click to toggle source
# File lib/restforce.rb, line 82
def tooling(...)
  Restforce::Tooling::Client.new(...)
end