func (users *Users) GetByEmail(email string) *User {
	return NewUser(
		users.client,
		fmt.Sprintf("%s/GetByEmail('%s')", users.endpoint, url.QueryEscape(email)),
		users.config,
	)
}
GetByEmail gets a user by his/her email address
package api
import (
	"fmt"
	"net/url"
	"github.com/koltyakov/gosip"
)
type Users struct {
	client    *gosip.SPClient
	config    *RequestConfig
	endpoint  string
	modifiers *ODataMods
}
type UsersResp []byte
func NewUsers(client *gosip.SPClient, endpoint string, config *RequestConfig) *Users {
	return &Users{
		client:    client,
		endpoint:  endpoint,
		config:    config,
		modifiers: NewODataMods(),
	}
}
func (users *Users) ToURL() string {
	return toURL(users.endpoint, users.modifiers)
}
func (users *Users) Get() (UsersResp, error) {
	client := NewHTTPClient(users.client)
	return client.Get(users.ToURL(), users.config)
}
func (users *Users) GetByID(userID int) *User {
	return NewUser(
		users.client,
		fmt.Sprintf("%s/GetById(%d)", users.endpoint, userID),
		users.config,
	)
}
func (users *Users) GetByLoginName(loginName string) *User {
	return NewUser(
		users.client,
		fmt.Sprintf("%s('%s')", users.endpoint, url.QueryEscape(loginName)),
		users.config,
	)
}