func (groups *Groups) GetByID(groupID int) *Group {
	return NewGroup(
		groups.client,
		fmt.Sprintf("%s/GetById(%d)", groups.endpoint, groupID),
		groups.config,
	)
}
GetByID gets a group object by its ID
package api
import (
	"bytes"
	"encoding/json"
	"fmt"
	"github.com/koltyakov/gosip"
)
type Groups struct {
	client    *gosip.SPClient
	config    *RequestConfig
	endpoint  string
	modifiers *ODataMods
}
type GroupsResp []byte
func NewGroups(client *gosip.SPClient, endpoint string, config *RequestConfig) *Groups {
	return &Groups{
		client:    client,
		endpoint:  endpoint,
		config:    config,
		modifiers: NewODataMods(),
	}
}
func (groups *Groups) ToURL() string {
	return toURL(groups.endpoint, groups.modifiers)
}
func (groups *Groups) Get() (GroupsResp, error) {
	client := NewHTTPClient(groups.client)
	return client.Get(groups.ToURL(), groups.config)
}
func (groups *Groups) Add(title string, metadata map[string]interface{}) (GroupResp, error) {
	if metadata == nil {
		metadata = make(map[string]interface{})
	}
	metadata["__metadata"] = map[string]string{
		"type": "SP.Group",
	}
	metadata["Title"] = title
	body, _ := json.Marshal(metadata)
	client := NewHTTPClient(groups.client)
	return client.Post(groups.endpoint, bytes.NewBuffer(body), groups.config)
}