helpers

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(c *config.Cluster, pwd string, np string) string

Login performs login into the whatsapp account and generates a long term auth token, if new password is provided the existing will be replaced by the new password

func SendMessage

func SendMessage(clus *config.Cluster, msg *map[string]interface{}) ([]byte, error)

SendMessage is a helper function to make a http call the whatsapp infra

func UploadMedia

func UploadMedia(clus *config.Cluster, file *types.Media) ([]byte, error)

UploadMedia provides a helper function to upload the file to whatsapp

func VerifyContact

func VerifyContact(clus *config.Cluster, to int, blocking bool, forceCheck bool) (*types.ContactResponse, error)

VerifyContact is a helper function to call the verify http request to verify the end user number if the user is not registered with whatsapp it will result in an error and exit with status code 1

Types

This section is empty.

Jump to

Keyboard shortcuts

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