Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ViberAPIBaseURL is a base API url
ViberAPIBaseURL = "https://chatapi.viber.com/pa/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ViberBotAPI ¶
type ViberBotAPI struct {
// contains filtered or unexported fields
}
ViberBotAPI allows you to interact with the Viber Bot API.
func NewViberBotAPIWithHTTPClient ¶
func NewViberBotAPIWithHTTPClient(token string, httpClient *http.Client) *ViberBotAPI
NewViberBotAPIWithHTTPClient creates new API provider with HTTP client
func (ViberBotAPI) SendMessage ¶
func (botApi ViberBotAPI) SendMessage(m viberinterface.MessageToReceiver) (requestBody []byte, response viberinterface.SendMessageResponse, err error)
SendMessage sends messages to Viber
func (ViberBotAPI) SetWebhook ¶
func (botApi ViberBotAPI) SetWebhook(url string, eventTypes []string) (response viberinterface.SetWebhookResponse, err error)
SetWebhook sets webhook to the specified URL
Click to show internal directories.
Click to hide internal directories.