Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 1.99 KB

File metadata and controls

96 lines (61 loc) · 1.99 KB
import "github.com/gTahidi/wapi.go/pkg/messaging"

type MessagingClient

MessagingClient represents a WhatsApp client.

type MessagingClient struct {
    Media             manager.MediaManager
    Message           manager.MessageManager
    PhoneNumberId     string
    ApiAccessToken    string
    BusinessAccountId string
    Requester         *request_client.RequestClient
}

func (*MessagingClient) Deregister

func (client *MessagingClient) Deregister() (RegisterResponse, error)

func (*MessagingClient) GetApiAccessToken

func (client *MessagingClient) GetApiAccessToken() string

func (*MessagingClient) GetBusinessAccountId

func (client *MessagingClient) GetBusinessAccountId() string

func (*MessagingClient) GetPhoneNumberId

func (client *MessagingClient) GetPhoneNumberId() string

GetPhoneNumberId returns the phone number ID associated with the client.

func (*MessagingClient) Register

func (client *MessagingClient) Register(pin string) (RegisterResponse, error)

this register function is for one time registration of the phone number to enable the usage with WhatsApp Cloud API

func (*MessagingClient) SetApiAccessToken

func (client *MessagingClient) SetApiAccessToken(apiAccessToken string)

func (*MessagingClient) SetPhoneNumberId

func (client *MessagingClient) SetPhoneNumberId(phoneNumberId string)

SetPhoneNumberId sets the phone number ID for the client.

type RegisterResponse

type RegisterResponse struct {
    Success bool `json:"success"`
}