Documentation ¶
Index ¶
- Variables
- type ActiveCampaign
- func (a *ActiveCampaign) Campaigns(ctx context.Context, pof *POF) (*Campaigns, error)
- func (a *ActiveCampaign) ContactCreate(ctx context.Context, contact ContactCreate) (*ContactCreated, error)
- func (a *ActiveCampaign) ContactDelete(ctx context.Context, id string) error
- func (a *ActiveCampaign) ContactFieldValues(ctx context.Context, pof *POF, id string) (*FieldValues, error)
- func (a *ActiveCampaign) ContactLists(ctx context.Context, contactID string) (*ContactLists, error)
- func (a *ActiveCampaign) ContactUpdate(ctx context.Context, id string, contact ContactUpdate) error
- func (a *ActiveCampaign) Contacts(ctx context.Context, pof *POF) (*Contacts, error)
- func (a *ActiveCampaign) CredentialsTest() bool
- func (a *ActiveCampaign) FieldOptionCreate(ctx context.Context, create []CreateFieldOption) error
- func (a *ActiveCampaign) FieldOptions(ctx context.Context, field string) ([]FieldOption, error)
- func (a *ActiveCampaign) FieldValueCreate(ctx context.Context, create ChangeFieldValue) error
- func (a *ActiveCampaign) FieldValueUpdate(ctx context.Context, id string, update ChangeFieldValue) error
- func (a *ActiveCampaign) FieldValues(ctx context.Context, pof *POF) (*FieldValues, error)
- func (a *ActiveCampaign) Fields(ctx context.Context, pof *POF) (*Fields, error)
- func (a *ActiveCampaign) ListContacts(ctx context.Context, listID string) (*Contacts, error)
- func (a *ActiveCampaign) Lists(ctx context.Context, pof *POF) (*Lists, error)
- func (a *ActiveCampaign) UpdateContactToList(ctx context.Context, contactID string, listID string, listChange ListChange) (*ContactUpdatedToList, error)
- type Campaign
- type CampaignLinks
- type Campaigns
- type ChangeFieldValue
- type Contact
- type ContactCreate
- type ContactCreated
- type ContactLinks
- type ContactList
- type ContactListLink
- type ContactLists
- type ContactUpdate
- type ContactUpdatedToList
- type Contacts
- type CreateFieldOption
- type Error
- type Field
- type FieldLink
- type FieldOption
- type FieldOptions
- type FieldRelation
- type FieldValue
- type FieldValues
- type FieldValuesMeta
- type Fields
- type FieldsMeta
- type Filtering
- type List
- type ListChange
- type ListLinks
- type Lists
- type Ordering
- type POF
- type Pagination
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoURLProvided = errors.New("please provide your api url") ErrNoAuthenticationProvided = errors.New("please provide an authentication method") )
Functions ¶
This section is empty.
Types ¶
type ActiveCampaign ¶
ActiveCampaign will be the main
func New ¶
func New(url, apiKey string) (*ActiveCampaign, error)
func (*ActiveCampaign) ContactCreate ¶
func (a *ActiveCampaign) ContactCreate(ctx context.Context, contact ContactCreate) (*ContactCreated, error)
func (*ActiveCampaign) ContactDelete ¶
func (a *ActiveCampaign) ContactDelete(ctx context.Context, id string) error
func (*ActiveCampaign) ContactFieldValues ¶
func (a *ActiveCampaign) ContactFieldValues(ctx context.Context, pof *POF, id string) (*FieldValues, error)
func (*ActiveCampaign) ContactLists ¶
func (a *ActiveCampaign) ContactLists(ctx context.Context, contactID string) (*ContactLists, error)
func (*ActiveCampaign) ContactUpdate ¶
func (a *ActiveCampaign) ContactUpdate(ctx context.Context, id string, contact ContactUpdate) error
func (*ActiveCampaign) CredentialsTest ¶
func (a *ActiveCampaign) CredentialsTest() bool
func (*ActiveCampaign) FieldOptionCreate ¶
func (a *ActiveCampaign) FieldOptionCreate(ctx context.Context, create []CreateFieldOption) error
func (*ActiveCampaign) FieldOptions ¶
func (a *ActiveCampaign) FieldOptions(ctx context.Context, field string) ([]FieldOption, error)
func (*ActiveCampaign) FieldValueCreate ¶
func (a *ActiveCampaign) FieldValueCreate(ctx context.Context, create ChangeFieldValue) error
func (*ActiveCampaign) FieldValueUpdate ¶
func (a *ActiveCampaign) FieldValueUpdate(ctx context.Context, id string, update ChangeFieldValue) error
func (*ActiveCampaign) FieldValues ¶
func (a *ActiveCampaign) FieldValues(ctx context.Context, pof *POF) (*FieldValues, error)
func (*ActiveCampaign) ListContacts ¶
func (*ActiveCampaign) UpdateContactToList ¶
func (a *ActiveCampaign) UpdateContactToList(ctx context.Context, contactID string, listID string, listChange ListChange) (*ContactUpdatedToList, error)
type Campaign ¶
type Campaign struct { Type string `json:"type"` Userid string `json:"userid"` Segmentid string `json:"segmentid"` Bounceid string `json:"bounceid"` Realcid string `json:"realcid"` Sendid string `json:"sendid"` Threadid string `json:"threadid"` Seriesid string `json:"seriesid"` Formid string `json:"formid"` Basetemplateid string `json:"basetemplateid"` Basemessageid string `json:"basemessageid"` Addressid string `json:"addressid"` Source string `json:"source"` Name string `json:"name"` Cdate string `json:"cdate"` Mdate string `json:"mdate"` Sdate string `json:"sdate"` Ldate string `json:"ldate"` Send_amt string `json:"send_amt"` Total_amt string `json:"total_amt"` Opens string `json:"opens"` Uniqueopens string `json:"uniqueopens"` Linkclicks string `json:"linkclicks"` Uniquelinkclicks string `json:"uniquelinkclicks"` Subscriberclicks string `json:"subscriberclicks"` Forwards string `json:"forwards"` Uniqueforwards string `json:"uniqueforwards"` Hardbounces string `json:"hardbounces"` Softbounces string `json:"softbounces"` Unsubscribes string `json:"unsubscribes"` Unsubreasons string `json:"unsubreasons"` Updates string `json:"updates"` Replies string `json:"replies"` Uniquereplies string `json:"uniquereplies"` Status string `json:"status"` Public string `json:"public"` Mail_transfer string `json:"mail_transfer"` Mail_send string `json:"mail_send"` Mail_cleanup string `json:"mail_cleanup"` Mailer_log_file string `json:"mailer_log_file"` Tracklinks string `json:"tracklinks"` Tracklinksanalytics string `json:"tracklinksanalytics"` Trackreads string `json:"trackreads"` Trackreadsanalytics string `json:"trackreadsanalytics"` Analytics_campaign_name string `json:"analytics_campaign_name"` Tweet string `json:"tweet"` Facebook string `json:"facebook"` Survey string `json:"survey"` Embed_images string `json:"embed_images"` Htmlunsub string `json:"htmlunsub"` Textunsub string `json:"textunsub"` Htmlunsubdata string `json:"htmlunsubdata"` Textunsubdata string `json:"textunsubdata"` Recurring string `json:"recurring"` Willrecur string `json:"willrecur"` Split_type string `json:"split_type"` Split_content string `json:"split_content"` Split_offset string `json:"split_offset"` Split_offset_type string `json:"split_offset_type"` Split_winner_messageid string `json:"split_winner_messageid"` Split_winner_awaiting string `json:"split_winner_awaiting"` Responder_offset string `json:"responder_offset"` Responder_type string `json:"responder_type"` Responder_existing string `json:"responder_existing"` Reminder_field string `json:"reminder_field"` Reminder_format string `json:"reminder_format"` Reminder_type string `json:"reminder_type"` Reminder_offset string `json:"reminder_offset"` Reminder_offset_type string `json:"reminder_offset_type"` Reminder_offset_sign string `json:"reminder_offset_sign"` Reminder_last_cron_run string `json:"reminder_last_cron_run"` Activerss_interval string `json:"activerss_interval"` Activerss_url string `json:"activerss_url"` Activerss_items string `json:"activerss_items"` Ip4 string `json:"ip4"` Laststep string `json:"laststep"` Managetext string `json:"managetext"` Schedule string `json:"schedule"` Waitpreview string `json:"waitpreview"` Replysys string `json:"replysys"` Created_timestamp string `json:"created_timestamp"` Updated_timestamp string `json:"updated_timestamp"` Created_by string `json:"created_by"` Updated_by string `json:"updated_by"` Links CampaignLinks `json:"links"` ID string `json:"id"` User string `json:"user"` Automation *string `json:"automation"` }
type CampaignLinks ¶
type Campaigns ¶
type Campaigns struct { Campaigns []Campaign `json:"campaigns"` Meta FieldValuesMeta `json:"meta"` }
type ChangeFieldValue ¶
type ContactCreate ¶
type ContactCreated ¶
type ContactCreated struct { Email string `json:"email"` CreateDate string `json:"cdate"` UpdateDate string `json:"cdate"` Links ContactLinks `json:"links"` ID string `json:"id"` }
type ContactLinks ¶
type ContactLinks struct { BounceLogs string `json:"bounceLogs"` ContactAutomations string `json:"contactAutomations"` ContactData string `json:"contactData"` ContactGoals string `json:"contactGoals"` ContactLists string `json:"contactLists"` ContactLogs string `json:"contactLogs"` ContactTags string `json:"contactTags"` ContactDeals string `json:"contactDeals"` Deals string `json:"deals"` FieldValues string `json:"fieldValues"` GeoIps string `json:"geoIps"` Notes string `json:"notes"` Organization string `json:"organization"` PlusAppend string `json:"plusAppend"` TrackingLogs string `json:"trackingLogs"` ScoreValues string `json:"scoreValues"` AccountContacts string `json:"accountContacts"` AutomationEntryCounts string `json:"automationEntryCounts"` }
type ContactList ¶
type ContactList struct { Contact string `json:"contact"` List string `json:"list"` Form *string `json:"form"` Seriesid string `json:"seriesid"` Sdate string `json:"sdate"` Status string `json:"status"` Responder string `json:"responder"` Sync string `json:"sync"` Unsubreason string `json:"unsubreason"` Campaign *string `json:"campaign"` Message *string `json:"message"` First_name string `json:"first_name"` Last_name string `json:"last_name"` Ip4Sub string `json:"ip4Sub"` Sourceid string `json:"sourceid"` AutosyncLog *string `json:"autosyncLog"` Ip4_last string `json:"ip4_last"` Ip4Unsub string `json:"ip4Unsub"` UnsubscribeAutomation *string `json:"unsubscribeAutomation"` Links ContactListLink `json:"links"` ID string `json:"id"` Automation *string `json:"automation"` }
type ContactListLink ¶
type ContactListLink struct { Automation string `json:"automation"` List string `json:"list"` Contact string `json:"contact"` Form string `json:"form"` AutosyncLog string `json:"autosyncLog"` Campaign string `json:"campaign"` UnsubscribeAutomation string `json:"unsubscribeAutomation"` Message string `json:"message"` }
type ContactLists ¶
type ContactLists struct {
ContactLists []ContactList `json:"contactLists"`
}
type ContactUpdate ¶
type ContactUpdatedToList ¶
type ContactUpdatedToList struct {
Contacts []Contact `json:"contacts"`
}
type Contacts ¶
type Contacts struct { Contacts []Contact `json:"contacts"` Meta FieldValuesMeta `json:"meta"` }
type CreateFieldOption ¶
type Field ¶
type Field struct { Title string `json:"title"` Description string `json:"descript"` IsRequired string `json:"isrequired"` Perstag string `json:"perstag"` DefaultValue string `json:"defval"` Visible string `json:"visible"` Service string `json:"service"` Ordernum string `json:"ordernum"` CreateDate string `json:"cdate"` UpdateDate string `json:"udate"` //Options interface{} `json:"options"` Relations []string `json:"relations"` Links FieldLink `json:"links"` ID string `json:"id"` }
type FieldOption ¶
type FieldOptions ¶
type FieldOptions struct {
FieldOptions []FieldOption `json:"fieldOptions"`
}
type FieldRelation ¶
type FieldValue ¶
type FieldValues ¶
type FieldValues struct { FieldValues []FieldValue `json:"fieldValues"` Meta FieldValuesMeta `json:"meta"` }
type FieldValuesMeta ¶
type FieldValuesMeta struct {
Total string `json:"total"`
}
type Fields ¶
type Fields struct { FieldOptions interface{} `json:"fieldOptions"` FieldRelations []FieldRelation `json:"fieldRels"` Fields []Field `json:"fields"` Meta FieldsMeta `json:"meta"` }
type FieldsMeta ¶
type FieldsMeta struct {
Total string `json:"total"`
}
type List ¶
type List struct { Stringid string `json:"stringid"` Userid string `json:"userid"` Name string `json:"name"` Cdate string `json:"cdate"` P_use_tracking string `json:"p_use_tracking"` P_use_analytics_read string `json:"p_use_analytics_read"` P_use_analytics_link string `json:"p_use_analytics_link"` P_use_twitter string `json:"p_use_twitter"` P_use_facebook string `json:"p_use_facebook"` P_embed_image string `json:"p_embed_image"` P_use_captcha string `json:"p_use_captcha"` Send_last_broadcast string `json:"send_last_broadcast"` Private string `json:"private"` Analytics_domains string `json:"analytics_domains"` Analytics_source string `json:"analytics_source"` Analytics_ua string `json:"analytics_ua"` Twitter_token string `json:"twitter_token"` Twitter_token_secret string `json:"twitter_token_secret"` Facebook_session string `json:"facebook_session"` Carboncopy string `json:"carboncopy"` Subscription_notify string `json:"subscription_notify"` Unsubscription_notify string `json:"unsubscription_notify"` Require_name string `json:"require_name"` Get_unsubscribe_reason string `json:"get_unsubscribe_reason"` To_name string `json:"to_name"` Optinoptout string `json:"optinoptout"` Sender_name string `json:"sender_name"` Sender_addr1 string `json:"sender_addr1"` Sender_addr2 string `json:"sender_addr2"` Sender_city string `json:"sender_city"` Sender_state string `json:"sender_state"` Sender_zip string `json:"sender_zip"` Sender_country string `json:"sender_country"` Sender_phone string `json:"sender_phone"` Sender_url string `json:"sender_url"` Sender_reminder string `json:"sender_reminder"` Fulladdress string `json:"fulladdress"` Optinmessageid string `json:"optinmessageid"` Optoutconf string `json:"optoutconf"` Deletestamp string `json:"deletestamp"` Udate string `json:"udate"` Created_timestamp string `json:"created_timestamp"` Updated_timestamp string `json:"updated_timestamp"` Created_by string `json:"created_by"` Updated_by string `json:"updated_by"` Links ListLinks `json:"links"` ID string `json:"id"` User string `json:"user"` }
type ListChange ¶
type ListChange int
const ( ListSubscribe ListChange = 1 ListUnsubscribe ListChange = 2 )
type Lists ¶
type Lists struct { Lists []List `json:"lists"` Meta FieldValuesMeta `json:"meta"` }
type POF ¶
type POF struct { Pagination *Pagination Ordering []Ordering Filtering []Filtering }
type Pagination ¶
Click to show internal directories.
Click to hide internal directories.