Module: WOTC::Client::Utils
- Included in:
- WOTC::Client
- Defined in:
- lib/wotc/client/utils.rb
Overview
Defines methods related to utils
Instance Method Summary collapse
-
#token_valid? ⇒ Boolean
Trigger an api call to verify access_token is valid.
-
#wotc_calculator(options = {}) ⇒ Object
Pre-qualify an application of WOTC status.
Instance Method Details
#token_valid? ⇒ Boolean
Trigger an api call to verify access_token is valid.
7 8 9 10 11 12 |
# File 'lib/wotc/client/utils.rb', line 7 def token_valid? user = get('user').body return true if user&.fetch("id") rescue => e return false end |
#wotc_calculator(options = {}) ⇒ Object
Pre-qualify an application of WOTC status
15 16 17 18 |
# File 'lib/wotc/client/utils.rb', line 15 def wotc_calculator(={}) result = post('wotc/calculator', ) result.body == true end |