// Login is logging-in the User to the Salesforce organization
Login is logging-in the User to the Salesforce organization
// Login is logging - in the User to the Salesforce organization
func Login(consumerKey string, consumerSecret string, instanceUrl string, username string, password string, apiVersion string) (api *RestApi, err error) {
	if apiVersion == "" {
		apiVersion = "39.0"
	}
	conn := RestConnection{force.Connection{
		ConsumerKey:    consumerKey,
		ConsumerSecret: consumerSecret,
		InstanceUrl:    instanceUrl,
		Username:       username,
		Password:       password,
		APIVersion:     apiVersion,
	}}
	err = conn.Refresh()
	if err != nil {
		return nil, err
	}
	api = &RestApi{
		Connection: &conn,
	}
	return api, nil
}
func Login ( consumerKey string , consumerSecret string , instanceUrl string , username string , password string , apiVersion string ) ( api * RestApi , err error ) { if apiVersion == " " { apiVersion = " " } conn := RestConnection { force . Connection { ConsumerKey : consumerKey , ConsumerSecret : consumerSecret , InstanceUrl : instanceUrl , Username : username , Password : password , APIVersion : apiVersion , } } err = conn . Refresh ( ) if err != nil { return nil , err } api = & RestApi { Connection : & conn , } return api , nil }
Login is logging-in the User to the Salesforce organization
Login is logging - in the User to the Salesforce organization