Documentation ¶
Overview ¶
Package mailchimp has types for working with the Mailchimp API.
Index ¶
- func AddFlags(fs *flag.FlagSet) func(c *http.Client) V3
- func ImportPage(ctx context.Context, cl *http.Client, page string) (body string, err error)
- func PageContent(doc *html.Node) (body string, err error)
- type AbSplitOpts
- type Archive
- type Campaign
- type Capsule
- type Combinations
- type DailySend
- type DeliveryStatus
- type Ecommerce
- type EmailService
- type ErrorResponse
- type Links
- type ListCampaignsResp
- type MockEmailService
- type Newsletter
- type PostCampaignRequest
- type PostCampaignResponse
- type PutCampaignRequest
- type PutCampaignResponse
- type Recipients
- type ReportSummary
- type RssOpts
- type Salesforce
- type Schedule
- type SegmentOpts
- type Settings
- type SocialCard
- type Template
- type TestEmailRequest
- type Tracking
- type V3
- type VariateContents
- type VariateSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportPage ¶
Types ¶
type AbSplitOpts ¶
type AbSplitOpts struct { SplitTest string `json:"split_test,omitempty"` PickWinner string `json:"pick_winner,omitempty"` WaitUnits string `json:"wait_units,omitempty"` WaitTime int `json:"wait_time,omitempty"` SplitSize int `json:"split_size,omitempty"` FromNameA string `json:"from_name_a,omitempty"` FromNameB string `json:"from_name_b,omitempty"` ReplyEmailA string `json:"reply_email_a,omitempty"` ReplyEmailB string `json:"reply_email_b,omitempty"` SubjectA string `json:"subject_a,omitempty"` SubjectB string `json:"subject_b,omitempty"` SendTimeA time.Time `json:"send_time_a,omitempty"` SendTimeB time.Time `json:"send_time_b,omitempty"` SendTimeWinner string `json:"send_time_winner,omitempty"` }
type Combinations ¶
type Combinations struct { ID string `json:"id,omitempty"` SubjectLine int `json:"subject_line,omitempty"` SendTime int `json:"send_time,omitempty"` FromName int `json:"from_name,omitempty"` ReplyTo int `json:"reply_to,omitempty"` ContentDescription int `json:"content_description,omitempty"` Recipients int `json:"recipients,omitempty"` }
type DailySend ¶
type DailySend struct { Sunday bool `json:"sunday,omitempty"` Monday bool `json:"monday,omitempty"` Tuesday bool `json:"tuesday,omitempty"` Wednesday bool `json:"wednesday,omitempty"` Thursday bool `json:"thursday,omitempty"` Friday bool `json:"friday,omitempty"` Saturday bool `json:"saturday,omitempty"` }
type DeliveryStatus ¶
type EmailService ¶
func NewMailService ¶
func NewMailService(apiKey, listID string, c *http.Client) EmailService
type ErrorResponse ¶
type ListCampaignsResp ¶
type ListCampaignsResp struct {
Campaigns []Campaign `json:"campaigns"`
}
func (*ListCampaignsResp) ToNewsletters ¶
func (resp *ListCampaignsResp) ToNewsletters(mcKind string) []Newsletter
type MockEmailService ¶
type MockEmailService struct { }
type Newsletter ¶
type PostCampaignRequest ¶
type PostCampaignRequest struct { Type string `json:"type"` Recipients Recipients `json:"recipients,omitempty"` Settings Settings `json:"settings,omitempty"` VariateSettings *VariateSettings `json:"variate_settings,omitempty"` Tracking *Tracking `json:"tracking,omitempty"` RssOpts *RssOpts `json:"rss_opts,omitempty"` SocialCard *SocialCard `json:"social_card,omitempty"` ContentType string `json:"content_type,omitempty"` }
type PostCampaignResponse ¶
type PostCampaignResponse struct { ID string `json:"id"` WebID int `json:"web_id"` ParentCampaignID string `json:"parent_campaign_id"` Type string `json:"type"` CreateTime time.Time `json:"create_time"` ArchiveURL string `json:"archive_url"` LongArchiveURL string `json:"long_archive_url"` Status string `json:"status"` EmailsSent int `json:"emails_sent"` SendTime string `json:"send_time"` ContentType string `json:"content_type"` NeedsBlockRefresh bool `json:"needs_block_refresh"` Resendable bool `json:"resendable"` Recipients Recipients `json:"recipients"` Settings Settings `json:"settings"` VariateSettings VariateSettings `json:"variate_settings"` Tracking Tracking `json:"tracking"` RssOpts RssOpts `json:"rss_opts"` AbSplitOpts AbSplitOpts `json:"ab_split_opts"` SocialCard SocialCard `json:"social_card"` ReportSummary ReportSummary `json:"report_summary"` DeliveryStatus DeliveryStatus `json:"delivery_status"` Links []Links `json:"_links"` }
type PutCampaignRequest ¶
type PutCampaignRequest struct { PlainText string `json:"plain_text,omitempty"` HTML string `json:"html,omitempty"` URL string `json:"url,omitempty"` Template *Template `json:"template,omitempty"` Archive *Archive `json:"archive,omitempty"` VariateContents []any `json:"variate_contents,omitempty"` }
type PutCampaignResponse ¶
type PutCampaignResponse struct { VariateContents []VariateContents `json:"variate_contents"` PlainText string `json:"plain_text"` HTML string `json:"html"` ArchiveHTML string `json:"archive_html"` Links []Links `json:"_links"` }
type Recipients ¶
type Recipients struct { ListID string `json:"list_id,omitempty"` ListIsActive bool `json:"list_is_active,omitempty"` ListName string `json:"list_name,omitempty"` SegmentText string `json:"segment_text,omitempty"` RecipientCount int `json:"recipient_count,omitempty"` SegmentOpts SegmentOpts `json:"segment_opts,omitempty"` }
type ReportSummary ¶
type ReportSummary struct { Opens int `json:"opens,omitempty"` UniqueOpens int `json:"unique_opens,omitempty"` OpenRate int `json:"open_rate,omitempty"` Clicks int `json:"clicks,omitempty"` SubscriberClicks int `json:"subscriber_clicks,omitempty"` ClickRate int `json:"click_rate,omitempty"` Ecommerce Ecommerce `json:"ecommerce,omitempty"` }
type Salesforce ¶
type SegmentOpts ¶
type Settings ¶
type Settings struct { SubjectLine string `json:"subject_line,omitempty"` PreviewText string `json:"preview_text,omitempty"` Title string `json:"title,omitempty"` FromName string `json:"from_name,omitempty"` ReplyTo string `json:"reply_to,omitempty"` UseConversation bool `json:"use_conversation,omitempty"` ToName string `json:"to_name,omitempty"` FolderID string `json:"folder_id,omitempty"` Authenticate bool `json:"authenticate,omitempty"` InlineCSS bool `json:"inline_css,omitempty"` AutoTweet bool `json:"auto_tweet,omitempty"` AutoFbPost []string `json:"auto_fb_post,omitempty"` FbComments bool `json:"fb_comments,omitempty"` Timewarp bool `json:"timewarp,omitempty"` TemplateID int `json:"template_id,omitempty"` DragAndDrop bool `json:"drag_and_drop,omitempty"` }
type SocialCard ¶
type TestEmailRequest ¶
type Tracking ¶
type Tracking struct { Opens bool `json:"opens,omitempty"` HTMLClicks bool `json:"html_clicks,omitempty"` TextClicks bool `json:"text_clicks,omitempty"` GoalTracking bool `json:"goal_tracking,omitempty"` Ecomm360 bool `json:"ecomm360,omitempty"` GoogleAnalytics string `json:"google_analytics,omitempty"` Clicktale string `json:"clicktale,omitempty"` Salesforce Salesforce `json:"salesforce,omitempty"` Capsule Capsule `json:"capsule,omitempty"` }
type V3 ¶
type V3 struct {
// contains filtered or unexported fields
}
func (V3) ListCampaigns ¶
func (v3 V3) ListCampaigns(ctx context.Context) (*ListCampaignsResp, error)
type VariateContents ¶
type VariateSettings ¶
type VariateSettings struct { WinningCombinationID string `json:"winning_combination_id,omitempty"` WinningCampaignID string `json:"winning_campaign_id,omitempty"` WinnerCriteria string `json:"winner_criteria,omitempty"` WaitTime int `json:"wait_time,omitempty"` TestSize int `json:"test_size,omitempty"` SubjectLines []string `json:"subject_lines,omitempty"` SendTimes []time.Time `json:"send_times,omitempty"` FromNames []string `json:"from_names,omitempty"` ReplyToAddresses []string `json:"reply_to_addresses,omitempty"` Contents []string `json:"contents,omitempty"` Combinations []Combinations `json:"combinations,omitempty"` }
Click to show internal directories.
Click to hide internal directories.