Class: LingoDotDev::Configuration
- Inherits:
-
Object
- Object
- LingoDotDev::Configuration
- Defined in:
- lib/lingodotdev.rb
Overview
Configuration for the Lingo.dev Engine.
Holds API credentials and batch processing settings.
Instance Attribute Summary collapse
-
#api_key ⇒ String
The Lingo.dev API key.
-
#api_url ⇒ String
The API endpoint URL.
-
#batch_size ⇒ Integer
Maximum number of items per batch (1-250).
-
#ideal_batch_item_size ⇒ Integer
Target word count per batch item (1-2500).
Instance Method Summary collapse
-
#initialize(api_key:, api_url: 'https://engine.lingo.dev', batch_size: 25, ideal_batch_item_size: 250) ⇒ Configuration
constructor
Creates a new Configuration instance.
Constructor Details
#initialize(api_key:, api_url: 'https://engine.lingo.dev', batch_size: 25, ideal_batch_item_size: 250) ⇒ Configuration
Creates a new Configuration instance.
105 106 107 108 109 110 111 |
# File 'lib/lingodotdev.rb', line 105 def initialize(api_key:, api_url: 'https://engine.lingo.dev', batch_size: 25, ideal_batch_item_size: 250) @api_key = api_key @api_url = api_url @batch_size = batch_size @ideal_batch_item_size = ideal_batch_item_size validate! end |
Instance Attribute Details
#api_key ⇒ String
Returns the Lingo.dev API key.
86 87 88 |
# File 'lib/lingodotdev.rb', line 86 def api_key @api_key end |
#api_url ⇒ String
Returns the API endpoint URL.
89 90 91 |
# File 'lib/lingodotdev.rb', line 89 def api_url @api_url end |
#batch_size ⇒ Integer
Returns maximum number of items per batch (1-250).
92 93 94 |
# File 'lib/lingodotdev.rb', line 92 def batch_size @batch_size end |
#ideal_batch_item_size ⇒ Integer
Returns target word count per batch item (1-2500).
95 96 97 |
# File 'lib/lingodotdev.rb', line 95 def ideal_batch_item_size @ideal_batch_item_size end |