Module: Monkeylearn::Defaults
- Defined in:
- lib/monkeylearn/defaults.rb
Constant Summary collapse
- DEFAULT_BATCH_SIZE =
Constants
200
- MAX_BATCH_SIZE =
200
- BASE_URL =
Configurable options
'https://api.monkeylearn.com/v3/'
- RETRY_IF_THROTTLE =
true
- AUTO_BATCH =
true
Class Method Summary collapse
- .auto_batch ⇒ Object
- .base_url ⇒ Object
- .default_batch_size ⇒ Object
- .max_batch_size ⇒ Object
- .options ⇒ Object
- .retry_if_throttle ⇒ Object
- .token ⇒ Object
Class Method Details
.auto_batch ⇒ Object
28 29 30 |
# File 'lib/monkeylearn/defaults.rb', line 28 def auto_batch ENV['MONKEYLEARN_AUTO_BATCH'] || AUTO_BATCH end |
.base_url ⇒ Object
16 17 18 |
# File 'lib/monkeylearn/defaults.rb', line 16 def base_url ENV['MONKEYLEARN_API_BASE_URL'] || BASE_URL end |
.default_batch_size ⇒ Object
36 37 38 |
# File 'lib/monkeylearn/defaults.rb', line 36 def default_batch_size DEFAULT_BATCH_SIZE end |
.max_batch_size ⇒ Object
32 33 34 |
# File 'lib/monkeylearn/defaults.rb', line 32 def max_batch_size MAX_BATCH_SIZE end |
.options ⇒ Object
12 13 14 |
# File 'lib/monkeylearn/defaults.rb', line 12 def Hash[Monkeylearn::Configurable.keys.map{|key| [key, send(key)]}] end |
.retry_if_throttle ⇒ Object
24 25 26 |
# File 'lib/monkeylearn/defaults.rb', line 24 def retry_if_throttle ENV['MONKEYLEARN_RETRY_IF_THROTTLE'] || RETRY_IF_THROTTLE end |
.token ⇒ Object
20 21 22 |
# File 'lib/monkeylearn/defaults.rb', line 20 def token ENV['MONKEYLEARN_TOKEN'] || nil end |