Module: Lastpass
- Defined in:
- lib/lastpass-api.rb,
lib/lastpass-api/cli.rb,
lib/lastpass-api/group.rb,
lib/lastpass-api/utils.rb,
lib/lastpass-api/client.rb,
lib/lastpass-api/groups.rb,
lib/lastpass-api/parser.rb,
lib/lastpass-api/account.rb,
lib/lastpass-api/version.rb,
lib/lastpass-api/accounts.rb,
lib/lastpass-api/collection.rb
Overview
Note:
Tested with LastPass CLI v1.1.2
Note:
This gem currently can only login with one account at a time!
Read/Write API client for LastPass using the LastPass CLI. I am not affiliated with LastPass.
Defined Under Namespace
Classes: Account, Accounts, Cli, Client, Collection, Group, Groups, Parser, Utils
Constant Summary collapse
- VERSION =
'0.2.1'
- @@verbose =
false
Class Method Summary collapse
Class Method Details
.check_lpass_in_path ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/lastpass-api.rb', line 28 def self.check_lpass_in_path = 'Cannot find the "lpass" executable in the path!' begin raise if Utils.cmd( 'which lpass' ) == '' rescue raise end version = Utils.cmd( 'lpass --version' ) unless version.include? 'v1.' raise "The LastPass CLI you have installed [#{version&.chomp}] is not supported. Please install LastPass CLI v1" end end |
.verbose ⇒ Object
20 21 22 |
# File 'lib/lastpass-api.rb', line 20 def self.verbose @@verbose end |
.verbose=(verbose) ⇒ Object
24 25 26 |
# File 'lib/lastpass-api.rb', line 24 def self.verbose=( verbose ) @@verbose = verbose end |