Versions in this module Expand all Collapse all v1 v1.0.0 Jul 28, 2022 Changes in this version + const ActionAddTag + const ActionRemoveTag + const ActionSetFieldValue + const ActionUnsetFieldValue + const ButtonTypeBuy + const ButtonTypeCall + const ButtonTypeDynamicBlockCallback + const ButtonTypeFlow + const ButtonTypeNode + const ButtonTypeUrl + const ImageAspectRatioHorizontal + const ImageAspectRationSquare + const MessageTagAccountUpdate + const MessageTagConfirmedEventUpdate + const MessageTagCustomerFeedback + const MessageTagHumanAgent + const MessageTagPostPurchaseUpdate + const MessageTypeAudio + const MessageTypeCards + const MessageTypeFile + const MessageTypeImage + const MessageTypeText + const MessageTypeVideo + const QuickReplyTypeDynamicBlockCallback + const QuickReplyTypeFlow + const QuickReplyTypeNode + const WebViewSizeCompact + const WebViewSizeFull + const WebViewSizeMedium + type Action struct + Action string + FieldName string + TagName string + Value interface{} + type ActionBuilder struct + func (builder *ActionBuilder) BuildAddTagAction(tagName string) *Action + func (builder *ActionBuilder) BuildRemoveTagAction(tagName string) *Action + func (builder *ActionBuilder) BuildSetFieldValueAction(fieldName string, value interface{}) *Action + func (builder *ActionBuilder) BuildUnsetFieldValueAction(fieldName string) *Action + type AddSubscriberTagByNameRequest struct + SubscriberId int64 + TagName string + type AddSubscriberTagRequest struct + SubscriberId int64 + TagId int64 + type BotField struct + Description string + Id int64 + Name string + Type BotFieldType + Value interface{} + type BotFieldService struct + func (s *BotFieldService) CreateBotField(request CreateBotFieldRequest) (*BotField, *http.Response, error) + func (s *BotFieldService) GetBotFields() (*[]BotField, *http.Response, error) + func (s *BotFieldService) SetBotField(request SetBotFieldRequest) (bool, *http.Response, error) + func (s *BotFieldService) SetBotFieldByName(request SetBotFieldByNameRequest) (bool, *http.Response, error) + func (s *BotFieldService) SetBotFields(request SetBotFieldsRequest) (bool, *http.Response, error) + func (s *BotFieldService) SetCustomFields(request SetCustomFieldsRequest) (bool, *http.Response, error) + type BotFieldType DataType + type Button struct + Caption string + Customer Customer + Headers interface{} + Method string + Payload interface{} + Phone string + Product Product + SuccessTarget string + Target string + Type string + Url string + WebViewSize string + type ButtonsBuilder struct + func (builder *ButtonsBuilder) BuildBuyButton(caption string, customer Customer, product Product, successTarget string) *Button + func (builder *ButtonsBuilder) BuildCallButton(caption string, phone string) *Button + func (builder *ButtonsBuilder) BuildCallbackButton(caption string, url string, method string, headers interface{}, ...) *Button + func (builder *ButtonsBuilder) BuildFlowButton(caption string, target string) *Button + func (builder *ButtonsBuilder) BuildNodeButton(caption string, target string) *Button + func (builder *ButtonsBuilder) BuildUrlButton(caption string, url string, webViewSize string) *Button + type Client struct + DynamicBlock *DynamicBlockBuilder + Page *PageService + Sending *SendingService + Subscribers *SubscriberService + func NewClient(httpClient *http.Client, bearer string) *Client + func (client *Client) SetApiUrl(url string) + func (client *Client) SetBearer(bearer string) + type CreateBotFieldRequest struct + Description string + Name string + Type DataType + Value interface{} + type CreateSubscriberRequest struct + ConsentPhrase string + Email string + FirstName string + Gender string + HasOptInEmail bool + HasOptInSMS bool + LastName string + Phone string + WhatsAppPhone string + type CreateTagRequest struct + Name string + type CustomField struct + Description string + Id int64 + Name string + Type DataType + type CustomFieldService struct + func (s *CustomFieldService) CreateCustomField(request СreateCustomFieldRequest) (*CustomField, *http.Response, error) + func (s *CustomFieldService) GetCustomFields() (*[]CustomField, *http.Response, error) + type Customer struct + ContactEmail bool + ContactName bool + ContactPhone bool + ShippingAddress bool + type DataType string + const BotFieldTypeBoolean + const BotFieldTypeDate + const BotFieldTypeDateTime + const BotFieldTypeNumber + const BotFieldTypeText + const BotFieldTypeUndefined + const CustomFieldTypeBoolean + const CustomFieldTypeDate + const CustomFieldTypeDateTime + const CustomFieldTypeNumber + const CustomFieldTypeText + const CustomFieldTypeUndefined + const DataTypeBoolean + const DataTypeDate + const DataTypeDateTime + const DataTypeNumber + const DataTypeText + const DataTypeUndefined + type DynamicBlock struct + Content struct{ ... } + Version string + func (dynamicBlock *DynamicBlock) AddAction(action *Action) + func (dynamicBlock *DynamicBlock) AddActions(actions []*Action) + func (dynamicBlock *DynamicBlock) AddMessage(message *Message) + func (dynamicBlock *DynamicBlock) AddMessages(messages []*Message) + func (dynamicBlock *DynamicBlock) AddQuickReplies(quickReplies []*QuickReply) + func (dynamicBlock *DynamicBlock) AddQuickReply(quickReply *QuickReply) + type DynamicBlockBuilder struct + Actions *ActionBuilder + Buttons *ButtonsBuilder + ExternalMessage *ExternalMessageBuilder + Gallery *GalleryBuilder + Messages *MessageBuilder + QuickReply *QuickReplyBuilder + func NewDynamicBlockBuilder() *DynamicBlockBuilder + func (builder *DynamicBlockBuilder) BuildDynamicBlock() *DynamicBlock + type ExternalMessage struct + Headers interface{} + Method string + Payload interface{} + Timeout int64 + Url string + type ExternalMessageBuilder struct + func (builder *ExternalMessageBuilder) BuildExternalMessage(url string, method string, headers interface{}, payload interface{}, ...) *ExternalMessage + type FindSubscriberByCustomFieldRequest struct + FieldId int64 + FieldValue interface{} + type FindSubscriberByEmailRequest struct + Email string + type FindSubscriberByNameRequest struct + Name string + type FindSubscriberByPhoneRequest struct + Phone string + type Flow struct + FolderId int64 + NS string + Name string + type FlowService struct + func (s *FlowService) GetFlows() (*Flows, *http.Response, error) + type Flows struct + Flows []Flow + Folders []Folder + type Folder struct + Id int64 + Name string + ParentId int64 + type Gallery struct + Elements []*GalleryCard + func (gallery *Gallery) AddGalleryCard(title string, subtitle string, imageUrl string, actionUrl string, ...) + func (gallery *Gallery) GetImageAspectRation() string + func (gallery *Gallery) SetImageAspectRation(imageAspectRatio string) + type GalleryBuilder struct + func (builder *GalleryBuilder) NewGallery() *Gallery + type GalleryCard struct + ActionUrl string + Buttons []Button + ImageUrl string + SubTitle string + Title string + type GetSubscriberInfoByUserRefRequest struct + UserRef int64 + type GetSubscriberInfoRequest struct + SubscriberId int64 + type GrowthTool struct + Id int64 + Name string + Type string + type GrowthToolsService struct + func (s *GrowthToolsService) GetGrowthTools() (*[]GrowthTool, *http.Response, error) + type Message struct + Buttons []*Button + Elements []*GalleryCard + ImageAspectRatio string + Text string + Type string + Url string + func (message *Message) AddButton(button *Button) + func (message *Message) AddButtons(buttons []*Button) + type MessageBuilder struct + func (builder *MessageBuilder) BuildAudioMessage(url string) *Message + func (builder *MessageBuilder) BuildFileMessage(url string) *Message + func (builder *MessageBuilder) BuildGalleryMessage(gallery *Gallery) *Message + func (builder *MessageBuilder) BuildImageMessage(url string) *Message + func (builder *MessageBuilder) BuildTextMessage(text string) *Message + func (builder *MessageBuilder) BuildVideoMessage(url string) *Message + type OtnTopic struct + Description string + Id string + Name string + type OtnTopicService struct + func (s *OtnTopicService) GetOtnTopics() (*[]OtnTopic, *http.Response, error) + type Page struct + About string + AvatarLink string + Category string + Description string + Id int64 + IsPro bool + Name string + Timezone string + Username string + type PageService struct + BotFields *BotFieldService + CustomFields *CustomFieldService + Flows *FlowService + GrowthTools *GrowthToolsService + OtnTopics *OtnTopicService + Tags *TagService + func (s *PageService) GetInfo() (*Page, *http.Response, error) + type Product struct + Cost int64 + Label string + type QuickReply struct + Caption string + Headers interface{} + Method string + Payload interface{} + Target string + Type string + Url string + type QuickReplyBuilder struct + func (builder *QuickReplyBuilder) BuildDynamicBlockCallbackQuickReply(caption string, url string, method string, headers interface{}, ...) *QuickReply + func (builder *QuickReplyBuilder) BuildFlowQuickReply(caption string, target string) *QuickReply + func (builder *QuickReplyBuilder) BuildNodeQuickReply(caption string, target string) *QuickReply + type RateLimit uint16 + const RateLimitPageCreateBotField + const RateLimitPageCreateCustomField + const RateLimitPageCreateTag + const RateLimitPageGetBotFields + const RateLimitPageGetCustomFields + const RateLimitPageGetFlows + const RateLimitPageGetGrowthTools + const RateLimitPageGetInfo + const RateLimitPageGetOtnTopics + const RateLimitPageGetTags + const RateLimitPageRemoveTag + const RateLimitPageRemoveTageByName + const RateLimitPageSetBotField + const RateLimitPageSetBotFieldByName + const RateLimitPageSetBotFields + const RateLimitSendingSendContent + const RateLimitSendingSendContentByUserRef + const RateLimitSendingSendFlow + const RateLimitSubscriberAddTag + const RateLimitSubscriberAddTagByName + const RateLimitSubscriberCreateSubscriber + const RateLimitSubscriberFindByCustomField + const RateLimitSubscriberFindByName + const RateLimitSubscriberFindBySystemField + const RateLimitSubscriberGetInfo + const RateLimitSubscriberGetInfoByUserRef + const RateLimitSubscriberRemoveTag + const RateLimitSubscriberRemoveTagByName + const RateLimitSubscriberSetCustomField + const RateLimitSubscriberSetCustomFieldByName + const RateLimitSubscriberSetCustomFields + const RateLimitSubscriberUpdateSubscriber + const RateLimitSubscriberVerifyBySignedRequest + type RemoveSubscriberTagByNameRequest struct + SubscriberId int64 + TagName string + type RemoveSubscriberTagRequest struct + SubscriberId int64 + TagId int64 + type RemoveTagByNameRequest struct + Name string + type RemoveTagRequest struct + Id int64 + type SendingSendContentByUserRefRequest struct + Data DynamicBlock + UserRef int64 + type SendingSendContentRequest struct + Data *DynamicBlock + MessageTag string + OtnTopicName string + SubscriberId int64 + type SendingSendFlowRequest struct + FlowNS string + SubscriberId int64 + type SendingService struct + func (s *SendingService) SendContent(request SendingSendContentRequest) (bool, *http.Response, error) + func (s *SendingService) SendContentByUserRef(request SendingSendContentByUserRefRequest) (bool, *http.Response, error) + func (s *SendingService) SendFlow(request SendingSendFlowRequest) (bool, *http.Response, error) + type SetBotFieldByNameRequest struct + FieldName string + FieldValue interface{} + type SetBotFieldRequest struct + FieldId int64 + FieldValue interface{} + type SetBotFieldsItem struct + Id int64 + Name string + Value interface{} + type SetBotFieldsRequest struct + Items []SetBotFieldsItem + type SetCustomFieldsItem struct + Id int64 + Name string + Value interface{} + type SetCustomFieldsRequest struct + Items []SetCustomFieldsItem + type SetSubscriberCustomFieldByNameRequest struct + FieldName string + FieldValue interface{} + SubscriberId int64 + type SetSubscriberCustomFieldRequest struct + FieldId int64 + FieldValue interface{} + SubscriberId int64 + type Subscriber struct + CustomFields []SubscriberCustomField + Email string + FirstName string + Gender string + Id string + IgId int64 + IgUsername string + IsFollowupEnabled bool + Language string + LastInputText string + LastInteraction string + LastName string + LastSeen string + LiveChatUrl string + Locale string + Name string + OptInEmail bool + OptInPhone bool + OptInWhatsApp bool + PageId string + Phone string + ProfilePic string + ShopifyFields []SubscriberShopifyField + Subscribed string + Tags []Tag + TimeZone string + UserRefs []SubscriberRefField + WhatsAppPhone string + type SubscriberCustomField struct + Description string + Id int64 + Name string + Type DataType + Value interface{} + type SubscriberRefField struct + OptedIn string + UserRef string + type SubscriberService struct + func (s *SubscriberService) AddTag(request AddSubscriberTagRequest) (bool, *http.Response, error) + func (s *SubscriberService) AddTagByName(request AddSubscriberTagRequest) (bool, *http.Response, error) + func (s *SubscriberService) CreateSubscriber(request CreateSubscriberRequest) (*Subscriber, *http.Response, error) + func (s *SubscriberService) FindByCustomField(request FindSubscriberByCustomFieldRequest) (*[]Subscriber, *http.Response, error) + func (s *SubscriberService) FindByEmail(request FindSubscriberByEmailRequest) (*Subscriber, *http.Response, error) + func (s *SubscriberService) FindByName(request FindSubscriberByNameRequest) (*[]Subscriber, *http.Response, error) + func (s *SubscriberService) FindByPhone(request FindSubscriberByPhoneRequest) (*Subscriber, *http.Response, error) + func (s *SubscriberService) GetInfo(request GetSubscriberInfoRequest) (*Subscriber, *http.Response, error) + func (s *SubscriberService) GetInfoByUserRef(request GetSubscriberInfoByUserRefRequest) (*Subscriber, *http.Response, error) + func (s *SubscriberService) RemoveTag(request RemoveSubscriberTagRequest) (bool, *http.Response, error) + func (s *SubscriberService) RemoveTagByName(request RemoveSubscriberTagByNameRequest) (bool, *http.Response, error) + func (s *SubscriberService) SetCustomField(request SetSubscriberCustomFieldRequest) (bool, *http.Response, error) + func (s *SubscriberService) SetCustomFieldByName(request SetSubscriberCustomFieldByNameRequest) (bool, *http.Response, error) + func (s *SubscriberService) UpdateSubscriber(request UpdateSubscriberRequest) (*Subscriber, *http.Response, error) + func (s *SubscriberService) VerifyBySignedRequest(request SubscriberVerifyBySignedRequestRequest) (bool, *http.Response, error) + type SubscriberShopifyField struct + AcceptsMarketing bool + Currency string + Id int64 + LastCheckoutCreatedAt string + LastCheckoutId int64 + LastCheckoutPrice string + LastOrderCreatedAt string + LastOrderId int64 + OrdersCount int64 + State string + Tags []string + TotalSpent string + type SubscriberVerifyBySignedRequestRequest struct + SignedRequest string + SubscriberId int64 + type Tag struct + Id int64 + Name string + type TagService struct + func (s *TagService) CreateTag(request CreateTagRequest) (*Tag, *http.Response, error) + func (s *TagService) GetTags() (*[]Tag, *http.Response, error) + func (s *TagService) RemoveTag(request RemoveTagRequest) (bool, *http.Response, error) + func (s *TagService) RemoveTagByName(request RemoveTagByNameRequest) (bool, *http.Response, error) + type UpdateSubscriberRequest struct + ConsentPhrase string + Email string + FirstName string + Gender string + HasOptInEmail bool + HasOptInSMS bool + LastName string + Phone string + SubscriberId int64 + WhatsAppPhone string + type СreateCustomFieldRequest struct + Caption string + Description string + Type DataType