Versions in this module Expand all Collapse all v1 v1.0.11 May 9, 2024 Changes in this version + func IsAPIError(e error) bool + func WithHeader(key, value string, replace bool) requestOption + func WithHeaders(header http.Header) requestOption + type APIError struct + Code int + Message string + func (e APIError) Error() string + type BlocklistsQuerySubscriberService struct + func (s *BlocklistsQuerySubscriberService) Do(ctx context.Context, opts ...requestOption) (*bool, error) + func (s *BlocklistsQuerySubscriberService) Query(query string) *BlocklistsQuerySubscriberService + type BlocklistsSubscriberService struct + func (s *BlocklistsSubscriberService) Do(ctx context.Context, opts ...requestOption) (*bool, error) + func (s *BlocklistsSubscriberService) Id(id uint) *BlocklistsSubscriberService + type Campaign struct + Body string + CampaignId uint + Clicks uint + ContentType string + CreatedAt time.Time + FromEmail string + Id uint + Lists []CampaignList + Messenger string + Name string + SendAt time.Time + Sent uint + StartedAt time.Time + Status string + Subject string + Tags []string + TemplateId uint + ToSend uint + Type string + UpdatedAt time.Time + Uuid string + View uint + type CampaignList struct + Id uint + Name string + type Client struct + func NewClient(baseURL string, username, password *string) *Client + func NewClientWithCustomHTTPClient(baseURL string, username, password *string, httpClient *http.Client) *Client + func (c *Client) NewBlocklistsQuerySubscriberService() *BlocklistsQuerySubscriberService + func (c *Client) NewBlocklistsSubscriberService() *BlocklistsSubscriberService + func (c *Client) NewCreateCampaignService() *CreateCampaignService + func (c *Client) NewCreateListService() *CreateListService + func (c *Client) NewCreateMediaService() *CreateMediaService + func (c *Client) NewCreateSubscriberService() *CreateSubscriberService + func (c *Client) NewDeleteCampaignService() *DeleteCampaignService + func (c *Client) NewDeleteListService() *DeleteListService + func (c *Client) NewDeleteMediaService() *DeleteMediaService + func (c *Client) NewDeleteSubscriberService() *DeleteSubscriberService + func (c *Client) NewDeleteSubscribersQueryService() *DeleteSubscribersQueryService + func (c *Client) NewDeleteSubscribersService() *DeleteSubscribersService + func (c *Client) NewDeleteTemplateService() *DeleteTemplateService + func (c *Client) NewGetCampaignService() *GetCampaignService + func (c *Client) NewGetCampaignsService() *GetCampaignsService + func (c *Client) NewGetListService() *GetListService + func (c *Client) NewGetListsService() *GetListsService + func (c *Client) NewGetMediaService() *GetMediaService + func (c *Client) NewGetSubscriberService() *GetSubscriberService + func (c *Client) NewGetSubscribersService() *GetSubscribersService + func (c *Client) NewGetTemplatePreviewService() *GetTemplatePreviewService + func (c *Client) NewGetTemplateService() *GetTemplateService + func (c *Client) NewGetTemplatesService() *GetTemplatesService + func (c *Client) NewPostTransactionalService() *PostTransactionalService + func (c *Client) NewUpdateCampaignStatusService() *UpdateCampaignStatusService + func (c *Client) NewUpdateListService() *UpdateListService + func (c *Client) NewUpdateSubscriberService() *UpdateSubscriberService + func (c *Client) NewUpdateSubscribersListsService() *UpdateSubscribersListsService + func (c *Client) NewUpdateTemplateAsDefaultService() *UpdateTemplateAsDefaultService + type ClientInterface interface + type CreateCampaignService struct + func (s *CreateCampaignService) AltBody(altBody string) *CreateCampaignService + func (s *CreateCampaignService) Body(body string) *CreateCampaignService + func (s *CreateCampaignService) ContentType(contentType string) *CreateCampaignService + func (s *CreateCampaignService) Do(ctx context.Context, opts ...requestOption) (*Campaign, error) + func (s *CreateCampaignService) FromEmail(fromEmail string) *CreateCampaignService + func (s *CreateCampaignService) Lists(lists []uint) *CreateCampaignService + func (s *CreateCampaignService) Messenger(messenger string) *CreateCampaignService + func (s *CreateCampaignService) Name(name string) *CreateCampaignService + func (s *CreateCampaignService) SendAt(sendAt time.Time) *CreateCampaignService + func (s *CreateCampaignService) Subject(subject string) *CreateCampaignService + func (s *CreateCampaignService) Tags(tags []string) *CreateCampaignService + func (s *CreateCampaignService) TemplateId(templateId uint) *CreateCampaignService + func (s *CreateCampaignService) Type(type_ string) *CreateCampaignService + type CreateListService struct + func (s *CreateListService) Do(ctx context.Context, opts ...requestOption) (*List, error) + func (s *CreateListService) Name(name string) *CreateListService + func (s *CreateListService) Optin(optin string) *CreateListService + func (s *CreateListService) Tags(tags []string) *CreateListService + func (s *CreateListService) Type(type_ string) *CreateListService + type CreateMediaService struct + func (s *CreateMediaService) Do(ctx context.Context, opts ...requestOption) (*Media, error) + func (s *CreateMediaService) File(file []byte) *CreateMediaService + type CreateSubscriberService struct + func (s *CreateSubscriberService) Attributes(attributes map[string]interface{}) *CreateSubscriberService + func (s *CreateSubscriberService) Do(ctx context.Context, opts ...requestOption) (*Subscriber, error) + func (s *CreateSubscriberService) Email(email string) *CreateSubscriberService + func (s *CreateSubscriberService) ListIds(listIds []uint) *CreateSubscriberService + func (s *CreateSubscriberService) Name(name string) *CreateSubscriberService + func (s *CreateSubscriberService) PreconfirmSubscriptions(preconfirmSubscriptions bool) *CreateSubscriberService + func (s *CreateSubscriberService) Status(status string) *CreateSubscriberService + type DeleteCampaignService struct + func (s *DeleteCampaignService) Do(ctx context.Context, opts ...requestOption) error + func (s *DeleteCampaignService) Id(id uint) *DeleteCampaignService + type DeleteImportService struct + func (s *DeleteImportService) Do(ctx context.Context, opts ...requestOption) error + type DeleteListService struct + func (s *DeleteListService) Do(ctx context.Context, opts ...requestOption) error + func (s *DeleteListService) Id(id uint) *DeleteListService + type DeleteMediaService struct + func (s *DeleteMediaService) Do(ctx context.Context, opts ...requestOption) error + func (s *DeleteMediaService) Id(id uint) *DeleteMediaService + type DeleteSubscriberService struct + func (s *DeleteSubscriberService) Do(ctx context.Context, opts ...requestOption) (*bool, error) + func (s *DeleteSubscriberService) Id(id uint) *DeleteSubscriberService + type DeleteSubscribersQueryService struct + func (s *DeleteSubscribersQueryService) Do(ctx context.Context, opts ...requestOption) (*bool, error) + func (s *DeleteSubscribersQueryService) Query(query string) *DeleteSubscribersQueryService + type DeleteSubscribersService struct + func (s *DeleteSubscribersService) Do(ctx context.Context, opts ...requestOption) (*bool, error) + func (s *DeleteSubscribersService) Ids(ids []uint) *DeleteSubscribersService + type DeleteTemplateService struct + func (s *DeleteTemplateService) Do(ctx context.Context, opts ...requestOption) error + func (s *DeleteTemplateService) Id(id uint) *DeleteTemplateService + type GetCampaignPreviewService struct + func (s *GetCampaignPreviewService) Do(ctx context.Context, opts ...requestOption) ([]byte, error) + func (s *GetCampaignPreviewService) Id(id uint) *GetCampaignPreviewService + type GetCampaignService struct + func (s *GetCampaignService) Do(ctx context.Context, opts ...requestOption) (*Campaign, error) + func (s *GetCampaignService) Id(id uint) *GetCampaignService + type GetCampaignsService struct + func (s *GetCampaignsService) Do(ctx context.Context, opts ...requestOption) ([]*Campaign, error) + func (s *GetCampaignsService) Order(order string) *GetCampaignsService + func (s *GetCampaignsService) OrderBy(orderBy string) *GetCampaignsService + func (s *GetCampaignsService) Page(page uint) *GetCampaignsService + func (s *GetCampaignsService) PerPage(perPage string) *GetCampaignsService + func (s *GetCampaignsService) Query(query string) *GetCampaignsService + type GetImportLogsService struct + func (s *GetImportLogsService) Do(ctx context.Context, opts ...requestOption) (*string, error) + type GetImportStatusService struct + func (s *GetImportStatusService) Do(ctx context.Context, opts ...requestOption) (*ImportStatus, error) + type GetListService struct + func (s *GetListService) Do(ctx context.Context, opts ...requestOption) (*List, error) + func (s *GetListService) Id(id uint) *GetListService + type GetListsService struct + func (s *GetListsService) Do(ctx context.Context, opts ...requestOption) ([]*List, error) + func (s *GetListsService) Order(order string) *GetListsService + func (s *GetListsService) OrderBy(orderBy string) *GetListsService + func (s *GetListsService) Page(page uint) *GetListsService + func (s *GetListsService) PerPage(perPage string) *GetListsService + func (s *GetListsService) Query(query string) *GetListsService + type GetMediaService struct + func (s *GetMediaService) Do(ctx context.Context, opts ...requestOption) ([]*Media, error) + type GetSubscriberService struct + func (s *GetSubscriberService) Do(ctx context.Context, opts ...requestOption) (*Subscriber, error) + func (s *GetSubscriberService) Id(id uint) *GetSubscriberService + type GetSubscribersService struct + func (s *GetSubscribersService) Do(ctx context.Context, opts ...requestOption) ([]*Subscriber, error) + func (s *GetSubscribersService) ListIds(listIds []uint) *GetSubscribersService + func (s *GetSubscribersService) Page(page uint) *GetSubscribersService + func (s *GetSubscribersService) PerPage(perPage string) *GetSubscribersService + func (s *GetSubscribersService) Query(query string) *GetSubscribersService + type GetTemplatePreviewService struct + func (s *GetTemplatePreviewService) Do(ctx context.Context, opts ...requestOption) (string, error) + func (s *GetTemplatePreviewService) Id(id uint) *GetTemplatePreviewService + type GetTemplateService struct + func (s *GetTemplateService) Do(ctx context.Context, opts ...requestOption) (*Template, error) + func (s *GetTemplateService) Id(id uint) *GetTemplateService + type GetTemplatesService struct + func (s *GetTemplatesService) Do(ctx context.Context, opts ...requestOption) ([]*Template, error) + type ImportStatus struct + Imported uint + Name string + Status string + Total uint + type ImportSubscribersService struct + func (s *ImportSubscribersService) Do(ctx context.Context, opts ...requestOption) error + func (s *ImportSubscribersService) File(file []byte) *ImportSubscribersService + func (s *ImportSubscribersService) Params(params map[string]interface{}) *ImportSubscribersService + type List struct + CreatedAt time.Time + Id uint + Name string + Optin string + SubscribersCount uint + Tags []string + Type string + UpdatedAt time.Time + Uuid string + type Media struct + CreatedAt time.Time + Filename string + Id uint + ThumbUrl string + Uri string + Uuid string + type PostTransactionalService struct + func (s *PostTransactionalService) ContentType(content_type string) *PostTransactionalService + func (s *PostTransactionalService) Data(data map[string]string) *PostTransactionalService + func (s *PostTransactionalService) Do(ctx context.Context, opts ...requestOption) error + func (s *PostTransactionalService) FromEmail(email string) *PostTransactionalService + func (s *PostTransactionalService) Headers(headers map[string]string) *PostTransactionalService + func (s *PostTransactionalService) Messenger(messenger string) *PostTransactionalService + func (s *PostTransactionalService) SubscriberEmail(email string) *PostTransactionalService + func (s *PostTransactionalService) SubscriberEmails(emails []string) *PostTransactionalService + func (s *PostTransactionalService) SubscriberId(id uint) *PostTransactionalService + func (s *PostTransactionalService) SubscriberIds(ids []uint) *PostTransactionalService + func (s *PostTransactionalService) TemplateId(id uint) *PostTransactionalService + type Subscriber struct + Attributes map[string]interface{} + CreatedAt time.Time + Email string + Id uint + Lists []SubscriberList + Name string + Status string + UpdatedAt time.Time + Uuid string + type SubscriberList struct + CreatedAt time.Time + Id uint + Name string + SubscriptionStatus string + Tags []string + Type string + UpdatedAt time.Time + Uuid string + type Template struct + Body string + CreatedAt time.Time + Id uint + IsDefault bool + Name string + Type string + UpdatedAt time.Time + type UpdateCampaignStatusService struct + func (s *UpdateCampaignStatusService) Do(ctx context.Context, opts ...requestOption) (*Campaign, error) + func (s *UpdateCampaignStatusService) Id(id uint) *UpdateCampaignStatusService + func (s *UpdateCampaignStatusService) Status(status string) *UpdateCampaignStatusService + type UpdateListService struct + func (s *UpdateListService) Do(ctx context.Context, opts ...requestOption) (*List, error) + func (s *UpdateListService) Id(id uint) *UpdateListService + func (s *UpdateListService) Optin(optin string) *UpdateListService + func (s *UpdateListService) Tags(tags []string) *UpdateListService + func (s *UpdateListService) Type(type_ string) *UpdateListService + type UpdateSubscriberService struct + func (s *UpdateSubscriberService) Attributes(attributes map[string]interface{}) *UpdateSubscriberService + func (s *UpdateSubscriberService) Do(ctx context.Context, opts ...requestOption) (*Subscriber, error) + func (s *UpdateSubscriberService) Email(email string) *UpdateSubscriberService + func (s *UpdateSubscriberService) Id(id uint) *UpdateSubscriberService + func (s *UpdateSubscriberService) ListIds(listIds []uint) *UpdateSubscriberService + func (s *UpdateSubscriberService) Name(name string) *UpdateSubscriberService + func (s *UpdateSubscriberService) PreconfirmSubscriptions(preconfirmSubscriptions bool) *UpdateSubscriberService + func (s *UpdateSubscriberService) Status(status string) *UpdateSubscriberService + type UpdateSubscribersListsService struct + func (s *UpdateSubscribersListsService) Action(action string) *UpdateSubscribersListsService + func (s *UpdateSubscribersListsService) Do(ctx context.Context, opts ...requestOption) (*bool, error) + func (s *UpdateSubscribersListsService) Ids(ids []uint) *UpdateSubscribersListsService + func (s *UpdateSubscribersListsService) ListIds(listIds []uint) *UpdateSubscribersListsService + func (s *UpdateSubscribersListsService) Status(status string) *UpdateSubscribersListsService + type UpdateTemplateAsDefaultService struct + func (s *UpdateTemplateAsDefaultService) Do(ctx context.Context, opts ...requestOption) (*Template, error) + func (s *UpdateTemplateAsDefaultService) Id(id uint) *UpdateTemplateAsDefaultService