func (api *Client) GetGroups(excludeArchived bool) ([]Group, error) {
	return api.GetGroupsContext(context.Background(), excludeArchived)
}
GetGroups retrieves all groups
package slack
import (
	"context"
	"net/url"
	"strconv"
)
type Group struct {
	GroupConversation
	IsGroup bool `json:"is_group"`
}
type groupResponseFull struct {
	Group          Group   `json:"group"`
	Groups         []Group `json:"groups"`
	Purpose        string  `json:"purpose"`
	Topic          string  `json:"topic"`
	NotInGroup     bool    `json:"not_in_group"`
	NoOp           bool    `json:"no_op"`
	AlreadyClosed  bool    `json:"already_closed"`
	AlreadyOpen    bool    `json:"already_open"`
	AlreadyInGroup bool    `json:"already_in_group"`
	Channel        Channel `json:"channel"`
	History
	SlackResponse
}
func (api *Client) groupRequest(ctx context.Context, path string, values url.Values) (*groupResponseFull, error) {
	response := &groupResponseFull{}
	err := api.postMethod(ctx, path, values, response)
	if err != nil {
		return nil, err
	}
	return response, response.Err()
}
func (api *Client) ArchiveGroup(group string) error {
	return api.ArchiveGroupContext(context.Background(), group)
}
func (api *Client) ArchiveGroupContext(ctx context.Context, group string) error {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
	}
	_, err := api.groupRequest(ctx, "groups.archive", values)
	return err
}
func (api *Client) UnarchiveGroup(group string) error {
	return api.UnarchiveGroupContext(context.Background(), group)
}
func (api *Client) UnarchiveGroupContext(ctx context.Context, group string) error {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
	}
	_, err := api.groupRequest(ctx, "groups.unarchive", values)
	return err
}
func (api *Client) CreateGroup(group string) (*Group, error) {
	return api.CreateGroupContext(context.Background(), group)
}
func (api *Client) CreateGroupContext(ctx context.Context, group string) (*Group, error) {
	values := url.Values{
		"token": {api.token},
		"name":  {group},
	}
	response, err := api.groupRequest(ctx, "groups.create", values)
	if err != nil {
		return nil, err
	}
	return &response.Group, nil
}
func (api *Client) CreateChildGroup(group string) (*Group, error) {
	return api.CreateChildGroupContext(context.Background(), group)
}
func (api *Client) CreateChildGroupContext(ctx context.Context, group string) (*Group, error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
	}
	response, err := api.groupRequest(ctx, "groups.createChild", values)
	if err != nil {
		return nil, err
	}
	return &response.Group, nil
}
func (api *Client) GetGroupHistory(group string, params HistoryParameters) (*History, error) {
	return api.GetGroupHistoryContext(context.Background(), group, params)
}
func (api *Client) GetGroupHistoryContext(ctx context.Context, group string, params HistoryParameters) (*History, error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
	}
	if params.Latest != DEFAULT_HISTORY_LATEST {
		values.Add("latest", params.Latest)
	}
	if params.Oldest != DEFAULT_HISTORY_OLDEST {
		values.Add("oldest", params.Oldest)
	}
	if params.Count != DEFAULT_HISTORY_COUNT {
		values.Add("count", strconv.Itoa(params.Count))
	}
	if params.Inclusive != DEFAULT_HISTORY_INCLUSIVE {
		if params.Inclusive {
			values.Add("inclusive", "1")
		} else {
			values.Add("inclusive", "0")
		}
	}
	if params.Unreads != DEFAULT_HISTORY_UNREADS {
		if params.Unreads {
			values.Add("unreads", "1")
		} else {
			values.Add("unreads", "0")
		}
	}
	response, err := api.groupRequest(ctx, "groups.history", values)
	if err != nil {
		return nil, err
	}
	return &response.History, nil
}
func (api *Client) InviteUserToGroup(group, user string) (*Group, bool, error) {
	return api.InviteUserToGroupContext(context.Background(), group, user)
}
func (api *Client) InviteUserToGroupContext(ctx context.Context, group, user string) (*Group, bool, error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
		"user":    {user},
	}
	response, err := api.groupRequest(ctx, "groups.invite", values)
	if err != nil {
		return nil, false, err
	}
	return &response.Group, response.AlreadyInGroup, nil
}
func (api *Client) LeaveGroup(group string) error {
	return api.LeaveGroupContext(context.Background(), group)
}
func (api *Client) LeaveGroupContext(ctx context.Context, group string) (err error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
	}
	_, err = api.groupRequest(ctx, "groups.leave", values)
	return err
}
func (api *Client) KickUserFromGroup(group, user string) error {
	return api.KickUserFromGroupContext(context.Background(), group, user)
}
func (api *Client) KickUserFromGroupContext(ctx context.Context, group, user string) (err error) {
	values := url.Values{
		"token":   {api.token},
		"channel": {group},
		"user":    {user},
	}
	_, err = api.groupRequest(ctx, "groups.kick", values)
	return err
}