Module: Restforce
- Defined in:
- lib/restforce.rb,
lib/restforce/mash.rb,
lib/restforce/client.rb,
lib/restforce/config.rb,
lib/restforce/sobject.rb,
lib/restforce/version.rb,
lib/restforce/document.rb,
lib/restforce/file_part.rb,
lib/restforce/attachment.rb,
lib/restforce/collection.rb,
lib/restforce/error_code.rb,
lib/restforce/middleware.rb,
lib/restforce/data/client.rb,
lib/restforce/concerns/api.rb,
lib/restforce/concerns/base.rb,
lib/restforce/concerns/verbs.rb,
lib/restforce/signed_request.rb,
lib/restforce/tooling/client.rb,
lib/restforce/abstract_client.rb,
lib/restforce/concerns/canvas.rb,
lib/restforce/middleware/gzip.rb,
lib/restforce/concerns/caching.rb,
lib/restforce/middleware/logger.rb,
lib/restforce/concerns/batch_api.rb,
lib/restforce/concerns/picklists.rb,
lib/restforce/concerns/streaming.rb,
lib/restforce/middleware/caching.rb,
lib/restforce/middleware/mashify.rb,
lib/restforce/concerns/connection.rb,
lib/restforce/middleware/multipart.rb,
lib/restforce/concerns/composite_api.rb,
lib/restforce/middleware/raise_error.rb,
lib/restforce/concerns/authentication.rb,
lib/restforce/middleware/instance_url.rb,
lib/restforce/middleware/json_request.rb,
lib/restforce/middleware/authorization.rb,
lib/restforce/middleware/json_response.rb,
lib/restforce/middleware/authentication.rb,
lib/restforce/middleware/custom_headers.rb,
lib/restforce/middleware/authentication/token.rb,
lib/restforce/middleware/authentication/password.rb,
lib/restforce/middleware/authentication/jwt_bearer.rb,
lib/restforce/middleware/authentication/client_credential.rb
Defined Under Namespace
Modules: Concerns, CoreExtensions, Data, ErrorCode, Tooling Classes: AbstractClient, Attachment, Collection, Configuration, Document, Mash, Middleware, SObject, SignedRequest
Constant Summary collapse
- Error =
Class.new(StandardError)
- ServerError =
Class.new(Error)
- AuthenticationError =
Class.new(Error)
Class.new(Faraday::ClientError)
- APIVersionError =
Class.new(Error)
- BatchAPIError =
Class.new(Error)
- NotFoundError =
Inherit from Faraday::ResourceNotFound for backwards-compatibility Consumers of this library that rescue and handle Faraday::ResourceNotFound can continue to do so.
Class.new(Faraday::ResourceNotFound)
- ResponseError =
Inherit from Faraday::ClientError for backwards-compatibility Consumers of this library that rescue and handle Faraday::ClientError can continue to do so.
Class.new(Faraday::ClientError)
- CompositeAPIError =
Class.new(ResponseError)
- MatchesMultipleError =
Class.new(ResponseError)
- EntityTooLargeError =
Class.new(ResponseError)
- Client =
Data::Client
- VERSION =
'8.0.0'
- FilePart =
Handle pre-1.0 versions of faraday
Faraday::UploadIO
- UploadIO =
Deprecated
Faraday::UploadIO
Class Attribute Summary collapse
Class Method Summary collapse
-
.configuration ⇒ Object
Returns the current Configuration.
-
.configure {|configuration| ... } ⇒ Object
Yields the Configuration.
- .data ⇒ Object
-
.decode_signed_request(*args) ⇒ Object
Helper for decoding signed requests.
- .log? ⇒ Boolean
-
.new ⇒ Object
Alias for Restforce::Data::Client.new.
- .tooling ⇒ Object
Class Attribute Details
Class Method Details
.configuration ⇒ Object
15 16 17 |
# File 'lib/restforce/config.rb', line 15 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
Yields the Configuration
Example
Restforce.configure do |config|
config.username = "username"
config.password = "password"
end
27 28 29 |
# File 'lib/restforce/config.rb', line 27 def configure yield configuration end |
.data ⇒ Object
78 79 80 |
# File 'lib/restforce.rb', line 78 def data(...) Restforce::Data::Client.new(...) end |
.decode_signed_request(*args) ⇒ Object
Helper for decoding signed requests.
87 88 89 |
# File 'lib/restforce.rb', line 87 def decode_signed_request(*args) SignedRequest.decode(*args) end |
.log? ⇒ Boolean
31 32 33 |
# File 'lib/restforce/config.rb', line 31 def log? @log ||= false end |
.new ⇒ Object
Alias for Restforce::Data::Client.new
Shamelessly pulled from github.com/pengwynn/octokit/blob/master/lib/octokit.rb
74 75 76 |
# File 'lib/restforce.rb', line 74 def new(...) data(...) end |