Versions in this module Expand all Collapse all v0 v0.9.3 Mar 28, 2024 Changes in this version + var ErrListMissingIdentifier = errors.New("recipient has no listId or externalId") + var ErrListNotFound = errors.New("list not found") + var ErrRecipientMissingIdentifier = errors.New("recipient has no address, recipientId or externalId") + var ErrRecipientNotFound = errors.New("recipient not found") + type CreateRecipientRequest struct + Address string + Channel string + Comment string + Demographics map[string]string + ExternalID string + Password string + SourceDescription string + Status string + func (crr *CreateRecipientRequest) MarshalJSON() ([]byte, error) + type DeleteRecipientResponse struct + Message string + Status string + type List struct + BlockDomains string + BrandIDs []int + CategoryID int + Channel string + CountRecips bool + CreateTime Time + Creator string + Custom1 string + Description string + ExternalID string + FriendlyTitle string + GlobalUnsub bool + ID int + ListCount int + Populated bool + PublicSignup bool + Query string + SeedListID int + TestMessageList bool + Title string + type PostUp struct + func NewPostUp(user, passwd string, c *http.Client) *PostUp + func (pu *PostUp) DeleteRecipientByAddress(ctx context.Context, addr string) (*DeleteRecipientResponse, error) + func (pu *PostUp) GetListByExternalID(ctx context.Context, id string) (*List, error) + func (pu *PostUp) GetListByListID(ctx context.Context, id int) (*List, error) + func (pu *PostUp) GetListByTitle(ctx context.Context, title string) (*List, error) + func (pu *PostUp) GetLists(ctx context.Context) ([]*List, error) + func (pu *PostUp) GetListsByBrandID(ctx context.Context, id int) ([]*List, error) + func (pu *PostUp) GetRecipientByAddress(ctx context.Context, addr string) (*Recipient, error) + func (pu *PostUp) GetRecipientByExternalID(ctx context.Context, id string) (*Recipient, error) + func (pu *PostUp) GetRecipientByRecipientID(ctx context.Context, id int) (*Recipient, error) + func (pu *PostUp) RecipientCreate(ctx context.Context, crr *CreateRecipientRequest) (*Recipient, error) + func (pu *PostUp) RecipientUpdate(ctx context.Context, id int, urr *UpdateRecipientRequest) (*Recipient, error) + func (pu *PostUp) SubscribeRecipientToList(ctx context.Context, srr *SubscribeRecipientRequest) (*SubscribeRecipientResponse, error) + func (pu *PostUp) UnsubscribeRecipientFromList(ctx context.Context, urr *UnsubscribeRecipientRequest) (*UnsubscribeRecipientResponse, error) + type Recipient struct + Address string + Channel string + Comment string + DateJoined *Time + Demographics map[string]string + ExternalID string + ID int + ImportID int + Password string + SignupMethod string + SourceDescription string + SourceSignupDate *Time + Status string + func (r *Recipient) MarshalJSON() ([]byte, error) + func (r *Recipient) UnmarshalJSON(data []byte) error + type SubscribeRecipientRequest struct + Confirmed bool + List *List + Recipient *Recipient + SourceID string + type SubscribeRecipientResponse struct + Confirmed bool + DateJoined *Time + DateUnsub *Time + GlobalStatus string + ListID int + ListStatus string + MailingID interface{} + RecipientID int + SourceID string + Status SubscriptionStatus + type SubscriptionStatus string + const SubscriptionStatusNormal + const SubscriptionStatusUnsub + type Time struct + func NewTime(t time.Time) Time + func (t *Time) GetTime() time.Time + func (t *Time) MarshalJSON() ([]byte, error) + func (t *Time) UnmarshalJSON(data []byte) error + type UnsubscribeRecipientRequest struct + List *List + Recipient *Recipient + type UnsubscribeRecipientResponse struct + Confirmed bool + DateJoined *Time + DateUnsub *Time + GlobalStatus string + ListID int + ListStatus string + MailingID interface{} + RecipientID int + SourceID string + Status SubscriptionStatus + type UpdateRecipientRequest struct + Address string + Channel string + Comment string + Demographics map[string]string + ExternalID string + Password string + SourceDescription string + Status string + func (urr *UpdateRecipientRequest) MarshalJSON() ([]byte, error)