Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api API) CreateAuthorizedApp(body *AuthorizedAppRequest) (*AuthorizedAppCreateResponse, error)
- func (api API) CreateAutomationEmailQueue(workflowID, emailID, emailAddress string) (*AutomationQueue, error)
- func (api API) CreateAutomationRemovedSubscribers(workflowID, emailAddress string) (*RemovedSubscriber, error)
- func (api API) CreateList(body *ListCreationRequest) (*ListResponse, error)
- func (api API) CreateStore(req *Store) (*Store, error)
- func (api API) DeleteList(id string) (bool, error)
- func (api API) DeleteStore(id string) (bool, error)
- func (api API) GetAuthorizedApps(params *ExtendedQueryParams) (*ListOfAuthorizedApps, error)
- func (api API) GetAuthroizedApp(id string, params *BasicQueryParams) (*AuthorizedApp, error)
- func (api API) GetAutomation(id string) (*Automation, error)
- func (api API) GetAutomationEmail(automationID, emailID string) (*AutomationEmail, error)
- func (api API) GetAutomationEmails(automationID string) (*ListOfEmails, error)
- func (api API) GetAutomationQueue(workflowID, emailID, subsID string) (*AutomationQueue, error)
- func (api API) GetAutomationQueues(workflowID, emailID string) (*ListOfAutomationQueues, error)
- func (api API) GetAutomationRemovedSubscribers(workflowID string) (*ListOfRemovedSubscribers, error)
- func (api API) GetAutomations(params *BasicQueryParams) (*ListOfAutomations, error)
- func (api API) GetList(id string, params *BasicQueryParams) (*ListResponse, error)
- func (api API) GetLists(params *ListQueryParams) (*ListOfLists, error)
- func (api API) GetReports(params *ReportQueryParams) (*ListOfReports, error)
- func (api API) GetRoot(params *BasicQueryParams) (*RootResponse, error)
- func (api API) GetStore(id string, params QueryParams) (*Store, error)
- func (api API) GetStores(params *ExtendedQueryParams) (*StoreList, error)
- func (api API) PauseSending(workflowID, emailID string) (bool, error)
- func (api API) PauseSendingAll(id string) (bool, error)
- func (api API) Request(method, path string, params QueryParams, body, response interface{}) error
- func (api API) RequestOk(method, path string) (bool, error)
- func (api API) StartSending(workflowID, emailID string) (bool, error)
- func (api API) StartSendingAll(id string) (bool, error)
- func (api API) UpdateList(id string, body *ListCreationRequest) (*ListResponse, error)
- func (api API) UpdateStore(req *Store) (*Store, error)
- type APIError
- type AbuseReport
- type AccountContact
- type Activity
- type Address
- type AuthorizedApp
- type AuthorizedAppCreateResponse
- type AuthorizedAppRequest
- type Automation
- func (auto Automation) CanMakeRequest() error
- func (auto Automation) CreateRemovedSubscribers(emailAddress string) (*RemovedSubscriber, error)
- func (auto Automation) GetEmail(id string) (*AutomationEmail, error)
- func (auto Automation) GetEmails() (*ListOfEmails, error)
- func (auto Automation) GetRemovedSubscribers() (*ListOfRemovedSubscribers, error)
- func (auto Automation) PauseSendingAll() (bool, error)
- func (auto Automation) StartSendingAll() (bool, error)
- type AutomationDelay
- type AutomationEmail
- func (email AutomationEmail) CanMakeRequest() error
- func (email AutomationEmail) CreateQueue(emailAddress string) (*AutomationQueue, error)
- func (email AutomationEmail) GetQueue(id string) (*AutomationQueue, error)
- func (email AutomationEmail) GetQueues() (*ListOfAutomationQueues, error)
- func (email AutomationEmail) PauseSending() (bool, error)
- func (email AutomationEmail) StartSending() (bool, error)
- type AutomationOptions
- type AutomationQueue
- type AutomationQueueRequest
- type AutomationRecipient
- type AutomationSettingsLong
- type AutomationSettingsShort
- type AutomationTracking
- type BasicQueryParams
- type BatchSubscribeMembersError
- type BatchSubscribeMembersRequest
- type BatchSubscribeMembersResponse
- type CampaignDefaults
- type Capsule
- type Cart
- type CartList
- type Clicks
- type Client
- type Contact
- type Customer
- type CustomerList
- type ExtendedQueryParams
- type GrowthHistory
- type Highrise
- type HookEvents
- type HookSources
- type IndustryStats
- type Interest
- type InterestCategoriesQueryParams
- type InterestCategory
- type InterestCategoryRequest
- type LineItem
- type Link
- type ListCreationRequest
- type ListOfAbuseReports
- type ListOfActivity
- type ListOfAuthorizedApps
- type ListOfAutomationQueues
- type ListOfAutomations
- type ListOfClients
- type ListOfEmails
- type ListOfGrownHistory
- type ListOfInterestCategories
- type ListOfInterests
- type ListOfLists
- type ListOfMemberActivity
- type ListOfMemberGoals
- type ListOfMemberNotes
- type ListOfMembers
- type ListOfRemovedSubscribers
- type ListOfReports
- type ListOfSegments
- type ListOfWebHooks
- type ListQueryParams
- type ListResponse
- func (list ListResponse) BatchSubscribeMembers(body *BatchSubscribeMembersRequest) (*BatchSubscribeMembersResponse, error)
- func (list ListResponse) CanMakeRequest() error
- func (list ListResponse) CreateInterestCategory(body *InterestCategoryRequest) (*InterestCategory, error)
- func (list ListResponse) CreateMember(body *MemberRequest) (*Member, error)
- func (list ListResponse) CreateSegment(body *SegmentRequest) (*Segment, error)
- func (list ListResponse) CreateWebHooks(body *WebHookRequest) (*WebHook, error)
- func (list ListResponse) DeleteInterestCategory(id string) (bool, error)
- func (list ListResponse) DeleteMember(id string) (bool, error)
- func (list ListResponse) DeleteSegment(id string) (bool, error)
- func (list ListResponse) DeleteWebHook(id string) (bool, error)
- func (list ListResponse) GetAbuseReport(id string, params *ExtendedQueryParams) (*AbuseReport, error)
- func (list ListResponse) GetAbuseReports(params *ExtendedQueryParams) (*ListOfAbuseReports, error)
- func (list ListResponse) GetActivity(params *BasicQueryParams, api API) (*ListOfActivity, error)
- func (list ListResponse) GetClients(params *BasicQueryParams) (*ListOfClients, error)
- func (list ListResponse) GetGrowthHistory(params *ExtendedQueryParams) (*ListOfGrownHistory, error)
- func (list ListResponse) GetGrowthHistoryForMonth(month string, params *BasicQueryParams) (*GrowthHistory, error)
- func (list ListResponse) GetInterest(interestCategoryID, interestID string, params *BasicQueryParams) (*Interest, error)
- func (list ListResponse) GetInterestCategories(params *InterestCategoriesQueryParams) (*ListOfInterestCategories, error)
- func (list ListResponse) GetInterestCategory(id string, params *BasicQueryParams) (*InterestCategory, error)
- func (list ListResponse) GetInterests(interestCategoryID string, params *BasicQueryParams) (*ListOfInterests, error)
- func (list ListResponse) GetMember(id string, params *BasicQueryParams) (*Member, error)
- func (list ListResponse) GetMembers(params *InterestCategoriesQueryParams) (*ListOfMembers, error)
- func (list ListResponse) GetSegment(id string, params *BasicQueryParams) (*Segment, error)
- func (list ListResponse) GetSegments(params *SegmentQueryParams) (*ListOfSegments, error)
- func (list ListResponse) GetWebHook(id string) (*WebHook, error)
- func (list ListResponse) GetWebHooks() (*ListOfWebHooks, error)
- func (list ListResponse) UpdateInterestCategory(id string, body *InterestCategoryRequest) (*InterestCategory, error)
- func (list ListResponse) UpdateMember(id string, body *MemberRequest) (*Member, error)
- func (list ListResponse) UpdateSegment(id string, body *SegmentRequest) (*Segment, error)
- func (list ListResponse) UpdateWebHook(id string, body *WebHookRequest) (*WebHook, error)
- type Member
- func (mem Member) CanMakeRequest() error
- func (mem Member) CreateNote(msg string) (*MemberNoteLong, error)
- func (mem Member) DeleteNote(id string) (bool, error)
- func (mem Member) GetActivity(params *BasicQueryParams) (*ListOfMemberActivity, error)
- func (mem Member) GetGoals(params *BasicQueryParams) (*ListOfMemberGoals, error)
- func (mem Member) GetNote(id string, params *BasicQueryParams) (*MemberNoteLong, error)
- func (mem Member) GetNotes(params *ExtendedQueryParams) (*ListOfMemberNotes, error)
- func (mem Member) UpdateNote(id, msg string) (*MemberNoteLong, error)
- type MemberActivity
- type MemberGoal
- type MemberLocation
- type MemberNoteLong
- type MemberNoteShort
- type MemberRequest
- type MemberStats
- type Opens
- type Order
- type OrderList
- type Product
- type ProductList
- type QueryParams
- type RemovedSubscriber
- type RemovedSubscriberRequest
- type Report
- type ReportQueryParams
- type ReportSummary
- type RootResponse
- type Salesforce
- type Segment
- type SegmentConditional
- type SegmentOptions
- type SegmentQueryParams
- type SegmentRequest
- type SocialCard
- type Stats
- type Store
- func (store Store) CreateCart(req *Cart) (*Cart, error)
- func (store Store) CreateCustomer(req *Customer) (*Customer, error)
- func (store Store) CreateOrder(req *Order) (*Order, error)
- func (store Store) CreateProduct(req *Product) (*Product, error)
- func (store Store) DeleteCart(id string) (bool, error)
- func (store Store) DeleteCustomer(id string) (bool, error)
- func (store Store) DeleteOrder(id string) (bool, error)
- func (store Store) DeleteProduct(id string) (bool, error)
- func (store Store) GetCart(id string, params *BasicQueryParams) (*Cart, error)
- func (store Store) GetCarts(params *ExtendedQueryParams) (*CartList, error)
- func (store Store) GetCustomer(id string, params *BasicQueryParams) (*Customer, error)
- func (store Store) GetCustomers(params *ExtendedQueryParams) (*CustomerList, error)
- func (store Store) GetOrder(id string, params *BasicQueryParams) (*Order, error)
- func (store Store) GetOrders(params *ExtendedQueryParams) (*OrderList, error)
- func (store Store) GetProduct(id string, params *BasicQueryParams) (*Product, error)
- func (store Store) GetProducts(params *ExtendedQueryParams) (*ProductList, error)
- func (store Store) HasID() error
- func (store *Store) MarshalJSON() ([]byte, error)
- func (store Store) UpdateCart(req *Cart) (*Cart, error)
- func (store Store) UpdateCustomer(req *Customer) (*Customer, error)
- func (store Store) UpdateOrder(req *Order) (*Order, error)
- func (store Store) UpdateProduct(req *Product) (*Product, error)
- type StoreList
- type TimeToRun
- type Variant
- type VariantList
- type WebHook
- type WebHookRequest
- type WorkflowType
- func WorkflowAPI(emailCount int, runtime TimeToRun) *WorkflowType
- func WorkflowBestCustomer(emailCount int, sendImmediately bool, lifetimePurchaseValue float64, ...) *WorkflowType
- func WorkflowCategoryFollowup(emailCount int, sendImmediately bool, categoryName string, runtime TimeToRun) *WorkflowType
- func WorkflowDateAdded(emailCount int, runtime TimeToRun) *WorkflowType
- func WorkflowEmailFollowup(emailCount int, triggerOnImport, sendImmediately bool, runtime TimeToRun) *WorkflowType
- func WorkflowEmailSeries(emailCount int, triggerOnImport, sendImmediately bool, runtime TimeToRun) *WorkflowType
- func WorkflowGroupAdd(emailCount int, sendImmediately bool, groupID int, runtime TimeToRun) *WorkflowType
- func WorkflowGroupRemove(emailCount int, sendImmediately bool, groupID int, runtime TimeToRun) *WorkflowType
- func WorkflowMandrill(emailCount int, sendImmediately bool, mandrillTags []string, runtime TimeToRun) *WorkflowType
- func WorkflowProductFollowup(emailCount int, sendImmediately bool, productName string, runtime TimeToRun) *WorkflowType
- func WorkflowPurchaseFollowup(emailCount int, sendImmediately bool, runtime TimeToRun) *WorkflowType
- func WorkflowRecurringEvent(emailCount int, mergeFieldTrigger string, runtime TimeToRun) *WorkflowType
- func WorkflowSpecialEvent(emailCount int, mergeFieldTrigger string, runtime TimeToRun) *WorkflowType
- func WorkflowVisitURL(emailCount int, sendImmediately bool, goalURL string, runtime TimeToRun) *WorkflowType
- func WorkflowWelcomeSeries(emailCount int, triggerOnImport, sendImmediately bool, runtime TimeToRun) *WorkflowType
Constants ¶
const URIFormat string = "%s.api.mailchimp.com"
URIFormat defines the endpoint for a single app
const Version string = "/3.0"
Version the latest API version
Variables ¶
var DatacenterRegex = regexp.MustCompile("[^-]\\w+$")
DatacenterRegex defines which datacenter to hit
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Key string Timeout time.Duration Transport http.RoundTripper User string Debug bool // contains filtered or unexported fields }
API represents the origin of the API
func (API) CreateAuthorizedApp ¶
func (api API) CreateAuthorizedApp(body *AuthorizedAppRequest) (*AuthorizedAppCreateResponse, error)
func (API) CreateAutomationEmailQueue ¶
func (api API) CreateAutomationEmailQueue(workflowID, emailID, emailAddress string) (*AutomationQueue, error)
func (API) CreateAutomationRemovedSubscribers ¶
func (api API) CreateAutomationRemovedSubscribers(workflowID, emailAddress string) (*RemovedSubscriber, error)
func (API) CreateList ¶
func (api API) CreateList(body *ListCreationRequest) (*ListResponse, error)
func (API) GetAuthorizedApps ¶
func (api API) GetAuthorizedApps(params *ExtendedQueryParams) (*ListOfAuthorizedApps, error)
func (API) GetAuthroizedApp ¶
func (api API) GetAuthroizedApp(id string, params *BasicQueryParams) (*AuthorizedApp, error)
func (API) GetAutomation ¶
func (api API) GetAutomation(id string) (*Automation, error)
TODO query params?
func (API) GetAutomationEmail ¶
func (api API) GetAutomationEmail(automationID, emailID string) (*AutomationEmail, error)
func (API) GetAutomationEmails ¶
func (api API) GetAutomationEmails(automationID string) (*ListOfEmails, error)
func (API) GetAutomationQueue ¶
func (api API) GetAutomationQueue(workflowID, emailID, subsID string) (*AutomationQueue, error)
func (API) GetAutomationQueues ¶
func (api API) GetAutomationQueues(workflowID, emailID string) (*ListOfAutomationQueues, error)
func (API) GetAutomationRemovedSubscribers ¶
func (api API) GetAutomationRemovedSubscribers(workflowID string) (*ListOfRemovedSubscribers, error)
func (API) GetAutomations ¶
func (api API) GetAutomations(params *BasicQueryParams) (*ListOfAutomations, error)
func (API) GetList ¶
func (api API) GetList(id string, params *BasicQueryParams) (*ListResponse, error)
func (API) GetLists ¶
func (api API) GetLists(params *ListQueryParams) (*ListOfLists, error)
func (API) GetReports ¶
func (api API) GetReports(params *ReportQueryParams) (*ListOfReports, error)
func (API) GetRoot ¶
func (api API) GetRoot(params *BasicQueryParams) (*RootResponse, error)
GetRoot queries the root of the API for stats
func (API) Request ¶
func (api API) Request(method, path string, params QueryParams, body, response interface{}) error
Request will make a call to the actual API.
func (API) RequestOk ¶
RequestOk Make Request ignoring body and return true if HTTP status code is 2xx.
func (API) UpdateList ¶
func (api API) UpdateList(id string, body *ListCreationRequest) (*ListResponse, error)
type APIError ¶
type APIError struct { Type string `json:"type,omitempty"` Title string `json:"title,omitempty"` Status int `json:"status,omitempty"` Detail string `json:"detail,omitempty"` Instance string `json:"instance,omitempty"` }
APIError is what the what the api returns on error
type AbuseReport ¶
type AccountContact ¶
type Activity ¶
type Activity struct { Day string `json:"day"` EmailsSent int `json:"emails_sent"` UniqueOpens int `json:"unique_opens"` RecipientClicks int `json:"recipient_clicks"` HardBounce int `json:"hard_bounce"` SoftBounce int `json:"soft_bounce"` Subs int `json:"subs"` Unsubs int `json:"unsubs"` OtherAdds int `json:"other_adds"` OtherRemoves int `json:"other_removes"` // contains filtered or unexported fields }
type Address ¶
type Address struct { Address1 string `json:"address1"` Address2 string `json:"address2"` City string `json:"city"` Province string `json:"province"` ProvinceCode string `json:"province_code"` PostalCode string `json:"postal_code"` Country string `json:"country"` CountryCode string `json:"country_code"` Longitude float64 `json:"longitude"` Latitude float64 `json:"latitude"` }
Address represents what it says
func (*Address) MarshalJSON ¶
type AuthorizedApp ¶
type AuthorizedAppRequest ¶
type Automation ¶
type Automation struct { ID string `json:"id"` CreateTime string `json:"create_time"` StartTime string `json:"start_time"` Status string `json:"status"` EmailsSent int `json:"emails_sent"` Recipients AutomationRecipient `json:"recipients"` Settings AutomationSettingsShort `json:"settings"` Tracking AutomationTracking `json:"tracking"` TriggerSettings WorkflowType `json:"trigger_settings"` ReportSummary ReportSummary `json:"report_summary"` // contains filtered or unexported fields }
func (Automation) CanMakeRequest ¶
func (auto Automation) CanMakeRequest() error
func (Automation) CreateRemovedSubscribers ¶
func (auto Automation) CreateRemovedSubscribers(emailAddress string) (*RemovedSubscriber, error)
func (Automation) GetEmail ¶
func (auto Automation) GetEmail(id string) (*AutomationEmail, error)
func (Automation) GetEmails ¶
func (auto Automation) GetEmails() (*ListOfEmails, error)
func (Automation) GetRemovedSubscribers ¶
func (auto Automation) GetRemovedSubscribers() (*ListOfRemovedSubscribers, error)
func (Automation) PauseSendingAll ¶
func (auto Automation) PauseSendingAll() (bool, error)
func (Automation) StartSendingAll ¶
func (auto Automation) StartSendingAll() (bool, error)
type AutomationDelay ¶
type AutomationEmail ¶
type AutomationEmail struct { ID string `json:"id"` WorkflowID string `json:"workflow_id"` Position int `json:"position"` Delay AutomationDelay `json:"delay"` CreateTime string `json:"create_time"` StartTime string `json:"start_time"` ArchiveURL string `json:"archive_url"` Status string `json:"status"` EmailsSent int `json:"emails_sent"` SendTime string `json:"send_time"` ContentType string `json:"content_type"` Recipients AutomationRecipient `json:"recipients"` Settings AutomationSettingsLong `json:"settings"` Tracking AutomationTracking `json:"tracking"` SocialCard SocialCard `json:"social_card"` TriggerSettings WorkflowType `json:"trigger_settings"` ReportSummary ReportSummary `json:"report_summary"` // contains filtered or unexported fields }
func (AutomationEmail) CanMakeRequest ¶
func (email AutomationEmail) CanMakeRequest() error
func (AutomationEmail) CreateQueue ¶
func (email AutomationEmail) CreateQueue(emailAddress string) (*AutomationQueue, error)
func (AutomationEmail) GetQueue ¶
func (email AutomationEmail) GetQueue(id string) (*AutomationQueue, error)
func (AutomationEmail) GetQueues ¶
func (email AutomationEmail) GetQueues() (*ListOfAutomationQueues, error)
func (AutomationEmail) PauseSending ¶
func (email AutomationEmail) PauseSending() (bool, error)
func (AutomationEmail) StartSending ¶
func (email AutomationEmail) StartSending() (bool, error)
type AutomationOptions ¶
type AutomationOptions struct { SavedSegmentID int `json:"saved_segment_id"` Match string `json:"match"` Conditions []SegmentConditional `json:"conditions"` }
type AutomationQueue ¶
type AutomationQueueRequest ¶
type AutomationQueueRequest struct {
EmailAddress string `json:"email_address"`
}
type AutomationRecipient ¶
type AutomationRecipient struct { ListID string `json:"list_id"` SegmentOptions AutomationOptions `json:"segment_options"` }
type AutomationSettingsLong ¶
type AutomationSettingsLong struct { Title string `json:"title"` FromName string `json:"from_name"` ReplyTo string `json:"reply_to"` Authenticate bool `json:"authenticate"` InlineCSS bool `json:"inline_css"` SubjectLine string `json:"subject_line"` AutoTweet bool `json:"auto_tweet"` AutoFBPost []string `json:"auto_fb_post"` FBComments bool `json:"fb_comments"` TemplateID int `json:"template_id"` DragAndDrop bool `json:"drag_and_drop"` }
type AutomationSettingsShort ¶
type AutomationTracking ¶
type AutomationTracking struct { Opens bool `json:"opens"` HTMLClicks bool `json:"html_clicks"` TextClicks bool `json:"text_clicks"` GoalTracking bool `json:"goal_tracking"` Ecomm360 bool `json:"ecomm360"` GoogleAnalytics string `json:"google_analytics"` Clicktale string `json:"clicktale"` Salesforce Salesforce `json:"salesforce"` Highrise Highrise `json:"highrise"` Capsule Capsule `json:"capsule"` }
type BasicQueryParams ¶
BasicQueryParams basic filter queries
func (BasicQueryParams) Params ¶
func (q BasicQueryParams) Params() map[string]string
type BatchSubscribeMembersError ¶
type BatchSubscribeMembersError struct { EmailAddress string `json:"email_address"` ErrorMessage string ` json:"error"` }
------------------------------------------------------------------------------------------------ Batch subscribe list members ------------------------------------------------------------------------------------------------
type BatchSubscribeMembersRequest ¶
type BatchSubscribeMembersRequest struct { Members []MemberRequest `json:"members"` UpdateExisting bool `json:"update_existing"` }
type BatchSubscribeMembersResponse ¶
type BatchSubscribeMembersResponse struct { NewMembers []ListOfMembers `json:"new_members"` UpdatedMembers []ListOfMembers `json:"updated_members"` ErrorMessages []BatchSubscribeMembersError `json:"errors"` TotalCreated int `json:"total_created"` TotalUpdated int `json:"total_updated"` ErrorCount int `json:"error_count"` // contains filtered or unexported fields }
type CampaignDefaults ¶
type Cart ¶
type Cart struct { APIError // Required Customer Customer `json:"customer"` CurrencyCode string `json:"currency_code"` OrderTotal float64 `json:"order_total"` Lines []LineItem `json:"lines"` // Optional ID string `json:"id,omitempty"` CampaignID string `json:"campaign_id,omitempty"` CheckoutURL string `json:"checkout_url,omitempty"` TaxTotal float64 `json:"tax_total,omitempty"` // Response only CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Links []Link `json:"_links,omitempty"` }
func (*Cart) MarshalJSON ¶
type Contact ¶
type Contact struct { Company string `json:"customer"` Address1 string `json:"address1"` Address2 string `json:"address2"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` Country string `json:"country"` PhoneNumber string `json:"phone"` }
Contact defines a single contact
type Customer ¶
type Customer struct { // Required ID string `json:"id"` // Optional EmailAddress string `json:"email_address,omitempty"` OptInStatus bool `json:"opt_in_status,omitempty"` Company string `json:"company,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` OrdersCount int `json:"orders_count,omitempty"` TotalSpent float64 `json:"total_spent,omitempty"` Address *Address `json:"address,omitempty"` // Response CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Links []Link `json:"_links,omitempty"` }
Customer defines a mailchimp customer
type CustomerList ¶
type ExtendedQueryParams ¶
type ExtendedQueryParams struct { BasicQueryParams Count int Offset int }
ExtendedQueryParams includes a count and offset
func (ExtendedQueryParams) Params ¶
func (q ExtendedQueryParams) Params() map[string]string
type GrowthHistory ¶
type HookEvents ¶
type HookSources ¶
type IndustryStats ¶
type InterestCategoriesQueryParams ¶
type InterestCategoriesQueryParams struct { ExtendedQueryParams Type string `json:"type"` }
func (InterestCategoriesQueryParams) Params ¶
func (q InterestCategoriesQueryParams) Params() map[string]string
type InterestCategory ¶
type InterestCategory struct { InterestCategoryRequest ListID string `json:"list_id"` ID string `json:"id"` // contains filtered or unexported fields }
type InterestCategoryRequest ¶
type LineItem ¶
type LineItem struct { // Required ID string `json:"id"` ProductID string `json:"product_id"` ProductVariantID string `json:"product_variant_id"` Quantity int `json:"quantity"` Price float64 `json:"price"` // Optional ProductTitle string `json:"product_title,omitempty"` ProductVariantTitle string `json:"product_variant_title,omitempty"` }
LineItem defines a mailchimp cart or order line item
type Link ¶
type Link struct { Rel string `json:"re"` Href string `json:"href"` Method string `json:"method"` TargetSchema string `json:"targetSchema"` Schema string `json:"schema"` }
Link refereneces another object
type ListCreationRequest ¶
type ListCreationRequest struct { Name string `json:"name"` Contact Contact `json:"contact"` PermissionReminder string `json:"permission_reminder"` UseArchiveBar bool `json:"use_archive_bar"` CampaignDefaults CampaignDefaults `json:"campaign_defaults"` NotifyOnSubscribe string `json:"notify_on_subscribe"` NotifyOnUnsubscribe string `json:"notify_on_unsubscribe"` EmailTypeOption bool `json:"email_type_option"` Visibilty string `json:"visiblity"` }
type ListOfAbuseReports ¶
type ListOfAbuseReports struct { ListID string `json:"list_id"` Reports []AbuseReport `json:"abuse_reports"` // contains filtered or unexported fields }
type ListOfActivity ¶
type ListOfAuthorizedApps ¶
type ListOfAuthorizedApps struct { Apps []AuthorizedApp `json:""` // contains filtered or unexported fields }
type ListOfAutomationQueues ¶
type ListOfAutomationQueues struct { WorkflowID string `json:"workflow_id"` EmailID string `json:"email_id"` Queues []AutomationQueue `json:"queue"` // contains filtered or unexported fields }
type ListOfAutomations ¶
type ListOfAutomations struct { Automations []Automation `json:"automations"` // contains filtered or unexported fields }
type ListOfClients ¶
type ListOfEmails ¶
type ListOfEmails struct { Emails []AutomationEmail `json:"emails"` // contains filtered or unexported fields }
type ListOfGrownHistory ¶
type ListOfGrownHistory struct { ListID string `json:"list_id"` History []GrowthHistory `json:"history"` // contains filtered or unexported fields }
type ListOfInterestCategories ¶
type ListOfInterestCategories struct { ListID string `json:"list_id"` Categories []InterestCategory `json:"categories"` // contains filtered or unexported fields }
type ListOfInterests ¶
type ListOfLists ¶
type ListOfLists struct { Lists []ListResponse `json:"lists"` // contains filtered or unexported fields }
type ListOfMemberActivity ¶
type ListOfMemberGoals ¶
type ListOfMemberGoals struct { EmailID string `json:"email_id"` ListID string `json:"list_id"` Goals []MemberGoal `json:"goals"` // contains filtered or unexported fields }
type ListOfMemberNotes ¶
type ListOfMemberNotes struct { EmailID string `json:"email_id"` ListID string `json:"list_id"` Notes []MemberNoteLong `json:"notes"` // contains filtered or unexported fields }
type ListOfMembers ¶
type ListOfRemovedSubscribers ¶
type ListOfRemovedSubscribers struct { WorkflowID string `json:"workflow_id"` Subscribers []RemovedSubscriber `json:"subscribers"` // contains filtered or unexported fields }
type ListOfReports ¶
type ListOfSegments ¶
type ListOfWebHooks ¶
type ListQueryParams ¶
type ListQueryParams struct { ExtendedQueryParams BeforeDateCreated string SinceDateCreated string BeforeCampaignLastSent string SinceCampaignLastSent string Email string }
func (ListQueryParams) Params ¶
func (q ListQueryParams) Params() map[string]string
type ListResponse ¶
type ListResponse struct { ListCreationRequest ID string `json:"id"` DateCreated string `json:"date_created"` ListRating int `json:"list_rating"` SubscribeURLShort string `json:"subscribe_url_short"` SubscribeURLLong string `json:"subscribe_url_long"` BeamerAddress string `json:"beamer_address"` Modules []string `json:"modules"` Stats Stats `json:"stats"` // contains filtered or unexported fields }
func (ListResponse) BatchSubscribeMembers ¶
func (list ListResponse) BatchSubscribeMembers(body *BatchSubscribeMembersRequest) (*BatchSubscribeMembersResponse, error)
func (ListResponse) CanMakeRequest ¶
func (list ListResponse) CanMakeRequest() error
func (ListResponse) CreateInterestCategory ¶
func (list ListResponse) CreateInterestCategory(body *InterestCategoryRequest) (*InterestCategory, error)
func (ListResponse) CreateMember ¶
func (list ListResponse) CreateMember(body *MemberRequest) (*Member, error)
func (ListResponse) CreateSegment ¶
func (list ListResponse) CreateSegment(body *SegmentRequest) (*Segment, error)
func (ListResponse) CreateWebHooks ¶
func (list ListResponse) CreateWebHooks(body *WebHookRequest) (*WebHook, error)
func (ListResponse) DeleteInterestCategory ¶
func (list ListResponse) DeleteInterestCategory(id string) (bool, error)
func (ListResponse) DeleteMember ¶
func (list ListResponse) DeleteMember(id string) (bool, error)
func (ListResponse) DeleteSegment ¶
func (list ListResponse) DeleteSegment(id string) (bool, error)
func (ListResponse) DeleteWebHook ¶
func (list ListResponse) DeleteWebHook(id string) (bool, error)
func (ListResponse) GetAbuseReport ¶
func (list ListResponse) GetAbuseReport(id string, params *ExtendedQueryParams) (*AbuseReport, error)
func (ListResponse) GetAbuseReports ¶
func (list ListResponse) GetAbuseReports(params *ExtendedQueryParams) (*ListOfAbuseReports, error)
func (ListResponse) GetActivity ¶
func (list ListResponse) GetActivity(params *BasicQueryParams, api API) (*ListOfActivity, error)
func (ListResponse) GetClients ¶
func (list ListResponse) GetClients(params *BasicQueryParams) (*ListOfClients, error)
func (ListResponse) GetGrowthHistory ¶
func (list ListResponse) GetGrowthHistory(params *ExtendedQueryParams) (*ListOfGrownHistory, error)
func (ListResponse) GetGrowthHistoryForMonth ¶
func (list ListResponse) GetGrowthHistoryForMonth(month string, params *BasicQueryParams) (*GrowthHistory, error)
func (ListResponse) GetInterest ¶
func (list ListResponse) GetInterest(interestCategoryID, interestID string, params *BasicQueryParams) (*Interest, error)
func (ListResponse) GetInterestCategories ¶
func (list ListResponse) GetInterestCategories(params *InterestCategoriesQueryParams) (*ListOfInterestCategories, error)
func (ListResponse) GetInterestCategory ¶
func (list ListResponse) GetInterestCategory(id string, params *BasicQueryParams) (*InterestCategory, error)
func (ListResponse) GetInterests ¶
func (list ListResponse) GetInterests(interestCategoryID string, params *BasicQueryParams) (*ListOfInterests, error)
func (ListResponse) GetMember ¶
func (list ListResponse) GetMember(id string, params *BasicQueryParams) (*Member, error)
func (ListResponse) GetMembers ¶
func (list ListResponse) GetMembers(params *InterestCategoriesQueryParams) (*ListOfMembers, error)
func (ListResponse) GetSegment ¶
func (list ListResponse) GetSegment(id string, params *BasicQueryParams) (*Segment, error)
func (ListResponse) GetSegments ¶
func (list ListResponse) GetSegments(params *SegmentQueryParams) (*ListOfSegments, error)
func (ListResponse) GetWebHook ¶
func (list ListResponse) GetWebHook(id string) (*WebHook, error)
func (ListResponse) GetWebHooks ¶
func (list ListResponse) GetWebHooks() (*ListOfWebHooks, error)
func (ListResponse) UpdateInterestCategory ¶
func (list ListResponse) UpdateInterestCategory(id string, body *InterestCategoryRequest) (*InterestCategory, error)
func (ListResponse) UpdateMember ¶
func (list ListResponse) UpdateMember(id string, body *MemberRequest) (*Member, error)
func (ListResponse) UpdateSegment ¶
func (list ListResponse) UpdateSegment(id string, body *SegmentRequest) (*Segment, error)
func (ListResponse) UpdateWebHook ¶
func (list ListResponse) UpdateWebHook(id string, body *WebHookRequest) (*WebHook, error)
type Member ¶
type Member struct { MemberRequest ID string `json:"id"` ListID string `json:"list_id"` UniqueEmailID string `json:"unique_email_id"` EmailType string `json:"email_type"` Stats MemberStats `json:"stats"` IPSignup string `json:"ip_signup"` TimestampSignup string `json:"timestamp_signup"` TimestampOpt string `json:"timestamp_opt"` MemberRating int `json:"member_rating"` LastChanged string `json:"last_changed"` EmailClient string `json:"email_client"` LastNote MemberNoteShort `json:"last_note"` // contains filtered or unexported fields }
func (Member) CanMakeRequest ¶
func (Member) CreateNote ¶
func (mem Member) CreateNote(msg string) (*MemberNoteLong, error)
func (Member) GetActivity ¶
func (mem Member) GetActivity(params *BasicQueryParams) (*ListOfMemberActivity, error)
func (Member) GetGoals ¶
func (mem Member) GetGoals(params *BasicQueryParams) (*ListOfMemberGoals, error)
func (Member) GetNote ¶
func (mem Member) GetNote(id string, params *BasicQueryParams) (*MemberNoteLong, error)
func (Member) GetNotes ¶
func (mem Member) GetNotes(params *ExtendedQueryParams) (*ListOfMemberNotes, error)
func (Member) UpdateNote ¶
func (mem Member) UpdateNote(id, msg string) (*MemberNoteLong, error)
type MemberActivity ¶
type MemberGoal ¶
type MemberLocation ¶
type MemberLocation struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` GMTOffset int `json:"gmtoff"` DSTOffset int `json:"dstoff"` CountryCode string `json:"country_code"` Timezone string `json:"timezone"` }
func (*MemberLocation) MarshalJSON ¶
func (loc *MemberLocation) MarshalJSON() ([]byte, error)
type MemberNoteLong ¶
type MemberNoteShort ¶
type MemberRequest ¶
type MemberRequest struct { EmailAddress string `json:"email_address"` Status string `json:"status"` MergeFields map[string]string `json:"merge_fields,omitempty"` Interests map[string]bool `json:"interests,omitempty"` Language string `json:"language"` VIP bool `json:"vip"` Location *MemberLocation `json:"location"` }
type MemberStats ¶
type Order ¶
type Order struct { APIError // Required ID string `json:"id"` Customer Customer `json:"customer"` Lines []LineItem `json:"lines"` CurrencyCode string `json:"currency_code"` OrderTotal float64 `json:"order_total"` // Optional TaxTotal float64 `json:"tax_total,omitempty"` ShippingTotal float64 `json:"shipping_total,omitempty"` TrackingCode string `json:"tracking_code,omitempty"` ProcessedAtForeign time.Time `json:"processed_at_foreign"` CancelledAtForeign time.Time `json:"cancelled_at_foreign"` UpdatedAtForeign time.Time `json:"updated_at_foreign"` CampaignID string `json:"campaign_id,omitempty"` FinancialStatus string `json:"financial_status,omitempty"` FulfillmentStatus string `json:"fulfillment_status,omitempty"` BillingAddress *Address `json:"billing_address,omitempty"` ShippingAddress *Address `json:"shipping_address,omitempty"` // Response only CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Links []Link `json:"_links,omitempty"` }
func (*Order) MarshalJSON ¶
type Product ¶
type Product struct { APIError StoreID string `json:"-"` // Required ID string `json:"id"` Title string `json:"title"` Variants []Variant `json:"variants"` // Optional Handle string `json:"handle,omitempty"` URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` Type string `json:"type,omitempty"` Vendor string `json:"vendor,omitempty"` ImageURL string `json:"image_url,omitempty"` PublishedAtForeign time.Time `json:"published_at_foreign,omitempty"` // Response only Links []Link `json:"_links,omitempty"` // contains filtered or unexported fields }
------------------------------------------------------------------------------------------------ Products ------------------------------------------------------------------------------------------------
func (*Product) MarshalJSON ¶
type ProductList ¶
type QueryParams ¶
QueryParams defines the different params
type RemovedSubscriber ¶
type RemovedSubscriberRequest ¶
type RemovedSubscriberRequest struct {
EmailAddress string `json:"email_address"`
}
type ReportQueryParams ¶
type ReportQueryParams struct {
ExtendedQueryParams
}
type ReportSummary ¶
type RootResponse ¶
type RootResponse struct { AccountID string `json:"account_id"` AccountName string `json:"account_name"` Email string `json:"email"` Role string `json:"role"` Contact AccountContact `json:"contact"` ProEnabled bool `json:"pro_enabled"` LastLogin string `json:"last_login"` TotalSubscribers int `json:"total_subscribers"` IndustyStats IndustryStats `json:"industry_stats"` Links []Link `json:"_links"` }
RootResponse - https://developer.mailchimp.com/documentation/mailchimp/reference/root/#read-get_root
type Salesforce ¶
type SegmentConditional ¶
type SegmentConditional struct { Field string `json:"field"` OP string `json:"op"` Value float64 `json:"value"` }
SegmentConditional represents parameters to filter by
type SegmentOptions ¶
type SegmentOptions struct { Match string `json:"match"` Conditions []SegmentConditional `json:"conditions"` }
type SegmentQueryParams ¶
type SegmentQueryParams struct { ExtendedQueryParams Type string SinceCreatedAt string BeforeCreatedAt string SinceUpdatedAt string BeforeUpdatedAt string }
func (SegmentQueryParams) Params ¶
func (q SegmentQueryParams) Params() map[string]string
type SegmentRequest ¶
type SegmentRequest struct { Name string `json:"name"` StaticSegment []string `json:"static_segments"` Options SegmentOptions `json:"options"` }
type SocialCard ¶
type Stats ¶
type Stats struct { MemberCount int `json:"member_count"` UnsubscribeCount int `json:"unsubscribe_count"` CleanedCount int `json:"cleaned_count"` MemberCountSinceSend int `json:"member_count_since_send"` UnsubscribeCountSinceSend int `json:"unsubscribe_count_since_send"` CleanedCountSinceSend int `json:"cleaned_count_since_send"` CampaignCount int `json:"campaign_count"` CampaignLastSent string `json:"campaign_last_sent"` MergeFieldCount int `json:"merge_field_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"` LastSubDate string `json:"last_sub_date"` LastUnsubDate string `json:"last_unsub_date"` }
type Store ¶
type Store struct { APIError // Required ID string `json:"id"` ListID string `json:"list_id"` CurrencyCode string `json:"currency_code"` Name string `json:"name"` // Optional Platform string `json:"platform,omitempty"` Domain string `json:"domain,omitempty"` EmailAddress string `json:"email_address,omitempty"` MoneyFormat string `json:"money_format,omitempty"` PrimaryLocale string `json:"primary_locale,omitempty"` Timezone string `json:"timezone,omitempty"` Phone string `json:"phone,omitempty"` Address *Address `json:"address,omitempty"` // Response CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Links []Link `json:"_links,omitempty"` // contains filtered or unexported fields }
func (Store) GetCart ¶
func (store Store) GetCart(id string, params *BasicQueryParams) (*Cart, error)
func (Store) GetCustomer ¶
func (store Store) GetCustomer(id string, params *BasicQueryParams) (*Customer, error)
func (Store) GetCustomers ¶
func (store Store) GetCustomers(params *ExtendedQueryParams) (*CustomerList, error)
func (Store) GetOrder ¶
func (store Store) GetOrder(id string, params *BasicQueryParams) (*Order, error)
func (Store) GetOrders ¶
func (store Store) GetOrders(params *ExtendedQueryParams) (*OrderList, error)
func (Store) GetProduct ¶
func (store Store) GetProduct(id string, params *BasicQueryParams) (*Product, error)
func (Store) GetProducts ¶
func (store Store) GetProducts(params *ExtendedQueryParams) (*ProductList, error)
func (*Store) MarshalJSON ¶
type Variant ¶
type Variant struct { APIError StoreID string `json:"-"` ProductID string `json:"-"` // Required ID string `json:"id"` Title string `json:"title"` // Optional URL string `json:"url,omitempty"` SKU string `json:"sku,omitempty"` Price float64 `json:"price,omitempty"` InventoryQuantity int `json:"inventory_quantity,omitempty"` ImageURL string `json:"image_url,omitempty"` Backorders string `json:"backorders,omitempty"` Visibility string `json:"visibility,omitempty"` // contains filtered or unexported fields }
------------------------------------------------------------------------------------------------ Variants ------------------------------------------------------------------------------------------------
type VariantList ¶
type WebHook ¶
type WebHook struct { WebHookRequest ListID string `json:"list_id"` // contains filtered or unexported fields }
type WebHookRequest ¶
type WebHookRequest struct { URL string `json:"url"` Events HookEvents `json:"events"` Sources HookSources `json:"sources"` }
type WorkflowType ¶
type WorkflowType map[string]interface{}
func WorkflowAPI ¶
func WorkflowAPI(emailCount int, runtime TimeToRun) *WorkflowType
func WorkflowBestCustomer ¶
func WorkflowCategoryFollowup ¶
func WorkflowCategoryFollowup(emailCount int, sendImmediately bool, categoryName string, runtime TimeToRun) *WorkflowType
func WorkflowDateAdded ¶
func WorkflowDateAdded(emailCount int, runtime TimeToRun) *WorkflowType
func WorkflowEmailFollowup ¶
func WorkflowEmailFollowup(emailCount int, triggerOnImport, sendImmediately bool, runtime TimeToRun) *WorkflowType
func WorkflowEmailSeries ¶
func WorkflowEmailSeries(emailCount int, triggerOnImport, sendImmediately bool, runtime TimeToRun) *WorkflowType
func WorkflowGroupAdd ¶
func WorkflowGroupAdd(emailCount int, sendImmediately bool, groupID int, runtime TimeToRun) *WorkflowType
func WorkflowGroupRemove ¶
func WorkflowGroupRemove(emailCount int, sendImmediately bool, groupID int, runtime TimeToRun) *WorkflowType
func WorkflowMandrill ¶
func WorkflowMandrill(emailCount int, sendImmediately bool, mandrillTags []string, runtime TimeToRun) *WorkflowType
func WorkflowProductFollowup ¶
func WorkflowProductFollowup(emailCount int, sendImmediately bool, productName string, runtime TimeToRun) *WorkflowType
func WorkflowPurchaseFollowup ¶
func WorkflowPurchaseFollowup(emailCount int, sendImmediately bool, runtime TimeToRun) *WorkflowType
func WorkflowRecurringEvent ¶
func WorkflowRecurringEvent(emailCount int, mergeFieldTrigger string, runtime TimeToRun) *WorkflowType
func WorkflowSpecialEvent ¶
func WorkflowSpecialEvent(emailCount int, mergeFieldTrigger string, runtime TimeToRun) *WorkflowType
func WorkflowVisitURL ¶
func WorkflowVisitURL(emailCount int, sendImmediately bool, goalURL string, runtime TimeToRun) *WorkflowType
func WorkflowWelcomeSeries ¶
func WorkflowWelcomeSeries(emailCount int, triggerOnImport, sendImmediately bool, runtime TimeToRun) *WorkflowType