Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct { Application string Description string Event string Priority int URL string // contains filtered or unexported fields }
Notification is a Prowl notification
func (*Notification) AddKey ¶
func (n *Notification) AddKey(key string) error
AddKey appends an API key to the notification list
func (*Notification) DelKey ¶
func (n *Notification) DelKey(key string) error
DelKey removes a key from the notification list
type ProwlClient ¶
type ProwlClient struct {
ProviderKey string
}
ProwlClient is used to interface with Prowl
func (ProwlClient) Push ¶
func (c ProwlClient) Push(n Notification) error
Push a notification to ProwlApp
func (ProwlClient) RequestToken ¶
func (c ProwlClient) RequestToken() (*Tokens, error)
RequestToken retrieves a token from the ProwlApp API. Tokens are used to authenticate a user and generate their API key with prowlapp
func (ProwlClient) RetrieveAPIKey ¶
func (c ProwlClient) RetrieveAPIKey(token string) (string, error)
RetrieveAPIKey returns an API key given a token from RequestToken. API keys can be added to lists etc
type ProwlDispatcher ¶
type ProwlDispatcher interface { Push(n Notification) error // push the notification RequestToken() (*Tokens, error) // request an access token RetrieveAPIKey(token string) (string, error) // retrieve an api key from prowlapp }
ProwlDispatcher defines the methods for interacting with the Prowl API
func NewProwlClient ¶
func NewProwlClient(providerKey string) ProwlDispatcher
NewProwlClient creates a new client for interfacing with Prowl
Click to show internal directories.
Click to hide internal directories.