Module: RemoveBg

Defined in:
lib/remove_bg.rb,
lib/remove_bg/api.rb,
lib/remove_bg/error.rb,
lib/remove_bg/result.rb,
lib/remove_bg/upload.rb,
lib/remove_bg/version.rb,
lib/remove_bg/api_client.rb,
lib/remove_bg/account_info.rb,
lib/remove_bg/configuration.rb,
lib/remove_bg/url_validator.rb,
lib/remove_bg/image_composer.rb,
lib/remove_bg/http_connection.rb,
lib/remove_bg/rate_limit_info.rb,
lib/remove_bg/request_options.rb,
lib/remove_bg/result_metadata.rb,
lib/remove_bg/composite_result.rb,
lib/remove_bg/base_request_options.rb

Defined Under Namespace

Modules: Api Classes: AccountInfo, ApiClient, BaseRequestOptions, ClientHttpError, CompositeResult, Configuration, Error, FileError, FileMissingError, FileOverwriteError, HttpConnection, HttpError, ImageComposer, InvalidUrlError, RateLimitError, RateLimitInfo, RequestOptions, Result, ResultMetadata, ServerHttpError, Upload, UrlValidator

Constant Summary collapse

VERSION =
"1.4.1"

Class Method Summary collapse

Class Method Details

.account_info(raw_options = {}) ⇒ Object


17
18
19
20
# File 'lib/remove_bg.rb', line 17

def self.(raw_options = {})
  options = RemoveBg::BaseRequestOptions.new(raw_options)
  ApiClient.new.(options)
end

.configure {|RemoveBg::Configuration.configuration| ... } ⇒ Object

Yields:


22
23
24
# File 'lib/remove_bg.rb', line 22

def self.configure
  yield RemoveBg::Configuration.configuration
end

.from_file(image_path, raw_options = {}) ⇒ Object


7
8
9
10
# File 'lib/remove_bg.rb', line 7

def self.from_file(image_path, raw_options = {})
  options = RemoveBg::RequestOptions.new(raw_options)
  ApiClient.new.remove_from_file(image_path, options)
end

.from_url(image_url, raw_options = {}) ⇒ Object


12
13
14
15
# File 'lib/remove_bg.rb', line 12

def self.from_url(image_url, raw_options = {})
  options = RemoveBg::RequestOptions.new(raw_options)
  ApiClient.new.remove_from_url(image_url, options)
end