Documentation
¶
Index ¶
- type Contact
- type EmailList
- type MarketingController
- func (m *MarketingController) AddAllControllers(router *mux.Router)
- func (m *MarketingController) AddRecipientToWaitingList(recipientID string) error
- func (u *MarketingController) Addrecipients(email string) error
- func (m *MarketingController) GetIDfromEmail(email string) (string, error)
- func (m *MarketingController) POSTEmailSubscriber(w http.ResponseWriter, r *http.Request)
- type MarketingSubscribeDTO
- type RecipientList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarketingController ¶
type MarketingController struct {
// contains filtered or unexported fields
}
func New ¶
func New(apiKey string, router *mux.Router) MarketingController
New creates a new MarketingController responsible for marketing endpoints
func (*MarketingController) AddAllControllers ¶
func (m *MarketingController) AddAllControllers(router *mux.Router)
func (*MarketingController) AddRecipientToWaitingList ¶
func (m *MarketingController) AddRecipientToWaitingList(recipientID string) error
func (*MarketingController) Addrecipients ¶
func (u *MarketingController) Addrecipients(email string) error
Addrecipients : Add recipients POST /contactdb/recipients
func (*MarketingController) GetIDfromEmail ¶
func (m *MarketingController) GetIDfromEmail(email string) (string, error)
GetIDfromEmail : Get ID from email
{
"result": {
"jane_doe@example.com": {
"contact": {
"address_line_1": "",
"address_line_2": "",
"alternate_emails": [
"janedoe@example1.com"
],
"city": "",
"country": "",
"email": "jane_doe@example.com",
"first_name": "Jane",
"id": "asdf-Jkl-zxCvBNm",
"last_name": "Doe",
"list_ids": [],
"segment_ids": [],
"postal_code": "",
"state_province_region": "",
"phone_number": "",
"whatsapp": "",
"line": "",
"facebook": "",
"unique_name": "",
"custom_fields": {},
"created_at": "2021-03-02T15:25:47Z",
"updated_at": "2021-03-30T15:26:16Z",
"_metadata": {
"self": "<metadata_url>"
}
}
},
}
func (*MarketingController) POSTEmailSubscriber ¶
func (m *MarketingController) POSTEmailSubscriber(w http.ResponseWriter, r *http.Request)
CreateUser godoc
@Summary Create an user
@Schemes
@Description create a user
@Tags Users
@Accept json
@Produce json
@Success 200 {string} Helloworld
@Router /marketing/email [post]
type MarketingSubscribeDTO ¶
type MarketingSubscribeDTO struct {
Email string `json:"email" validate:"required,email"`
}
define custom type
type RecipientList ¶
type RecipientList struct {
Contacts []Contact `json:"contacts"`
}
Click to show internal directories.
Click to hide internal directories.