Documentation
¶
Index ¶
- func Paginate[T any](fetch func(cursor string) ([]T, *Pagination, error)) ([]T, error)
- type APIError
- type APIKeyResponse
- type Attachment
- type Client
- func (c *Client) CheckContactSuppression(email, userID string) (*ContactSuppression, error)
- func (c *Client) CreateContact(req CreateContactRequest) (string, error)
- func (c *Client) CreateContactProperty(name, propType string) error
- func (c *Client) DeleteContact(email, userID string) error
- func (c *Client) FindContacts(params FindContactParams) ([]Contact, error)
- func (c *Client) GetAPIKey() (*APIKeyResponse, error)
- func (c *Client) ListContactProperties(customOnly bool) ([]ContactProperty, error)
- func (c *Client) ListMailingLists() ([]MailingList, error)
- func (c *Client) ListTransactional(params PaginationParams) ([]TransactionalEmail, *Pagination, error)
- func (c *Client) RemoveContactSuppression(email, userID string) (*ContactSuppressionRemoval, error)
- func (c *Client) SendEvent(req SendEventRequest) error
- func (c *Client) SendTransactional(req SendTransactionalRequest) error
- func (c *Client) UpdateContact(req UpdateContactRequest) error
- func (c *Client) WithUserAgent(ua string) *Client
- type Contact
- type ContactProperty
- type ContactSuppression
- type ContactSuppressionRemoval
- type CreateContactRequest
- type FindContactParams
- type MailingList
- type Pagination
- type PaginationParams
- type SendEventRequest
- type SendTransactionalRequest
- type TransactionalEmail
- type UpdateContactRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIKeyResponse ¶
type APIKeyResponse struct {
TeamName string `json:"teamName"`
}
type Attachment ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CheckContactSuppression ¶ added in v0.0.2
func (c *Client) CheckContactSuppression(email, userID string) (*ContactSuppression, error)
func (*Client) CreateContact ¶
func (c *Client) CreateContact(req CreateContactRequest) (string, error)
func (*Client) CreateContactProperty ¶
func (*Client) DeleteContact ¶
func (*Client) FindContacts ¶
func (c *Client) FindContacts(params FindContactParams) ([]Contact, error)
func (*Client) GetAPIKey ¶
func (c *Client) GetAPIKey() (*APIKeyResponse, error)
func (*Client) ListContactProperties ¶
func (c *Client) ListContactProperties(customOnly bool) ([]ContactProperty, error)
func (*Client) ListMailingLists ¶
func (c *Client) ListMailingLists() ([]MailingList, error)
func (*Client) ListTransactional ¶
func (c *Client) ListTransactional(params PaginationParams) ([]TransactionalEmail, *Pagination, error)
func (*Client) RemoveContactSuppression ¶ added in v0.0.2
func (c *Client) RemoveContactSuppression(email, userID string) (*ContactSuppressionRemoval, error)
func (*Client) SendEvent ¶
func (c *Client) SendEvent(req SendEventRequest) error
func (*Client) SendTransactional ¶
func (c *Client) SendTransactional(req SendTransactionalRequest) error
func (*Client) UpdateContact ¶
func (c *Client) UpdateContact(req UpdateContactRequest) error
func (*Client) WithUserAgent ¶
type Contact ¶
type Contact struct {
ID string `json:"id"`
Email string `json:"email"`
FirstName *string `json:"firstName"`
LastName *string `json:"lastName"`
Source string `json:"source"`
Subscribed bool `json:"subscribed"`
UserGroup string `json:"userGroup"`
UserID *string `json:"userId"`
MailingLists map[string]bool `json:"mailingLists"`
OptInStatus *string `json:"optInStatus"`
Custom map[string]any `json:"-"`
}
func (Contact) MarshalJSON ¶ added in v0.0.4
func (*Contact) UnmarshalJSON ¶ added in v0.0.4
type ContactProperty ¶
type ContactSuppression ¶ added in v0.0.2
type ContactSuppressionRemoval ¶ added in v0.0.2
type CreateContactRequest ¶
type FindContactParams ¶
type MailingList ¶
type Pagination ¶
type PaginationParams ¶
type SendEventRequest ¶
type SendTransactionalRequest ¶
type SendTransactionalRequest struct {
Email string `json:"email"`
TransactionalID string `json:"transactionalId"`
AddToAudience *bool `json:"addToAudience,omitempty"`
DataVariables map[string]any `json:"dataVariables,omitempty"`
Attachments []Attachment `json:"attachments,omitempty"`
IdempotencyKey string `json:"-"`
}
type TransactionalEmail ¶
Click to show internal directories.
Click to hide internal directories.