Documentation
¶
Index ¶
- type CustomerIO
- func (c *CustomerIO) AddCustomersToSegment(segmentID int, customerIDs []string) error
- func (c *CustomerIO) AddDevice(customerID string, deviceID string, platform string, ...) error
- func (c *CustomerIO) BetaCustomerAttributes(customerID string) (map[string]string, error)
- func (c *CustomerIO) CampaignTrigger(campaignID int, data, recipients map[string]interface{}) error
- func (c *CustomerIO) Delete(customerID string) error
- func (c *CustomerIO) DeleteDevice(customerID string, deviceID string) error
- func (c *CustomerIO) Identify(customerID string, attributes map[string]interface{}) error
- func (c *CustomerIO) RemoveCustomersFromSegment(segmentID int, customerIDs []string) error
- func (c *CustomerIO) Track(customerID string, eventName string, data map[string]interface{}) error
- func (c *CustomerIO) TrackAnonymous(eventName string, data map[string]interface{}) error
- type CustomerIOError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomerIO ¶
type CustomerIO struct {
Host string
HostAPI string
HostBeta string
SSL bool
// contains filtered or unexported fields
}
CustomerIO wraps the customer.io API, see: http://customer.io/docs/api/rest.html
func NewCustomerIO ¶
func NewCustomerIO(siteID, apiKey string) *CustomerIO
NewCustomerIO creates a new CustomerIO object to perform requests on the supplied credentials
func (*CustomerIO) AddCustomersToSegment ¶ added in v1.0.1
func (c *CustomerIO) AddCustomersToSegment(segmentID int, customerIDs []string) error
func (*CustomerIO) AddDevice ¶ added in v1.0.1
func (c *CustomerIO) AddDevice(customerID string, deviceID string, platform string, data map[string]interface{}) error
AddDevice adds a device for a customer
func (*CustomerIO) BetaCustomerAttributes ¶ added in v1.0.1
func (c *CustomerIO) BetaCustomerAttributes(customerID string) (map[string]string, error)
func (*CustomerIO) CampaignTrigger ¶ added in v1.0.1
func (c *CustomerIO) CampaignTrigger(campaignID int, data, recipients map[string]interface{}) error
func (*CustomerIO) Delete ¶
func (c *CustomerIO) Delete(customerID string) error
Delete deletes a customer
func (*CustomerIO) DeleteDevice ¶ added in v1.0.1
func (c *CustomerIO) DeleteDevice(customerID string, deviceID string) error
DeleteDevice deletes a device for a customer
func (*CustomerIO) Identify ¶
func (c *CustomerIO) Identify(customerID string, attributes map[string]interface{}) error
Identify identifies a customer and sets their attributes
func (*CustomerIO) RemoveCustomersFromSegment ¶ added in v1.0.1
func (c *CustomerIO) RemoveCustomersFromSegment(segmentID int, customerIDs []string) error
func (*CustomerIO) Track ¶
func (c *CustomerIO) Track(customerID string, eventName string, data map[string]interface{}) error
Track sends a single event to Customer.io for the supplied user
func (*CustomerIO) TrackAnonymous ¶ added in v1.0.1
func (c *CustomerIO) TrackAnonymous(eventName string, data map[string]interface{}) error
TrackAnonymous sends a single event to Customer.io for the anonymous user
type CustomerIOError ¶
type CustomerIOError struct {
// contains filtered or unexported fields
}
CustomerIOError is returned by any method that fails at the API level
func (*CustomerIOError) Error ¶
func (e *CustomerIOError) Error() string
Click to show internal directories.
Click to hide internal directories.