bark

package module
v0.0.0-...-7f86312 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllRingtones contains all available built-in ringtones.

Functions

This section is empty.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device represents a registered device with Bark app installed that receives notifications.

func New

func New(endpointURL, deviceKey string) *Device

New returns a Device representing the given registered device.

func (*Device) Ping

func (d *Device) Ping(opts ...Options) error

Ping sends a empty message to the device.

func (*Device) SendMessage

func (d *Device) SendMessage(title, body string, opts ...Options) error

SendMessage sends a message with title and body content to the device.

func (*Device) SendShortMessage

func (d *Device) SendShortMessage(content string, opts ...Options) error

SendShortMessage sends a message contains only body content to the device.

func (Device) String

func (d Device) String() string

type Options

type Options struct {
	Ringtone     RingtoneName
	OpenURL      string
	CopyText     string
	ForceArchive bool
	ForceCopy    bool
}

Options represents options for notification request.

func (Options) String

func (o Options) String() string

type RingtoneName

type RingtoneName string

RingtoneName represents name of built-in ringtones of Bark app.

const (
	RingtoneDefault            RingtoneName = ""
	RingtoneSilence            RingtoneName = "silence"
	RingtoneAlarm              RingtoneName = "alarm"
	RingtoneAnticipate         RingtoneName = "anticipate"
	RingtoneBell               RingtoneName = "bell"
	RingtoneBirdsong           RingtoneName = "birdsong"
	RingtoneBloom              RingtoneName = "bloom"
	RingtoneCalypso            RingtoneName = "calypso"
	RingtoneChime              RingtoneName = "chime"
	RingtoneChoo               RingtoneName = "choo"
	RingtoneDescent            RingtoneName = "descent"
	RingtoneElectronic         RingtoneName = "electronic"
	RingtoneFanfare            RingtoneName = "fanfare"
	RingtoneGlass              RingtoneName = "glass"
	RingtoneGoToSleep          RingtoneName = "gotosleep"
	RingtoneHealthNotification RingtoneName = "healthnotification"
	RingtoneHorn               RingtoneName = "horn"
	RingtoneLadder             RingtoneName = "ladder"
	RingtoneMailSent           RingtoneName = "mailsent"
	RingtoneMinuet             RingtoneName = "minuet"
	RingtoneMultiwayInvitation RingtoneName = "multiwayinvitation"
	RingtoneNewMail            RingtoneName = "newmail"
	RingtoneNewsFlash          RingtoneName = "newsflash"
	RingtoneNoir               RingtoneName = "noir"
	RingtonePaymentSuccess     RingtoneName = "paymentsuccess"
	RingtoneShake              RingtoneName = "shake"
	RingtoneSherwoodForest     RingtoneName = "sherwoodforest"
	RingtoneSpell              RingtoneName = "spell"
	RingtoneSuspense           RingtoneName = "suspense"
	RingtoneTelegraph          RingtoneName = "telegraph"
	RingtoneTiptoes            RingtoneName = "tiptoes"
	RingtoneTypewriters        RingtoneName = "typewriters"
	RingtoneUpdate             RingtoneName = "update"
)

Name of available built-in ringtones of Bark app

Jump to

Keyboard shortcuts

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