func (c *Client) TriggerWithParams(
	channel string,
	eventName string,
	data interface{},
	params TriggerParams,
) (*TriggerChannelsList, error) {
	return c.trigger([]string{channel}, eventName, data, params)
}
/*
TriggerWithParams is the same as `client.Trigger`, except it allows additional
parameters to be passed in. See:
https://pusher.com/docs/channels/library_auth_reference/rest-api#request
for a complete list.

data := map[string]string{"hello": "world"}
socketID := "1234.12"
attributes := "user_count"
params := pusher.TriggerParams{SocketID: &socketID, Info: &attributes}
channels, err := client.Trigger("greeting_channel", "say_hello", data, params)

channels=> &{Channels:map[presence-chatroom:{UserCount:4} presence-notifications:{UserCount:31}]}
package pusher
import (
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"os"
	"regexp"
	"strings"
	"time"
)
var pusherPathRegex = regexp.MustCompile("^/apps/([0-9]+)$")
var maxTriggerableChannels = 100
const (
	libraryVersion = "5.0.0"
	libraryName    = "pusher-http-go"
)
type Client struct {
	AppID                        string
	Key                          string
	Secret                       string
	Host                         string  
	Secure                       bool    
	Cluster                      string
	HTTPClient                   *http.Client
	EncryptionMasterKey          string   
	EncryptionMasterKeyBase64    string   
	OverrideMaxMessagePayloadKB  int      
	validatedEncryptionMasterKey *[]byte  
}
func ClientFromURL(serverURL string) (*Client, error) {
	url2, err := url.Parse(serverURL)
	if err != nil {
		return nil, err
	}
	c := Client{
		Host: url2.Host,
	}
	matches := pusherPathRegex.FindStringSubmatch(url2.Path)
	if len(matches) == 0 {
		return nil, errors.New("No app ID found")
	}
	c.AppID = matches[1]
	if url2.User == nil {
		return nil, errors.New("Missing <key>:<secret>")
	}
	c.Key = url2.User.Username()
	var isSet bool
	c.Secret, isSet = url2.User.Password()
	if !isSet {
		return nil, errors.New("Missing <secret>")
	}
	if url2.Scheme == "https" {
		c.Secure = true
	}
	return &c, nil
}
func ClientFromEnv(key string) (*Client, error) {
	url := os.Getenv(key)
	return ClientFromURL(url)
}
func (c *Client) requestClient() *http.Client {
	if c.HTTPClient == nil {
		c.HTTPClient = &http.Client{Timeout: time.Second * 5}
	}
	return c.HTTPClient
}
func (c *Client) request(method, url string, body []byte) ([]byte, error) {
	return request(c.requestClient(), method, url, body)
}
func (c *Client) Trigger(channel string, eventName string, data interface{}) error {
	_, err := c.trigger([]string{channel}, eventName, data, TriggerParams{})
	return err
}
type TriggerParams struct {
	SocketID *string
	Info *string
}
func (params TriggerParams) toMap() map[string]string {
	m := make(map[string]string)
	if params.SocketID != nil {
		m["socket_id"] = *params.SocketID
	}
	if params.Info != nil {
		m["info"] = *params.Info
	}
	return m
}