Documentation
¶
Index ¶
- Constants
- func DoBoolPostRequest(sling *sling.Sling, path string, requestParams interface{}) (bool, *http.Response, error)
- func MatchFirstError(httpError error, errorResponse *ErrorResponse) error
- type AddSubscriberTagByNameRequest
- type AddSubscriberTagRequest
- type BoolSuccessResponse
- type BotField
- type BotFieldService
- 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
- type CreateBotFieldRequest
- type CreateSubscriberRequest
- type CreateTagRequest
- type CustomField
- type CustomFieldService
- type DataType
- type ErrorResponse
- type FindSubscriberByCustomFieldRequest
- type FindSubscriberByEmailRequest
- type FindSubscriberByNameRequest
- type FindSubscriberByPhoneRequest
- type Flow
- type FlowService
- type Flows
- type Folder
- type GetSubscriberInfoByUserRefRequest
- type GetSubscriberInfoRequest
- type GrowthTool
- type GrowthToolsService
- type OtnTopic
- type OtnTopicService
- type Page
- type PageService
- type RateLimit
- type RemoveSubscriberTagByNameRequest
- type RemoveSubscriberTagRequest
- type RemoveTagByNameRequest
- type RemoveTagRequest
- type SendingSendContentByUserRefRequest
- type SendingSendContentRequest
- type SendingSendFlowRequest
- type SendingService
- 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
- type SetBotFieldRequest
- type SetBotFieldsItem
- type SetBotFieldsRequest
- type SetCustomFieldsItem
- type SetCustomFieldsRequest
- type SetSubscriberCustomFieldByNameRequest
- type SetSubscriberCustomFieldRequest
- type Subscriber
- type SubscriberCustomField
- type SubscriberRefField
- type SubscriberService
- 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
- type SubscriberVerifyBySignedRequestRequest
- type Tag
- type TagService
- 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
- type СreateCustomFieldRequest
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func DoBoolPostRequest ¶
func MatchFirstError ¶
func MatchFirstError(httpError error, errorResponse *ErrorResponse) error
Types ¶
type AddSubscriberTagRequest ¶
type BoolSuccessResponse ¶
type BoolSuccessResponse struct {
Status string `json:"status"`
}
type BotField ¶
type BotField struct {
Id int64 `json:"id"`
Name string `json:"name"`
Type BotFieldType `json:"type"`
Description string `json:"description"`
Value interface{} `json:"value"`
}
type BotFieldService ¶
type BotFieldService struct {
// contains filtered or unexported fields
}
func (*BotFieldService) CreateBotField ¶
func (s *BotFieldService) CreateBotField(request CreateBotFieldRequest) (*BotField, *http.Response, error)
func (*BotFieldService) GetBotFields ¶
func (s *BotFieldService) GetBotFields() (*[]BotField, *http.Response, error)
func (*BotFieldService) SetBotField ¶
func (s *BotFieldService) SetBotField(request SetBotFieldRequest) (bool, *http.Response, error)
func (*BotFieldService) SetBotFieldByName ¶
func (s *BotFieldService) SetBotFieldByName(request SetBotFieldByNameRequest) (bool, *http.Response, error)
func (*BotFieldService) SetBotFields ¶
func (s *BotFieldService) SetBotFields(request SetBotFieldsRequest) (bool, *http.Response, error)
func (*BotFieldService) SetCustomFields ¶
func (s *BotFieldService) SetCustomFields(request SetCustomFieldsRequest) (bool, *http.Response, error)
type BotFieldType ¶
type BotFieldType DataType
type CreateBotFieldRequest ¶
type CreateSubscriberRequest ¶
type CreateSubscriberRequest struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Phone string `json:"phone"`
WhatsAppPhone string `json:"whatsapp_phone,omitempty"`
Email string `json:"email"`
Gender string `json:"gender"`
HasOptInSMS bool `json:"has_opt_in_sms"`
HasOptInEmail bool `json:"has_opt_in_email"`
ConsentPhrase string `json:"consent_phrase"`
}
type CreateTagRequest ¶
type CreateTagRequest struct {
Name string `json:"name,omitempty"`
}
type CustomField ¶
type CustomFieldService ¶
type CustomFieldService struct {
// contains filtered or unexported fields
}
func (*CustomFieldService) CreateCustomField ¶
func (s *CustomFieldService) CreateCustomField(request СreateCustomFieldRequest) (*CustomField, *http.Response, error)
func (*CustomFieldService) GetCustomFields ¶
func (s *CustomFieldService) GetCustomFields() (*[]CustomField, *http.Response, error)
type DataType ¶
type DataType string
const ( BotFieldTypeUndefined DataType = DataTypeUndefined BotFieldTypeText DataType = DataTypeText BotFieldTypeNumber DataType = DataTypeNumber BotFieldTypeDate DataType = DataTypeDate BotFieldTypeDateTime DataType = DataTypeDateTime BotFieldTypeBoolean DataType = DataTypeBoolean )
const ( CustomFieldTypeUndefined DataType = DataTypeUndefined CustomFieldTypeText DataType = DataTypeText CustomFieldTypeNumber DataType = DataTypeNumber CustomFieldTypeDate DataType = DataTypeDate CustomFieldTypeDateTime DataType = DataTypeDateTime CustomFieldTypeBoolean DataType = DataTypeBoolean )
type ErrorResponse ¶
type FindSubscriberByCustomFieldRequest ¶
type FindSubscriberByCustomFieldRequest struct {
FieldId int64 `url:"field_id"`
FieldValue interface{} `url:"field_value"`
}
type FindSubscriberByEmailRequest ¶
type FindSubscriberByEmailRequest struct {
Email string `url:"email"`
}
type FindSubscriberByNameRequest ¶
type FindSubscriberByNameRequest struct {
Name string `url:"name"`
}
type FindSubscriberByPhoneRequest ¶
type FindSubscriberByPhoneRequest struct {
Phone string `url:"phone"`
}
type FlowService ¶
type FlowService struct {
// contains filtered or unexported fields
}
type GetSubscriberInfoByUserRefRequest ¶
type GetSubscriberInfoByUserRefRequest struct {
UserRef int64 `url:"user_ref"`
}
type GetSubscriberInfoRequest ¶
type GetSubscriberInfoRequest struct {
SubscriberId int64 `url:"subscriber_id"`
}
type GrowthTool ¶
type GrowthToolsService ¶
type GrowthToolsService struct {
// contains filtered or unexported fields
}
func (*GrowthToolsService) GetGrowthTools ¶
func (s *GrowthToolsService) GetGrowthTools() (*[]GrowthTool, *http.Response, error)
type OtnTopicService ¶
type OtnTopicService struct {
// contains filtered or unexported fields
}
func (*OtnTopicService) GetOtnTopics ¶
func (s *OtnTopicService) GetOtnTopics() (*[]OtnTopic, *http.Response, error)
type Page ¶
type Page struct {
Id int64 `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
AvatarLink string `json:"avatar_link"`
Username string `json:"username"`
About string `json:"about"`
Description string `json:"description"`
IsPro bool `json:"is_pro"`
Timezone string `json:"timezone"`
}
type PageService ¶
type PageService struct {
Tags *TagService
GrowthTools *GrowthToolsService
Flows *FlowService
OtnTopics *OtnTopicService
CustomFields *CustomFieldService
BotFields *BotFieldService
// contains filtered or unexported fields
}
func NewPageService ¶
func NewPageService(sling *sling.Sling) *PageService
type RateLimit ¶
type RateLimit uint16
const ( RateLimitPageGetInfo RateLimit = 100 RateLimitPageCreateTag RateLimit = 10 RateLimitPageGetTags RateLimit = 100 RateLimitPageRemoveTag RateLimit = 10 RateLimitPageRemoveTageByName RateLimit = 10 RateLimitPageCreateCustomField RateLimit = 10 RateLimitPageGetGrowthTools RateLimit = 100 RateLimitPageGetFlows RateLimit = 10 RateLimitPageGetCustomFields RateLimit = 100 RateLimitPageGetOtnTopics RateLimit = 100 RateLimitPageGetBotFields RateLimit = 100 RateLimitPageCreateBotField RateLimit = 10 RateLimitPageSetBotField RateLimit = 10 RateLimitPageSetBotFieldByName RateLimit = 10 RateLimitPageSetBotFields RateLimit = 10 RateLimitSubscriberGetInfo RateLimit = 10 RateLimitSubscriberFindByName RateLimit = 100 RateLimitSubscriberGetInfoByUserRef RateLimit = 1000 RateLimitSubscriberFindByCustomField RateLimit = 100 RateLimitSubscriberFindBySystemField RateLimit = 100 RateLimitSubscriberAddTag RateLimit = 10 RateLimitSubscriberAddTagByName RateLimit = 10 RateLimitSubscriberRemoveTag RateLimit = 10 RateLimitSubscriberRemoveTagByName RateLimit = 10 RateLimitSubscriberSetCustomField RateLimit = 10 RateLimitSubscriberSetCustomFields RateLimit = 10 RateLimitSubscriberSetCustomFieldByName RateLimit = 10 RateLimitSubscriberVerifyBySignedRequest RateLimit = 10 RateLimitSubscriberCreateSubscriber RateLimit = 10 RateLimitSubscriberUpdateSubscriber RateLimit = 10 RateLimitSendingSendContent RateLimit = 25 RateLimitSendingSendContentByUserRef RateLimit = 25 RateLimitSendingSendFlow RateLimit = 25 )
type RemoveTagByNameRequest ¶
type RemoveTagByNameRequest struct {
Name string `json:"tag_name,omitempty"`
}
type RemoveTagRequest ¶
type RemoveTagRequest struct {
Id int64 `json:"tag_id,omitempty"`
}
type SendingSendContentByUserRefRequest ¶
type SendingSendContentByUserRefRequest struct {
UserRef int64 `json:"user_ref"`
Data DynamicBlock `json:"data"`
}
type SendingSendFlowRequest ¶
type SendingService ¶
type SendingService struct {
// contains filtered or unexported fields
}
func NewSendingService ¶
func NewSendingService(sling *sling.Sling) *SendingService
func (*SendingService) SendContent ¶
func (s *SendingService) SendContent(request SendingSendContentRequest) (bool, *http.Response, error)
func (*SendingService) SendContentByUserRef ¶
func (s *SendingService) SendContentByUserRef(request SendingSendContentByUserRefRequest) (bool, *http.Response, error)
func (*SendingService) SendFlow ¶
func (s *SendingService) SendFlow(request SendingSendFlowRequest) (bool, *http.Response, error)
type SetBotFieldByNameRequest ¶
type SetBotFieldByNameRequest struct {
FieldName string `json:"field_name"`
FieldValue interface{} `json:"field_value"`
}
type SetBotFieldRequest ¶
type SetBotFieldRequest struct {
FieldId int64 `json:"field_id"`
FieldValue interface{} `json:"field_value"`
}
type SetBotFieldsItem ¶
type SetBotFieldsRequest ¶
type SetBotFieldsRequest struct {
Items []SetBotFieldsItem `json:"fields"`
}
type SetCustomFieldsItem ¶
type SetCustomFieldsRequest ¶
type SetCustomFieldsRequest struct {
Items []SetCustomFieldsItem `json:"fields"`
}
type Subscriber ¶
type Subscriber struct {
Id string `json:"id"`
PageId string `json:"page_id"`
UserRefs []SubscriberRefField `json:"user_refs,omitempty"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Name string `json:"name"`
Gender string `json:"gender"`
ProfilePic string `json:"profile_pic"`
Locale string `json:"locale"`
Language string `json:"language"`
TimeZone string `json:"time_zone"`
LiveChatUrl string `json:"live_chat_url"`
LastInputText string `json:"last_input_text"`
OptInPhone bool `json:"optin_phone"`
Phone string `json:"phone"`
OptInEmail bool `json:"optin_email"`
Email string `json:"email"`
Subscribed string `json:"subscribed"`
LastInteraction string `json:"last_interaction"`
LastSeen string `json:"last_seen"`
IsFollowupEnabled bool `json:"is_followup_enabled"`
IgUsername string `json:"ig_username"`
IgId int64 `json:"ig_id"`
WhatsAppPhone string `json:"whatsapp_phone"`
OptInWhatsApp bool `json:"optin_whatsapp"`
CustomFields []SubscriberCustomField `json:"custom_fields"`
ShopifyFields []SubscriberShopifyField `json:"shopify_fields,omitempty"`
Tags []Tag `json:"tags,omitempty"`
}
type SubscriberCustomField ¶
type SubscriberRefField ¶
type SubscriberService ¶
type SubscriberService struct {
// contains filtered or unexported fields
}
func NewSubscriberService ¶
func NewSubscriberService(sling *sling.Sling) *SubscriberService
func (*SubscriberService) AddTag ¶
func (s *SubscriberService) AddTag(request AddSubscriberTagRequest) (bool, *http.Response, error)
func (*SubscriberService) AddTagByName ¶
func (s *SubscriberService) AddTagByName(request AddSubscriberTagRequest) (bool, *http.Response, error)
func (*SubscriberService) CreateSubscriber ¶
func (s *SubscriberService) CreateSubscriber(request CreateSubscriberRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) FindByCustomField ¶
func (s *SubscriberService) FindByCustomField(request FindSubscriberByCustomFieldRequest) (*[]Subscriber, *http.Response, error)
func (*SubscriberService) FindByEmail ¶
func (s *SubscriberService) FindByEmail(request FindSubscriberByEmailRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) FindByName ¶
func (s *SubscriberService) FindByName(request FindSubscriberByNameRequest) (*[]Subscriber, *http.Response, error)
func (*SubscriberService) FindByPhone ¶
func (s *SubscriberService) FindByPhone(request FindSubscriberByPhoneRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) GetInfo ¶
func (s *SubscriberService) GetInfo(request GetSubscriberInfoRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) GetInfoByUserRef ¶
func (s *SubscriberService) GetInfoByUserRef(request GetSubscriberInfoByUserRefRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) RemoveTag ¶
func (s *SubscriberService) RemoveTag(request RemoveSubscriberTagRequest) (bool, *http.Response, error)
func (*SubscriberService) RemoveTagByName ¶
func (s *SubscriberService) RemoveTagByName(request RemoveSubscriberTagByNameRequest) (bool, *http.Response, error)
func (*SubscriberService) SetCustomField ¶
func (s *SubscriberService) SetCustomField(request SetSubscriberCustomFieldRequest) (bool, *http.Response, error)
func (*SubscriberService) SetCustomFieldByName ¶
func (s *SubscriberService) SetCustomFieldByName(request SetSubscriberCustomFieldByNameRequest) (bool, *http.Response, error)
func (*SubscriberService) UpdateSubscriber ¶
func (s *SubscriberService) UpdateSubscriber(request UpdateSubscriberRequest) (*Subscriber, *http.Response, error)
func (*SubscriberService) VerifyBySignedRequest ¶
func (s *SubscriberService) VerifyBySignedRequest(request SubscriberVerifyBySignedRequestRequest) (bool, *http.Response, error)
type SubscriberShopifyField ¶
type SubscriberShopifyField struct {
Id int64 `json:"id"`
State string `json:"state"`
Currency string `json:"currency"`
TotalSpent string `json:"total_spent"`
OrdersCount int64 `json:"orders_count"`
AcceptsMarketing bool `json:"accepts_marketing"`
LastOrderId int64 `json:"last_order_id"`
LastOrderCreatedAt string `json:"last_order_created_at"`
Tags []string `json:"tags"`
LastCheckoutId int64 `json:"last_checkout_id"`
LastCheckoutPrice string `json:"last_checkout_price"`
LastCheckoutCreatedAt string `json:"last_checkout_created_at"`
}
type TagService ¶
type TagService struct {
// contains filtered or unexported fields
}
func (*TagService) CreateTag ¶
func (s *TagService) CreateTag(request CreateTagRequest) (*Tag, *http.Response, error)
func (*TagService) RemoveTag ¶
func (s *TagService) RemoveTag(request RemoveTagRequest) (bool, *http.Response, error)
func (*TagService) RemoveTagByName ¶
func (s *TagService) RemoveTagByName(request RemoveTagByNameRequest) (bool, *http.Response, error)
type UpdateSubscriberRequest ¶
type UpdateSubscriberRequest struct {
SubscriberId int64 `json:"subscriber_id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Phone string `json:"phone"`
WhatsAppPhone string `json:"whatsapp_phone,omitempty"`
Email string `json:"email"`
Gender string `json:"gender"`
HasOptInSMS bool `json:"has_opt_in_sms"`
HasOptInEmail bool `json:"has_opt_in_email"`
ConsentPhrase string `json:"consent_phrase"`
}
Click to show internal directories.
Click to hide internal directories.