Documentation ¶
Overview ¶
The API package provides the basic support for using HTTP to talk to the Mandrill and Mailchimp API's. Each Struct contains a Key, Transport and endpoint property
Index ¶
- Constants
- type APIError
- type APITime
- type ActivityDetail
- type Attachment
- type BatchError
- type BatchResponse
- type BatchSubscribe
- type BatchSubscribeResponse
- type BatchSubscriberError
- type BatchUnsubscribe
- type CampaignCreate
- type CampaignCreateContent
- type CampaignCreateOptions
- type CampaignList
- type CampaignListFilter
- type CampaignListResponse
- type CampaignResponse
- type CampaignSendResponse
- type CampaignTracking
- type ChimpAPI
- func (a *ChimpAPI) BatchSubscribe(req BatchSubscribe) (BatchSubscribeResponse, error)
- func (a *ChimpAPI) BatchUnsubscribe(req BatchUnsubscribe) (BatchResponse, error)
- func (a *ChimpAPI) CampaignCreate(req CampaignCreate) (CampaignResponse, error)
- func (a *ChimpAPI) CampaignList(req CampaignList) (CampaignListResponse, error)
- func (a *ChimpAPI) CampaignSend(cid string) (CampaignSendResponse, error)
- func (a *ChimpAPI) GetClicks(req ReportsClicks) (ReportClicksResponse, error)
- func (a *ChimpAPI) GetContent(cid string, options map[string]interface{}, contentFormat string) (ContentResponse, error)
- func (a *ChimpAPI) GetContentAsJson(cid string, options map[string]interface{}) (ContentResponse, error)
- func (a *ChimpAPI) GetContentAsXML(cid string, options map[string]interface{}) (ContentResponse, error)
- func (a *ChimpAPI) GetSummary(req ReportsSummary) (ReportSummaryResponse, error)
- func (a *ChimpAPI) InlineCSS(req InlineCSSRequest) (InlineCSSResponse, error)
- func (a *ChimpAPI) InterestGroupAdd(req InterestGroupAdd) (InterestGroupAddResponse, error)
- func (a *ChimpAPI) InterestGroupingsList(req InterestGroupingsList) ([]InterestGroupingsListResponse, error)
- func (a *ChimpAPI) ListsList(req ListsList) (ListsListResponse, error)
- func (a *ChimpAPI) ListsSubscribe(req ListsSubscribe) (Email, error)
- func (a *ChimpAPI) ListsUnsubscribe(req ListsUnsubscribe) error
- func (a *ChimpAPI) MemberInfo(req ListsMemberInfo) (ListsMemberInfoResponse, error)
- func (a *ChimpAPI) Members(req ListsMembers) (ListsMembersResponse, error)
- func (a *ChimpAPI) StaticSegmentAdd(req ListsStaticSegmentAdd) (ListsStaticSegmentAddResponse, error)
- func (a *ChimpAPI) StaticSegmentDel(req ListsStaticSegment) (ListsStaticSegmentUpdateResponse, error)
- func (a *ChimpAPI) StaticSegmentMembersAdd(req ListsStaticSegmentMembers) (ListsStaticSegmentMembersResponse, error)
- func (a *ChimpAPI) StaticSegmentMembersDel(req ListsStaticSegmentMembers) (ListsStaticSegmentMembersResponse, error)
- func (a *ChimpAPI) StaticSegmentReset(req ListsStaticSegment) (ListsStaticSegmentUpdateResponse, error)
- func (a *ChimpAPI) StaticSegments(req ListsStaticSegments) ([]ListsStaticSegmentResponse, error)
- func (a *ChimpAPI) TemplatesAdd(req TemplatesAdd) (TemplatesAddResponse, error)
- func (a *ChimpAPI) TemplatesInfo(req TemplateInfo) (TemplateInfoResponse, error)
- func (a *ChimpAPI) TemplatesList(req TemplatesList) (TemplatesListResponse, error)
- func (a *ChimpAPI) TemplatesUpdate(req TemplatesUpdate) (TemplatesUpdateResponse, error)
- func (a *ChimpAPI) UpdateMember(req UpdateMember) error
- func (a *ChimpAPI) WebhookAdd(req ChimpWebhookAddRequest) (ChimpWebhookAddResponse, error)
- func (a *ChimpAPI) WebhookDel(req ChimpWebhookDelRequest) (ChimpWebhookDelResponse, error)
- func (a *ChimpAPI) Webhooks(req ChimpWebhooksRequest) ([]ChimpWebhook, error)
- type ChimpGroup
- type ChimpWebhook
- type ChimpWebhookActions
- type ChimpWebhookAddRequest
- type ChimpWebhookAddResponse
- type ChimpWebhookDelRequest
- type ChimpWebhookDelResponse
- type ChimpWebhookSources
- type ChimpWebhooksRequest
- type ContentResponse
- type Domain
- type Email
- type GalleryTemplate
- type InboundDomain
- type InboundRecipient
- type Info
- type InlineCSSRequest
- type InlineCSSResponse
- type InterestGroupAdd
- type InterestGroupAddResponse
- type InterestGroupingsList
- type InterestGroupingsListResponse
- type JsonAlterer
- type ListData
- type ListError
- type ListFilter
- type ListResponse
- type ListStat
- type ListsList
- type ListsListResponse
- type ListsMember
- type ListsMemberInfo
- type ListsMemberInfoResponse
- type ListsMembers
- type ListsMembersOpt
- type ListsMembersResponse
- type ListsStaticSegment
- type ListsStaticSegmentAdd
- type ListsStaticSegmentAddResponse
- type ListsStaticSegmentMembers
- type ListsStaticSegmentMembersResponse
- type ListsStaticSegmentResponse
- type ListsStaticSegmentUpdateResponse
- type ListsStaticSegments
- type ListsSubscribe
- type ListsUnsubscribe
- type MandrillAPI
- func (a *MandrillAPI) InboundDomainAdd(domain string) (InboundDomain, error)
- func (a *MandrillAPI) InboundDomainCheck(domain string) (InboundDomain, error)
- func (a *MandrillAPI) InboundDomainDelete(domain string) (InboundDomain, error)
- func (a *MandrillAPI) InboundDomainList() ([]InboundDomain, error)
- func (a *MandrillAPI) MessageContent(id string) (*MessageContent, error)
- func (a *MandrillAPI) MessageInfo(id string) (map[string]interface{}, error)
- func (a *MandrillAPI) MessageParse(rawMessage string, async bool) (Message, error)
- func (a *MandrillAPI) MessageSearch(searchRequest SearchRequest) ([]SearchResponse, error)
- func (a *MandrillAPI) MessageSend(message Message, async bool) ([]SendResponse, error)
- func (a *MandrillAPI) MessageSendRaw(rawMessage string, to []string, from Recipient, async bool) ([]SendResponse, error)
- func (a *MandrillAPI) MessageSendTemplate(templateName string, templateContent []Var, message Message, async bool) ([]SendResponse, error)
- func (a *MandrillAPI) MessageSendWithOptions(message Message, opts MessageSendOptions) ([]SendResponse, error)
- func (a *MandrillAPI) Ping() (string, error)
- func (a *MandrillAPI) RejectsDelete(email string) (bool, error)
- func (a *MandrillAPI) RejectsList(email string, includeExpired bool) ([]Reject, error)
- func (a *MandrillAPI) RouteAdd(domain string, pattern string, url string) (Route, error)
- func (a *MandrillAPI) RouteDelete(id string) (Route, error)
- func (a *MandrillAPI) RouteList(domain string) ([]Route, error)
- func (a *MandrillAPI) RouteUpdate(id string, domain string, pattern string, url string) (Route, error)
- func (a *MandrillAPI) SendRawMIME(raw_message string, to []string, mail_from string, helo string, ...) ([]InboundRecipient, error)
- func (a *MandrillAPI) SenderDomains() ([]Domain, error)
- func (a *MandrillAPI) SenderInfo(address string) (SenderInfo, error)
- func (a *MandrillAPI) SenderList() ([]Sender, error)
- func (a *MandrillAPI) SenderTimeSeries(address string) ([]TimeSeries, error)
- func (a *MandrillAPI) SubaccountAdd(id string, name string, notes string, custom_quota int32) (response SubaccountInfo, err error)
- func (a *MandrillAPI) SubaccountDelete(id string) (response SubaccountInfo, err error)
- func (a *MandrillAPI) SubaccountInfo(id string) (response SubaccountInfo, err error)
- func (a *MandrillAPI) SubaccountList() (response []SubaccountInfo, err error)
- func (a *MandrillAPI) SubaccountPause(id string) (response SubaccountInfo, err error)
- func (a *MandrillAPI) SubaccountResume(id string) (response SubaccountInfo, err error)
- func (a *MandrillAPI) SubaccountUpdate(id string, name string, notes string, custom_quota int32) (response SubaccountInfo, err error)
- func (a *MandrillAPI) TagAllTimeSeries() ([]TimeSeries, error)
- func (a *MandrillAPI) TagInfo(tag string) (TagInfo, error)
- func (a *MandrillAPI) TagList() ([]ListResponse, error)
- func (a *MandrillAPI) TagTimeSeries(tag string) ([]TimeSeries, error)
- func (a *MandrillAPI) TemplateAdd(name string, code string, publish bool) (Template, error)
- func (a *MandrillAPI) TemplateDelete(name string) (Template, error)
- func (a *MandrillAPI) TemplateInfo(name string) (Template, error)
- func (a *MandrillAPI) TemplateList() ([]Template, error)
- func (a *MandrillAPI) TemplatePublish(name string) (Template, error)
- func (a *MandrillAPI) TemplateRender(templateName string, templateContent []Var, mergeVars []Var) (string, error)
- func (a *MandrillAPI) TemplateTimeSeries(name string) ([]Template, error)
- func (a *MandrillAPI) TemplateUpdate(name string, code string, publish bool) (Template, error)
- func (a *MandrillAPI) UrlList() ([]UrlInfo, error)
- func (a *MandrillAPI) UrlSearch(q string) ([]UrlInfo, error)
- func (a *MandrillAPI) UrlTimeSeries(url string) ([]UrlInfo, error)
- func (a *MandrillAPI) UserInfo() (Info, error)
- func (a *MandrillAPI) UserSenders() ([]Sender, error)
- func (a *MandrillAPI) WebhookAdd(url string, events []string) (Webhook, error)
- func (a *MandrillAPI) WebhookDelete(id int) (Webhook, error)
- func (a *MandrillAPI) WebhookInfo(id int) (Webhook, error)
- func (a *MandrillAPI) WebhookUpdate(url string, events []string) (Webhook, error)
- func (a *MandrillAPI) WebhooksList() (response []Webhook, err error)
- type MandrillError
- type MemberInfo
- type MergeVars
- type Message
- func (m *Message) AddAttachments(attachement ...Attachment)
- func (m *Message) AddGlobalMergeVar(globalvars ...Var)
- func (m *Message) AddGoogleAnalyticsCampaign(campaigns ...string)
- func (m *Message) AddGoogleAnalyticsDomains(domains ...string)
- func (m *Message) AddHeader(key, value string)
- func (m *Message) AddImages(image ...Attachment)
- func (m *Message) AddMergeVar(vars ...MergeVars)
- func (m *Message) AddMetadata(key, value string)
- func (m *Message) AddRecipientMetadata(metadata ...RecipientMetaData)
- func (m *Message) AddRecipients(r ...Recipient)
- func (m *Message) AddTag(tags ...string)
- func (m *Message) String() string
- type MessageContent
- type MessageSendOptions
- type Recipient
- type RecipientMetaData
- type Reject
- type ReportClicksResponse
- type ReportSummaryResponse
- type ReportsClicks
- type ReportsSummary
- type Resend
- type Route
- type SMTPEvent
- type SearchRequest
- type SearchResponse
- type SendResponse
- type Sender
- type SenderInfo
- type Stat
- type SubaccountInfo
- type SubaccountTimeSeries
- type TS
- type TagInfo
- type Template
- type TemplateInfo
- type TemplateInfoResponse
- type TemplateListFilter
- type TemplateListType
- type TemplatesAdd
- type TemplatesAddResponse
- type TemplatesList
- type TemplatesListResponse
- type TemplatesUpdate
- type TemplatesUpdateResponse
- type TemplatesUpdateValues
- type TimeSerie
- type TimeSeries
- type TrackedUrl
- type UpdateMember
- type UrlInfo
- type UrlTimeSeriesInfo
- type UserTemplate
- type Var
- type Webhook
Constants ¶
const APITimeFormat = "2006-01-02 15:04:05"
format string for time.Format
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APITime ¶
Mailchimp does not conform to RFC3339 format, so we need custom UnmarshalJSON
func (*APITime) UnmarshalJSON ¶
type ActivityDetail ¶
type Attachment ¶
type BatchError ¶
type BatchResponse ¶
type BatchResponse struct { Success int `json:"success_count"` ErrorCount int `json:"error_count"` BatchErrors []BatchError `json:"errors"` }
type BatchSubscribe ¶
type BatchSubscribeResponse ¶
type BatchSubscriberError ¶
type BatchUnsubscribe ¶
type CampaignCreate ¶
type CampaignCreate struct { ApiKey string `json:"apikey"` Type string `json:"type"` Options CampaignCreateOptions `json:"options"` Content CampaignCreateContent `json:"content"` }
type CampaignCreateContent ¶
type CampaignCreateContent struct { // HTML is the raw/pasted HTML content for the campaign HTML string `json:"html"` // When using a template instead of raw HTML, each key // in the map should be the unique mc:edit area name from // the template. Sections map[string]string `json:"sections,omitempty"` // Text is the plain-text version of the body Text string `json:"text"` // MailChimp will pull in content from this URL. Note, // this will override any other content options - for lists // with Email Format options, you'll need to turn on // generate_text as well URL string `json:"url,omitempty"` // A Base64 encoded archive file for MailChimp to import all // media from. Note, this will override any other content // options - for lists with Email Format options, you'll // need to turn on generate_text as well Archive string `json:"archive,omitempty"` // ArchiveType only applies to the Archive field. Supported // formats are: zip, tar.gz, tar.bz2, tar, tgz, tbz. // If not included, we will default to zip ArchiveType string `json:"archive_options,omitempty"` }
type CampaignCreateOptions ¶
type CampaignCreateOptions struct { // ListID is the list to send this campaign to ListID string `json:"list_id"` // Title is the title for new campaign Title string `json:"title"` // TemplateID is the user-created template from which the HTML // content of the campaign should be created TemplateID string `json:"template_id"` // Subject is the subject line for your campaign message Subject string `json:"subject"` // FromEmail is the From: email address for your campaign message FromEmail string `json:"from_email"` // FromName is the From: name for your campaign message (not an email address) FromName string `json:"from_name"` // ToName is the To: name recipients will see (not email address) ToName string `json:"to_name"` }
type CampaignList ¶
type CampaignList struct { // A valid API Key for your user account. Get by visiting your API dashboard ApiKey string `json:"apikey"` // Filters to apply to this query - all are optional: Filter CampaignListFilter `json:"filters,omitempty"` // Control paging of campaigns, start results at this campaign #, // defaults to 1st page of data (page 0) Start int `json:"start,omitempty"` // Control paging of campaigns, number of campaigns to return with each call, defaults to 25 (max=1000) Limit int `json:"limit,omitempty"` // One of "create_time", "send_time", "title", "subject". Invalid values // will fall back on "create_time" - case insensitive. SortField string `json:"sort_field,omitempty"` // "DESC" for descending (default), "ASC" for Ascending. Invalid values // will fall back on "DESC" - case insensitive. OrderOrder string `json:"sort_dir,omitempty"` }
type CampaignListFilter ¶
type CampaignListFilter struct { // Return the campaign using a know campaign_id. Accepts // multiples separated by commas when not using exact matching. CampaignID string `json:"campaign_id,omitempty"` // Return the child campaigns using a known parent campaign_id. // Accepts multiples separated by commas when not using exact matching. ParentID string `json:"parent_id,omitempty"` // The list to send this campaign to - Get lists using ListList. // Accepts multiples separated by commas when not using exact matching. ListID string `json:"list_id,omitempty"` // Only show campaigns from this folder id - get folders using FoldersList. // Accepts multiples separated by commas when not using exact matching. FolderID int `json:"folder_id,omitempty"` // Only show campaigns using this template id - get templates using TemplatesList. // Accepts multiples separated by commas when not using exact matching. TemplateID int `json:"template_id,omitempty"` // Return campaigns of a specific status - one of "sent", "save", "paused", "schedule", "sending". // Accepts multiples separated by commas when not using exact matching. Status string `json:"status,omitempty"` // Return campaigns of a specific type - one of "regular", "plaintext", "absplit", "rss", "auto". // Accepts multiples separated by commas when not using exact matching. Type string `json:"type,omitempty"` // Only show campaigns that have this "From Name" FromName string `json:"from_name,omitempty"` // Only show campaigns that have this "Reply-to Email" FromEmail string `json:"from_email,omitempty"` // Only show campaigns that have this title Title string `json:"title"` // Only show campaigns that have this subject Subject string `json:"subject"` // Only show campaigns that have been sent since this date/time (in GMT) - - // 24 hour format in GMT, eg "2013-12-30 20:30:00" - if this is invalid the whole call fails SendTimeStart string `json:"sendtime_start,omitempty"` // Only show campaigns that have been sent before this date/time (in GMT) - - // 24 hour format in GMT, eg "2013-12-30 20:30:00" - if this is invalid the whole call fails SendTimeEnd string `json:"sendtime_end,omitempty"` // Whether to return just campaigns with or without segments UsesSegment bool `json:"uses_segment,omitempty"` // Flag for whether to filter on exact values when filtering, or search within content for // filter values - defaults to true. Using this disables the use of any filters that accept multiples. Exact bool `json:"exact,omitempty"` }
type CampaignListResponse ¶
type CampaignListResponse struct { Total int `json:"total"` Campaigns []CampaignResponse `json:"data"` }
type CampaignResponse ¶
type CampaignResponse struct { Id string `json:"id"` WebId int `json:"web_id"` ListId string `json:"list_id"` FolderId int `json:"folder_id"` TemplateId int `json:"template_id"` ContentType string `json:"content_type"` ContentEditedBy string `json:"content_edited_by"` Title string `json:"title"` Type string `json:"type"` CreateTime string `json:"create_time"` SendTime string `json:"send_time"` ContentUpdatedTime string `json:"content_updated_time"` Status string `json:"status"` FromName string `json:"from_name"` FromEmail string `json:"from_email"` Subject string `json:"subject"` ToName string `json:"to_name"` ArchiveURL string `json:"archive_url"` ArchiveURLLong string `json:"archive_url_long"` EmailsSent int `json:"emails_sent"` Analytics string `json:"analytics"` AnalyticsTag string `json:"analytics_tag"` InlineCSS bool `json:"inline_css"` Authenticate bool `json:"authenticate"` Ecommm360 bool `json:"ecomm360"` AutoTweet bool `json:"auto_tweet"` AutoFacebookPort string `json:"auto_fb_post"` Timewarp bool `json:"timewarp"` TimewarpSchedule string `json:"timewarp_schedule,omitempty"` Tracking CampaignTracking `json:"tracking"` ParentId string `json:"parent_id"` IsChild bool `json:"is_child"` TestsRemaining int `json:"tests_remain"` SegmentText string `json:"segment_text"` }
type CampaignSendResponse ¶
type CampaignSendResponse struct {
Complete bool `json:"complete"`
}
type CampaignTracking ¶
type ChimpAPI ¶
type ChimpAPI struct { Key string Transport http.RoundTripper Timeout time.Duration // contains filtered or unexported fields }
func (*ChimpAPI) BatchSubscribe ¶
func (a *ChimpAPI) BatchSubscribe(req BatchSubscribe) (BatchSubscribeResponse, error)
func (*ChimpAPI) BatchUnsubscribe ¶
func (a *ChimpAPI) BatchUnsubscribe(req BatchUnsubscribe) (BatchResponse, error)
func (*ChimpAPI) CampaignCreate ¶
func (a *ChimpAPI) CampaignCreate(req CampaignCreate) (CampaignResponse, error)
func (*ChimpAPI) CampaignList ¶
func (a *ChimpAPI) CampaignList(req CampaignList) (CampaignListResponse, error)
func (*ChimpAPI) CampaignSend ¶
func (a *ChimpAPI) CampaignSend(cid string) (CampaignSendResponse, error)
func (*ChimpAPI) GetClicks ¶
func (a *ChimpAPI) GetClicks(req ReportsClicks) (ReportClicksResponse, error)
func (*ChimpAPI) GetContent ¶
func (*ChimpAPI) GetContentAsJson ¶
func (a *ChimpAPI) GetContentAsJson(cid string, options map[string]interface{}) (ContentResponse, error)
func (*ChimpAPI) GetContentAsXML ¶
func (a *ChimpAPI) GetContentAsXML(cid string, options map[string]interface{}) (ContentResponse, error)
func (*ChimpAPI) GetSummary ¶
func (a *ChimpAPI) GetSummary(req ReportsSummary) (ReportSummaryResponse, error)
func (*ChimpAPI) InlineCSS ¶
func (a *ChimpAPI) InlineCSS(req InlineCSSRequest) (InlineCSSResponse, error)
func (*ChimpAPI) InterestGroupAdd ¶
func (a *ChimpAPI) InterestGroupAdd(req InterestGroupAdd) (InterestGroupAddResponse, error)
func (*ChimpAPI) InterestGroupingsList ¶
func (a *ChimpAPI) InterestGroupingsList(req InterestGroupingsList) ([]InterestGroupingsListResponse, error)
func (*ChimpAPI) ListsSubscribe ¶
func (a *ChimpAPI) ListsSubscribe(req ListsSubscribe) (Email, error)
func (*ChimpAPI) ListsUnsubscribe ¶
func (a *ChimpAPI) ListsUnsubscribe(req ListsUnsubscribe) error
func (*ChimpAPI) MemberInfo ¶
func (a *ChimpAPI) MemberInfo(req ListsMemberInfo) (ListsMemberInfoResponse, error)
func (*ChimpAPI) Members ¶
func (a *ChimpAPI) Members(req ListsMembers) (ListsMembersResponse, error)
func (*ChimpAPI) StaticSegmentAdd ¶
func (a *ChimpAPI) StaticSegmentAdd(req ListsStaticSegmentAdd) (ListsStaticSegmentAddResponse, error)
func (*ChimpAPI) StaticSegmentDel ¶
func (a *ChimpAPI) StaticSegmentDel(req ListsStaticSegment) (ListsStaticSegmentUpdateResponse, error)
func (*ChimpAPI) StaticSegmentMembersAdd ¶
func (a *ChimpAPI) StaticSegmentMembersAdd(req ListsStaticSegmentMembers) (ListsStaticSegmentMembersResponse, error)
func (*ChimpAPI) StaticSegmentMembersDel ¶
func (a *ChimpAPI) StaticSegmentMembersDel(req ListsStaticSegmentMembers) (ListsStaticSegmentMembersResponse, error)
func (*ChimpAPI) StaticSegmentReset ¶
func (a *ChimpAPI) StaticSegmentReset(req ListsStaticSegment) (ListsStaticSegmentUpdateResponse, error)
func (*ChimpAPI) StaticSegments ¶
func (a *ChimpAPI) StaticSegments(req ListsStaticSegments) ([]ListsStaticSegmentResponse, error)
func (*ChimpAPI) TemplatesAdd ¶
func (a *ChimpAPI) TemplatesAdd(req TemplatesAdd) (TemplatesAddResponse, error)
func (*ChimpAPI) TemplatesInfo ¶
func (a *ChimpAPI) TemplatesInfo(req TemplateInfo) (TemplateInfoResponse, error)
func (*ChimpAPI) TemplatesList ¶
func (a *ChimpAPI) TemplatesList(req TemplatesList) (TemplatesListResponse, error)
func (*ChimpAPI) TemplatesUpdate ¶
func (a *ChimpAPI) TemplatesUpdate(req TemplatesUpdate) (TemplatesUpdateResponse, error)
func (*ChimpAPI) UpdateMember ¶
func (a *ChimpAPI) UpdateMember(req UpdateMember) error
func (*ChimpAPI) WebhookAdd ¶
func (a *ChimpAPI) WebhookAdd(req ChimpWebhookAddRequest) (ChimpWebhookAddResponse, error)
func (*ChimpAPI) WebhookDel ¶
func (a *ChimpAPI) WebhookDel(req ChimpWebhookDelRequest) (ChimpWebhookDelResponse, error)
func (*ChimpAPI) Webhooks ¶
func (a *ChimpAPI) Webhooks(req ChimpWebhooksRequest) ([]ChimpWebhook, error)
type ChimpGroup ¶
type ChimpWebhook ¶
type ChimpWebhook struct { Url string `json:"url"` Actions ChimpWebhookActions `json:"actions"` Sources ChimpWebhookSources `json:"sources"` }
type ChimpWebhookActions ¶
type ChimpWebhookAddRequest ¶
type ChimpWebhookAddRequest struct { ChimpWebhook ApiKey string `json:"apikey"` ListId string `json:"id"` }
type ChimpWebhookAddResponse ¶
type ChimpWebhookAddResponse struct {
Id int `json:"id,string"`
}
type ChimpWebhookDelRequest ¶
type ChimpWebhookDelResponse ¶
type ChimpWebhookDelResponse struct {
Complete bool `json:"complete"`
}
type ChimpWebhookSources ¶
type ChimpWebhooksRequest ¶
type ContentResponse ¶
type GalleryTemplate ¶
type InboundDomain ¶
type InboundRecipient ¶
type InlineCSSRequest ¶
type InlineCSSResponse ¶
type InlineCSSResponse struct {
HTML string `json:"html"`
}
type InterestGroupAdd ¶
type InterestGroupAddResponse ¶
type InterestGroupAddResponse struct {
Complete bool `json:"complete"`
}
type InterestGroupingsList ¶
type InterestGroupingsListResponse ¶
type InterestGroupingsListResponse struct { Id int `json:"id"` Name string `json:"name"` FormField string `json:"form_field"` Groups []ChimpGroup `json:"groups"` }
type JsonAlterer ¶
type JsonAlterer interface {
// contains filtered or unexported methods
}
type ListData ¶
type ListData struct { Id string `json:"id"` WebId int `json:"web_id"` Name string `json:"name"` DateCreated string `json:"date_created"` EmailTypeOption bool `json:"email_type_option"` UseAwesomeBar bool `json:"use_awesomebar"` DefaultFromName string `json:"default_from_name"` DefaultFromEmail string `json:"default_from_email"` DefaultSubject string `json:"default_subject"` DefaultLanguage string `json:"default_language"` ListRating float64 `json:"list_rating"` SubscribeShortUrl string `json:"subscribe_url_short"` SubscribeLongUrl string `json:"subscribe_url_long"` BeamerAddress string `json:"beamer_address"` Visibility string `json:"visibility"` Stats ListStat `json:"stats"` Modules []string `json:"modules"` }
type ListFilter ¶
type ListFilter struct { ListId string `json:"list_id"` ListName string `json:"list_name"` FromName string `json:"from_name"` FromEmail string `json:"from_email"` FromSubject string `json:"from_subject"` CreatedBefore string `json:"created_before"` CreatedAfter string `json:"created_after"` Exact bool `json:"exact"` }
type ListResponse ¶
type ListResponse struct { Tag string `json:"tag"` Sent int32 `json:"sent"` HardBounces int32 `json:"hard_bounces"` SoftBounces int32 `json:"soft_bounces"` Rejects int32 `json:"rejects"` Complaints int32 `json:"complaints"` Unsubs int32 `json:"unsubs"` Opens int32 `json:"opens"` Clicks int32 `json:"clicks"` }
type ListStat ¶
type ListStat struct { MemberCount float64 `json:"member_count"` UnsubscribeCount float64 `json:"unsubscribe_count"` CleanedCount float64 `json:"cleaned_count"` MemberCountSinceSend float64 `json:"member_count_since_send"` UnsubscribeCountSinceSend float64 `json:"unsubscribe_count_since_send"` CleanedCountSinceSend float64 `json:"cleaned_count_since_send"` CampaignCount float64 `json:"campaign_count"` GroupingCount float64 `json:"grouping_count"` GroupCount float64 `json:"group_count"` MergeVarCount float64 `json:"merge_var_count"` AvgSubRate float64 `json:"avg_sub_rate"` AvgUnsubRate float64 `json:"avg_unsub_rate"` TargetSubRate float64 `json:"target_sub_rate"` OpenRate float64 `json:"open_rate"` ClickRate float64 `json:"click_rate"` }
type ListsListResponse ¶
type ListsMember ¶
type ListsMemberInfo ¶
type ListsMemberInfoResponse ¶
type ListsMemberInfoResponse struct { SuccessCount int `json:"success_count"` ErrorCount int `json:"error_count"` Errors []ListError `json:"errors"` MemberInfoRecords []MemberInfo `json:"data"` }
type ListsMembers ¶
type ListsMembers struct { ApiKey string `json:"apikey"` ListId string `json:"id"` Status string `json:"status"` Options ListsMembersOpt `json:"opts,omitempty"` }
type ListsMembersOpt ¶
type ListsMembersResponse ¶
type ListsMembersResponse struct { Total int `json:"total"` Data []MemberInfo `json:"data"` }
type ListsStaticSegment ¶
type ListsStaticSegmentAdd ¶
type ListsStaticSegmentAddResponse ¶
type ListsStaticSegmentAddResponse struct {
Id int `json:"id"`
}
type ListsStaticSegmentMembersResponse ¶
type ListsStaticSegmentMembersResponse struct { SuccessCount int `json:"success_count"` ErrorCount int `json:"error_count"` Errors []BatchError `json:"errors"` }
type ListsStaticSegmentUpdateResponse ¶
type ListsStaticSegmentUpdateResponse struct {
Complete bool `json:"complete"`
}
type ListsStaticSegments ¶
type ListsSubscribe ¶
type ListsSubscribe struct { ApiKey string `json:"apikey"` ListId string `json:"id"` Email Email `json:"email"` MergeVars map[string]interface{} `json:"merge_vars,omitempty"` EmailType string `json:"email_type,omitempty"` DoubleOptIn bool `json:"double_optin"` UpdateExisting bool `json:"update_existing"` ReplaceInterests bool `json:"replace_interests"` SendWelcome bool `json:"send_welcome"` }
type ListsUnsubscribe ¶
type MandrillAPI ¶
type MandrillAPI struct { Key string Transport http.RoundTripper Timeout time.Duration // contains filtered or unexported fields }
func NewMandrill ¶
func NewMandrill(apiKey string) (*MandrillAPI, error)
see https://mandrillapp.com/api/docs/ currently supporting json output formats
func (*MandrillAPI) InboundDomainAdd ¶
func (a *MandrillAPI) InboundDomainAdd(domain string) (InboundDomain, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) InboundDomainCheck ¶
func (a *MandrillAPI) InboundDomainCheck(domain string) (InboundDomain, error)
can error with one of the following: Invalid_Key, Unknown_InboundDomain, ValidationError, GeneralError
func (*MandrillAPI) InboundDomainDelete ¶
func (a *MandrillAPI) InboundDomainDelete(domain string) (InboundDomain, error)
can error with one of the following: Invalid_Key, Unknown_InboundDomain, ValidationError, GeneralError
func (*MandrillAPI) InboundDomainList ¶
func (a *MandrillAPI) InboundDomainList() ([]InboundDomain, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) MessageContent ¶
func (a *MandrillAPI) MessageContent(id string) (*MessageContent, error)
func (*MandrillAPI) MessageInfo ¶
func (a *MandrillAPI) MessageInfo(id string) (map[string]interface{}, error)
func (*MandrillAPI) MessageParse ¶
func (a *MandrillAPI) MessageParse(rawMessage string, async bool) (Message, error)
func (*MandrillAPI) MessageSearch ¶
func (a *MandrillAPI) MessageSearch(searchRequest SearchRequest) ([]SearchResponse, error)
func (*MandrillAPI) MessageSend ¶
func (a *MandrillAPI) MessageSend(message Message, async bool) ([]SendResponse, error)
func (*MandrillAPI) MessageSendRaw ¶
func (a *MandrillAPI) MessageSendRaw(rawMessage string, to []string, from Recipient, async bool) ([]SendResponse, error)
Can return oneof Invalid_Key, ValidationError or GeneralError
func (*MandrillAPI) MessageSendTemplate ¶
func (a *MandrillAPI) MessageSendTemplate(templateName string, templateContent []Var, message Message, async bool) ([]SendResponse, error)
func (*MandrillAPI) MessageSendWithOptions ¶
func (a *MandrillAPI) MessageSendWithOptions(message Message, opts MessageSendOptions) ([]SendResponse, error)
MessageSendWithOptions sends messages, allowing for a few configuration options todo: add ip_pool and key to MessageSendOptions
func (*MandrillAPI) Ping ¶
func (a *MandrillAPI) Ping() (string, error)
func (*MandrillAPI) RejectsDelete ¶
func (a *MandrillAPI) RejectsDelete(email string) (bool, error)
can error with one of the following: Invalid_Reject, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) RejectsList ¶
func (a *MandrillAPI) RejectsList(email string, includeExpired bool) ([]Reject, error)
RejectsList retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them.
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) RouteAdd ¶
can error with one of the following: Invalid_Key, Unknown_InboundDomain, ValidationError, GeneralError
func (*MandrillAPI) RouteDelete ¶
func (a *MandrillAPI) RouteDelete(id string) (Route, error)
can error with one of the following: Invalid_Key, Unknown_InboundDomain, ValidationError, GeneralError
func (*MandrillAPI) RouteList ¶
func (a *MandrillAPI) RouteList(domain string) ([]Route, error)
can error with one of the following: Invalid_Key, Unknown_InboundDomain, ValidationError, GeneralError
func (*MandrillAPI) RouteUpdate ¶
func (a *MandrillAPI) RouteUpdate(id string, domain string, pattern string, url string) (Route, error)
can error with one of the following: Invalid_Key, Unknown_InboundDomain, ValidationError, GeneralError
func (*MandrillAPI) SendRawMIME ¶
func (a *MandrillAPI) SendRawMIME(raw_message string, to []string, mail_from string, helo string, client_address string) ([]InboundRecipient, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) SenderDomains ¶
func (a *MandrillAPI) SenderDomains() ([]Domain, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) SenderInfo ¶
func (a *MandrillAPI) SenderInfo(address string) (SenderInfo, error)
can error with one of the following: Unknown_Sender, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) SenderList ¶
func (a *MandrillAPI) SenderList() ([]Sender, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) SenderTimeSeries ¶
func (a *MandrillAPI) SenderTimeSeries(address string) ([]TimeSeries, error)
can error with one of the following: Unknown_Sender, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) SubaccountAdd ¶
func (a *MandrillAPI) SubaccountAdd(id string, name string, notes string, custom_quota int32) (response SubaccountInfo, err error)
func (*MandrillAPI) SubaccountDelete ¶
func (a *MandrillAPI) SubaccountDelete(id string) (response SubaccountInfo, err error)
func (*MandrillAPI) SubaccountInfo ¶
func (a *MandrillAPI) SubaccountInfo(id string) (response SubaccountInfo, err error)
func (*MandrillAPI) SubaccountList ¶
func (a *MandrillAPI) SubaccountList() (response []SubaccountInfo, err error)
func (*MandrillAPI) SubaccountPause ¶
func (a *MandrillAPI) SubaccountPause(id string) (response SubaccountInfo, err error)
func (*MandrillAPI) SubaccountResume ¶
func (a *MandrillAPI) SubaccountResume(id string) (response SubaccountInfo, err error)
func (*MandrillAPI) SubaccountUpdate ¶
func (a *MandrillAPI) SubaccountUpdate(id string, name string, notes string, custom_quota int32) (response SubaccountInfo, err error)
func (*MandrillAPI) TagAllTimeSeries ¶
func (a *MandrillAPI) TagAllTimeSeries() ([]TimeSeries, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TagInfo ¶
func (a *MandrillAPI) TagInfo(tag string) (TagInfo, error)
can error with one of the following: Invalid_Tag_Name, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TagList ¶
func (a *MandrillAPI) TagList() ([]ListResponse, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TagTimeSeries ¶
func (a *MandrillAPI) TagTimeSeries(tag string) ([]TimeSeries, error)
can error with one of the following: Invalid_Tag_Name, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateAdd ¶
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateDelete ¶
func (a *MandrillAPI) TemplateDelete(name string) (Template, error)
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateInfo ¶
func (a *MandrillAPI) TemplateInfo(name string) (Template, error)
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateList ¶
func (a *MandrillAPI) TemplateList() ([]Template, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplatePublish ¶
func (a *MandrillAPI) TemplatePublish(name string) (Template, error)
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateRender ¶
func (a *MandrillAPI) TemplateRender(templateName string, templateContent []Var, mergeVars []Var) (string, error)
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateTimeSeries ¶
func (a *MandrillAPI) TemplateTimeSeries(name string) ([]Template, error)
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) TemplateUpdate ¶
can error with one of the following: Unknown_Template, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) UrlList ¶
func (a *MandrillAPI) UrlList() ([]UrlInfo, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) UrlSearch ¶
func (a *MandrillAPI) UrlSearch(q string) ([]UrlInfo, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) UrlTimeSeries ¶
func (a *MandrillAPI) UrlTimeSeries(url string) ([]UrlInfo, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) UserInfo ¶
func (a *MandrillAPI) UserInfo() (Info, error)
func (*MandrillAPI) UserSenders ¶
func (a *MandrillAPI) UserSenders() ([]Sender, error)
func (*MandrillAPI) WebhookAdd ¶
func (a *MandrillAPI) WebhookAdd(url string, events []string) (Webhook, error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) WebhookDelete ¶
func (a *MandrillAPI) WebhookDelete(id int) (Webhook, error)
can error with one of the following: Unknown_Webhook, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) WebhookInfo ¶
func (a *MandrillAPI) WebhookInfo(id int) (Webhook, error)
can error with one of the following: Unknown_Webhook, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) WebhookUpdate ¶
func (a *MandrillAPI) WebhookUpdate(url string, events []string) (Webhook, error)
can error with one of the following: Unknown_Webhook, Invalid_Key, ValidationError, GeneralError
func (*MandrillAPI) WebhooksList ¶
func (a *MandrillAPI) WebhooksList() (response []Webhook, err error)
can error with one of the following: Invalid_Key, ValidationError, GeneralError
type MandrillError ¶
type MandrillError struct { Status string `json:"status"` Code int `json:"code"` Name string `json:"name"` Message string `json:"message"` }
four types of error Invalid_Key - The provided API key is not a valid Mandrill API key ValidationError - The parameters passed to the API call are invalid or not provided when required GeneralError - An unexpected error occurred processing the request. Mandrill developers will be notified. Unknown_Template - The requested template does not exist
func (MandrillError) Error ¶
func (e MandrillError) Error() string
type MemberInfo ¶
type MemberInfo struct { Email string `json:"email"` Euid string `json:"euid"` EmailType string `json:"email_type"` IpSignup string `json:"ip_signup,omitempty"` TimestampSignup string `json:"timestamp_signup,omitempty"` IpOpt string `json:"ip_opt"` TimestampOpt string `json:"timestamp_opt"` MemberRating int `json:"member_rating"` InfoChanged string `json:"info_changed"` Leid int `json:"leid"` Language string `json:"language,omitempty"` ListId string `json:"list_id"` ListName string `json:"list_name"` Merges map[string]interface{} `json:"merges"` Status string `json:"status"` Timestamp string `json:"timestamp"` }
type Message ¶
type Message struct { Html string `json:"html,omitempty"` Text string `json:"text,omitempty"` Subject string `json:"subject"` FromEmail string `json:"from_email"` FromName string `json:"from_name"` To []Recipient `json:"to"` Headers map[string]string `json:"headers,omitempty"` Important bool `json:"important,omitempty"` TrackOpens bool `json:"track_opens"` TrackClicks bool `json:"track_clicks"` ViewContentLink bool `json:"view_content_link,omitempty"` AutoText bool `json:"auto_text,omitempty"` AutoHtml bool `json:"auto_html,omitempty"` UrlStripQS bool `json:"url_strip_qs,omitempty"` InlineCss bool `json:"inline_css,omitempty"` PreserveRecipients bool `json:"preserve_recipients,omitempty"` BCCAddress string `json:"bcc_address,omitempty"` TrackingDomain string `json:"tracking_domain,omitempty"` SigningDomain string `json:"signing_domain,omitempty"` ReturnPathDomain string `json:"return_path_domain,omitempty"` Merge bool `json:"merge,omitempty"` GlobalMergeVars []Var `json:"global_merge_vars,omitempty"` MergeVars []MergeVars `json:"merge_vars,omitempty"` Tags []string `json:"tags,omitempty"` Subaccount string `json:"subaccount,omitempty"` GoogleAnalyticsDomains []string `json:"google_analytics_domains,omitempty"` GoogleAnalyticsCampaign []string `json:"google_analytics_campaign,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` RecipientMetadata []RecipientMetaData `json:"recipient_metadata,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` MergeLanguage string `json:"merge_language,omitempty"` Images []Attachment `json:"images,omitempty"` }
func (*Message) AddAttachments ¶
func (m *Message) AddAttachments(attachement ...Attachment)
func (*Message) AddGlobalMergeVar ¶
func (*Message) AddGoogleAnalyticsCampaign ¶
func (*Message) AddGoogleAnalyticsDomains ¶
func (*Message) AddImages ¶
func (m *Message) AddImages(image ...Attachment)
func (*Message) AddMergeVar ¶
func (*Message) AddMetadata ¶
func (*Message) AddRecipientMetadata ¶
func (m *Message) AddRecipientMetadata(metadata ...RecipientMetaData)
func (*Message) AddRecipients ¶
type MessageContent ¶
type MessageSendOptions ¶
MessageSendOptions wraps options for MessageSend API call
type RecipientMetaData ¶
type ReportClicksResponse ¶
type ReportClicksResponse struct {
Total []TrackedUrl `json:"total"`
}
type ReportSummaryResponse ¶
type ReportSummaryResponse struct { HardBounce int `json:"hard_bounces"` SoftBounce int `json:"soft_bounces"` Unsubscribes int `json:"unsubscribes"` AbuseReports int `json:"abuse_reports"` Opens int `json:"opens"` UniqueOpens int `json:"unique_opens"` Clicks int `json:"clicks"` UniqueClicks int `json:"unique_clicks"` EmailsSent int `json:"emails_sent"` TimeSeries []TimeSerie `json:"timeseries"` }
type ReportsClicks ¶
type ReportsSummary ¶
type SearchRequest ¶
type SearchResponse ¶
type SearchResponse struct { Timestamp time.Duration `json:"ts"` Id string `json:"_id"` Sender string `json:"sender"` Subject string `json:"subject"` Email string `json:"email"` Tags []string `json:"tags"` Opens int `json:"opens"` Clicks int `json:"clicks"` State string `json:"state"` Diag string `json:"diag"` Metadata map[string]string `json:"metadata"` Template interface{} `json:"template"` Resends []Resend `json:"resends"` SMTPEvents []SMTPEvent `json:"smtp_events"` OpensDetail []ActivityDetail `json:"opens_detail"` ClicksDetail []ActivityDetail `json:"clicks_detail"` }
type SendResponse ¶
type Sender ¶
type Sender struct { Sent int `json:"sent"` HardBounces int `json:"hard_bounces"` SoftBounces int `json:"soft_bounces"` Rejects int `json:"rejects"` Complaints int `json:"complaints"` Unsubs int `json:"unsubs"` Opens int `json:"opens"` Clicks int `json:"clicks"` UniqueOpens int `json:"unique_opens"` UniqueClicks int `json:"unique_clicks"` Reputation int `json:"reputation"` Address string `json:"address"` CreatedAt APITime `json:"created_at"` }
type SenderInfo ¶
type SenderInfo struct { Address string `json:"address"` CreatedAt time.Time `json:"created_at"` Sent int32 `json:"sent"` HardBounces int32 `json:"hard_bounces"` SoftBounces int32 `json:"soft_bounces"` Rejects int32 `json:"rejects"` Complaints int32 `json:"complaints"` Unsubs int32 `json:"unsubs"` Opens int32 `json:"opens"` Clicks int32 `json:"clicks"` Stats []Stat `json:"stats"` }
type Stat ¶
type Stat struct { Sent int `json:"sent"` HardBounces int `json:"hard_bounces"` SoftBounces int `json:"soft_bounces"` Rejects int `json:"rejects"` Complaints int `json:"complaints"` Unsubs int `json:"unsubs"` Opens int `json:"opens"` UniqueOpens int `json:"unique_opens"` Clicks int `json:"clicks"` UniqueClicks int `json:"unique_clicks"` }
type SubaccountInfo ¶
type SubaccountInfo struct { Id string `json:"id"` Name string `json:"name"` Notes string `json:"notes"` CustomQuota int32 `json:"custom_quota"` Status string `json:"status"` Reputation int32 `json:"reputation"` CreatedAt APITime `json:"created_at"` FirstSentAt APITime `json:"first_sent_at"` SentWeekly int32 `json:"sent_weekly"` SentMonthly int32 `json:"sent_monthly"` SentTotal int32 `json:"sent_total"` SentHourly int32 `json:"sent_hourly"` HourlyQuota int32 `json:"hourly_quota"` Last30Days SubaccountTimeSeries `json:"last_30_days"` }
type SubaccountTimeSeries ¶
type SubaccountTimeSeries struct { Sent int32 `json:"sent"` HardBounces int32 `json:"hard_bounces"` SoftBounces int32 `json:"soft_bounces"` Rejects int32 `json:"rejects"` Complaints int32 `json:"complaints"` Unsubs int32 `json:"unsubs"` Opens int32 `json:"opens"` UniqueOpens int32 `json:"unique_opens"` Clicks int32 `json:"clicks"` UniqueClicks int32 `json:"unique_clicks"` }
type TS ¶
func (*TS) UnmarshalJSON ¶
type TagInfo ¶
type TagInfo struct { Tag string `json:"tag"` Reputation int32 `json:"reputation,omitempty"` Sent int32 `json:"sent"` HardBounces int32 `json:"hard_bounces"` SoftBounces int32 `json:"soft_bounces"` Rejects int32 `json:"rejects"` Complaints int32 `json:"complaints"` Unsubs int32 `json:"unsubs"` Opens int32 `json:"opens"` Clicks int32 `json:"clicks"` UniqueOpens int32 `json:"unique_opens"` UniqueClicks int32 `json:"unique_clicks"` Stats []Stat `json:"stats,omitempty"` }
type Template ¶
type Template struct { Name string `json:"name"` Code string `json:"code"` PublishName string `json:"publish_name"` PublishCode string `json:"publish_code"` Slug string `json:"slug"` Subject string `json:"subject"` CreatedAt APITime `json:"published_at"` UpdateAt APITime `json:"updated_at"` FromEmail string `json:"from_email"` FromName string `json:"from_name"` Text string `json:"text"` PublishFromEmail string `json:"publish_from_email"` PublishFromName string `json:"publish_from_name"` PublishText string `json:"publish_text"` PublishSubject string `json:"publish_subject"` PublishAt APITime `json:"published_at"` }
type TemplateInfo ¶
type TemplateInfoResponse ¶
type TemplateListFilter ¶
type TemplateListType ¶
type TemplatesAdd ¶
type TemplatesAddResponse ¶
type TemplatesAddResponse struct {
TemplateID int `json:"template_id"`
}
type TemplatesList ¶
type TemplatesList struct { ApiKey string `json:"apikey"` Types TemplateListType `json:"types"` Filters TemplateListFilter `json:"filters"` }
type TemplatesListResponse ¶
type TemplatesListResponse struct { User []UserTemplate `json:"user"` Gallery []GalleryTemplate `json:"gallery"` }
type TemplatesUpdate ¶
type TemplatesUpdate struct { ApiKey string `json:"apikey"` TemplateID int `json:"template_id"` Values TemplatesUpdateValues `json:"values"` }
type TemplatesUpdateResponse ¶
type TemplatesUpdateResponse struct {
Complete bool `json:"complete"`
}
type TemplatesUpdateValues ¶
type TimeSeries ¶
type TimeSeries struct { Time APITime `json:"time"` Sent int32 `json:"sent"` HardBounces int32 `json:"hard_bounces"` SoftBounces int32 `json:"soft_bounces"` Rejects int32 `json:"rejects"` Complaints int32 `json:"complaints"` Unsubs int32 `json:"unsubs"` Opens int32 `json:"opens"` UniqueOpens int32 `json:"unique_opens"` Clicks int32 `json:"clicks"` UniqueClicks int32 `json:"unique_clicks"` }
type TrackedUrl ¶
type UpdateMember ¶
type UrlTimeSeriesInfo ¶
type UserTemplate ¶
type UserTemplate struct { Id int `json:"id"` Name string `json:"name"` Layout string `json:"layout"` Category string `json:"category"` PreviewImage string `json:"preview_image"` DateCreated string `json:"date_created"` Active bool `json:"active"` EditSource bool `json:"edit_source"` FolderId bool `json:"folder_id"` }
type Webhook ¶
type Webhook struct { Id int `json:"id"` Url string `json:"url"` AuthKey string `json:"auth_key"` Events []string `json:"events"` CreatedAt APITime `json:"created_at"` LastSentAt APITime `json:"last_sent_at"` BatchesSent int `json:"batches_sent"` EventsSent int `json:"events_sent"` LastError string `json:"last_error"` }
func (Webhook) HasAllEvents ¶
Source Files ¶
- api.go
- chimp.go
- chimp_campaigns.go
- chimp_ecomm.go
- chimp_folders.go
- chimp_gallery.go
- chimp_helper.go
- chimp_lists.go
- chimp_reports.go
- chimp_templates.go
- chimp_users.go
- chimp_vip.go
- mandrill.go
- mandrill_inbound.go
- mandrill_messages.go
- mandrill_rejects.go
- mandrill_senders.go
- mandrill_subaccounts.go
- mandrill_tags.go
- mandrill_templates.go
- mandrill_urls.go
- mandrill_users.go
- mandrill_webhooks.go