Module: Softcover::Commands::Auth

Extended by:
Auth
Included in:
Auth
Defined in:
lib/softcover/commands/auth.rb

Instance Method Summary collapse

Instance Method Details

#login(email, password) ⇒ Object



6
7
8
9
10
# File 'lib/softcover/commands/auth.rb', line 6

def (email, password)
  require "softcover/client"
  client = Softcover::Client.new email, password
  client.login!
end

#logoutObject



12
13
14
15
# File 'lib/softcover/commands/auth.rb', line 12

def logout
  require "softcover/config"
  Softcover::Config['api_key'] = nil
end