viberbotapi

package module
v0.0.0-...-9184b9a Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 6 Imported by: 3

README

Go package strongo/bots-api-viber

Go language client to Viber's Public Accounts API

Build Status Go Report Card GoDoc

Frameworks that use bots-api-viber package

This package is used in production by

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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