Module: WOTC::Client::Registers
- Included in:
- WOTC::Client
- Defined in:
- lib/wotc/client/registers.rb
Instance Method Summary collapse
-
#register(options = {}) ⇒ Object
Register for an account and get back a life time access token.
Instance Method Details
#register(options = {}) ⇒ Object
Register for an account and get back a life time access token.
6 7 8 9 10 11 12 13 14 |
# File 'lib/wotc/client/registers.rb', line 6 def register( = {}) response = post("register", ) if response.body.is_a?(Hash) && response.body["token"] return response else # raise error when token is missing. raise WOTC::BadRequest.new(response) end end |