Class: BraveSearch::Configuration
- Inherits:
-
Object
- Object
- BraveSearch::Configuration
- Defined in:
- lib/brave_search/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#retry_attempts ⇒ Object
Returns the value of attribute retry_attempts.
-
#storage_bucket ⇒ Object
Returns the value of attribute storage_bucket.
-
#storage_endpoint ⇒ Object
Returns the value of attribute storage_endpoint.
-
#storage_provider ⇒ Object
Returns the value of attribute storage_provider.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #storage(**options) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 |
# File 'lib/brave_search/configuration.rb', line 7 def initialize @api_key = ENV.fetch("BRAVE_API_KEY", nil) @base_url = "https://api.search.brave.com/res/v1" @timeout = 30 @retry_attempts = 3 @storage_provider = :aws @storage_bucket = ENV.fetch("BRAVE_SEARCH_BUCKET", "brave-search-downloads") @storage_endpoint = nil end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def base_url @base_url end |
#retry_attempts ⇒ Object
Returns the value of attribute retry_attempts.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def retry_attempts @retry_attempts end |
#storage_bucket ⇒ Object
Returns the value of attribute storage_bucket.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def storage_bucket @storage_bucket end |
#storage_endpoint ⇒ Object
Returns the value of attribute storage_endpoint.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def storage_endpoint @storage_endpoint end |
#storage_provider ⇒ Object
Returns the value of attribute storage_provider.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def storage_provider @storage_provider end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/brave_search/configuration.rb', line 5 def timeout @timeout end |