// NewLastPassClient returns LastPass Client from confFile
NewLastPassClient returns LastPass Client from confFile
// NewLastPassClient returns LastPass Client from confFile
func NewLastPassClient(configFilePath string) (*LastPassClient, error) {
	apiKey := LoadAPIKeyFromEnvOrConfig(configFilePath)
	companyID := LoadCompanyIDFromEnvOrConfig(configFilePath)
	endPointURL := LoadEndPointURL(configFilePath)
	if apiKey == "" {
		return nil, errors.New(`LASTPASS_APIKEY environment variable is not set. (Try "export LASTPASS_APIKEY='<Your apikey>'")`)
	}
	if companyID == "" {
		return nil,
			errors.New(`LASTPASS_COMPANY_ID environment variable is not set. (Try "export LASTPASS_COMPANY_ID='<Your lastpass company id>'")`)
	}
	if endPointURL == "" {
		endPointURL = defaultBaseURL
	}
	return NewClient(apiKey, endPointURL, companyID, os.Getenv("DEBUG") != "")
}
func NewLastPassClient ( configFilePath string ) ( * LastPassClient , error ) { apiKey := LoadAPIKeyFromEnvOrConfig ( configFilePath ) companyID := LoadCompanyIDFromEnvOrConfig ( configFilePath ) endPointURL := LoadEndPointURL ( configFilePath ) if apiKey == " " { return nil , errors . New ( `LASTPASS_APIKEY environment variable is not set. (Try "export LASTPASS_APIKEY='<Your apikey>'")` ) } if companyID == " " { return nil , errors . New ( `LASTPASS_COMPANY_ID environment variable is not set. (Try "export LASTPASS_COMPANY_ID='<Your lastpass company id>'")` ) } if endPointURL == " " { endPointURL = defaultBaseURL } return NewClient ( apiKey , endPointURL , companyID , os . Getenv ( " " ) != " " ) }
NewLastPassClient returns LastPass Client from confFile
NewLastPassClient returns LastPass Client from confFile