Documentation
¶
Index ¶
- type Client
- func (client *Client) GetFlowManager() *manager.FlowManager
- func (client *Client) GetMediaManager() *manager.MediaManager
- func (client *Client) GetWebhookGetRequestHandler() func(c echo.Context) error
- func (client *Client) GetWebhookPostRequestHandler() func(c echo.Context) error
- func (client *Client) Initiate() bool
- func (client *Client) NewMessagingClient(phoneNumberId string) *messaging.MessagingClient
- func (client *Client) On(eventType events.EventType, handler func(events.BaseEvent))
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Business business.BusinessClient // Business is the business client.
Messaging []messaging.MessagingClient // MessagingClient is the messaging client.
// contains filtered or unexported fields
}
func New ¶
func New(config *ClientConfig) *Client
func (*Client) GetFlowManager ¶ added in v0.9.30
func (client *Client) GetFlowManager() *manager.FlowManager
GetFlowManager returns a FlowManager for WhatsApp Flows management operations. This includes creating, listing, updating, publishing, and deprecating flows.
func (*Client) GetMediaManager ¶ added in v0.8.1
func (client *Client) GetMediaManager() *manager.MediaManager
GetMediaManager returns a MediaManager for uploading media (e.g., for template headers). This is useful when you need to upload media without a specific phone number context.
func (*Client) GetWebhookGetRequestHandler ¶
GetWebhookGetRequestHandler returns the handler function for handling GET requests to the webhook.
func (*Client) GetWebhookPostRequestHandler ¶
GetWebhookPostRequestHandler returns the handler function for handling POST requests to the webhook.
func (*Client) Initiate ¶
InitiateClient initializes the client and starts listening to events from the webhook. It returns true if the client was successfully initiated.
func (*Client) NewMessagingClient ¶
func (client *Client) NewMessagingClient(phoneNumberId string) *messaging.MessagingClient