pkWhatsApp

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID     string
	From   string
	Text   string
	Time   time.Time
	Source whatsapp.TextMessage
}

Message content body whatsapp text message

type WhatsappClient

type WhatsappClient struct {
	MobileNumber string
	// contains filtered or unexported fields
}

WhatsappClient connect

func NewClient

func NewClient() *WhatsappClient

NewClient create whatsapp client

func (*WhatsappClient) GetConnection

func (wp *WhatsappClient) GetConnection() *whatsapp.Conn

GetConnection return whatsapp connection

func (*WhatsappClient) Listen

func (wp *WhatsappClient) Listen(f messageListener)

Listen text messages

func (*WhatsappClient) SendImage

func (wp *WhatsappClient) SendImage(to, imageFile, extension, caption string)

func (*WhatsappClient) SendText

func (wp *WhatsappClient) SendText(to string, text string)

SendText send text message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL