module WOTC::Client::Registers

Public Instance Methods

register(options = {}) click to toggle source

Register for an account and get back a life time access token.

# File lib/wotc/client/registers.rb, line 6
def register(options = {})
  response = post("register", options)
  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