func (views *Views) GetByID(viewID string) *View {
	return NewView(
		views.client,
		fmt.Sprintf("%s('%s')", views.endpoint, viewID),
		views.config,
	)
}
GetByID gets a view by its ID (GUID)
package api
import (
	"bytes"
	"fmt"
	"github.com/koltyakov/gosip"
)
type Views struct {
	client    *gosip.SPClient
	config    *RequestConfig
	endpoint  string
	modifiers *ODataMods
}
type ViewsResp []byte
func NewViews(client *gosip.SPClient, endpoint string, config *RequestConfig) *Views {
	return &Views{
		client:    client,
		endpoint:  endpoint,
		config:    config,
		modifiers: NewODataMods(),
	}
}
func (views *Views) ToURL() string {
	return toURL(views.endpoint, views.modifiers)
}
func (views *Views) Get() (ViewsResp, error) {
	client := NewHTTPClient(views.client)
	return client.Get(views.ToURL(), views.config)
}
func (views *Views) Add(body []byte) (ViewResp, error) {
	body = patchMetadataType(body, "SP.View")
	client := NewHTTPClient(views.client)
	return client.Post(views.endpoint, bytes.NewBuffer(body), views.config)
}