Documentation
¶
Index ¶
- func NormalizeKey(key string) string
- func NormalizedFields(customFields map[string]interface{}) map[string]interface{}
- type Client
- func (c Client) BatchUpdateSubscribers(subscribers []Subscriber) error
- func (c Client) CreateSubscriber(email string, customFields map[string]interface{}) error
- func (c Client) RecordEvent(email, eventName string) error
- func (c Client) TagSubscriber(email, tag string) error
- func (c Client) UntagSubscriber(email, tagName string) error
- func (c Client) UpdateSubscriberEmail(email, newEmail string) error
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeKey ¶ added in v0.3.0
func NormalizedFields ¶ added in v0.3.0
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Drip API client wrapper
func NewClient ¶
NewClient returns a client instance ready to act with Drip for the given app and API key
func (Client) BatchUpdateSubscribers ¶ added in v0.3.0
func (c Client) BatchUpdateSubscribers(subscribers []Subscriber) error
func (Client) CreateSubscriber ¶
CreateSubscriber creates a new or updates an existing subscriber by email
func (Client) RecordEvent ¶
RecordEvent sends a custom event to Drip
func (Client) TagSubscriber ¶
TagSubscriber adds a tag to a subscriber
func (Client) UntagSubscriber ¶ added in v0.2.0
UntagSubscriber removes a tag from the subscriber email address
func (Client) UpdateSubscriberEmail ¶ added in v0.3.4
UpdateSubscriberEmail updates an existing subscriber's email address. If an existing subscriber doesn't exist, a new subscriber is created with the newEmail value.
type Subscriber ¶ added in v0.3.0
type Subscriber struct {
Email string `json:"email"`
CustomFields map[string]interface{} `json:"custom_fields,omitempty"`
Tags []string `json:"tags,omitempty"`
// contains filtered or unexported fields
}
func NewSubscriber ¶ added in v0.3.0
func NewSubscriber(email string) Subscriber
func (*Subscriber) AddCustomField ¶ added in v0.3.0
func (s *Subscriber) AddCustomField(key, value string)
Click to show internal directories.
Click to hide internal directories.