Help us shape the future of Go! Take the 2026 Go Developer Survey

goprowl

package module
v0.0.0-...-54237fc Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2014 License: BSD-3-Clause Imports: 6 Imported by: 4

README

Goprowl

A wrapper for Prowl, Growl-like iPhone push notifications, written in Go.

Originally written by Yanko D Sanchez Bolanos, 07/12/2011.

Usage

var p goprowl.Goprowl

err := p.RegisterKey("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
if err != nil {
	fmt.Println("Unable to register key! - " + + err.Error())
	return
}

n := &goprowl.Notification{
    Application : "Foo",
    Description: "Foobar!",
    Event : "Bar",
	Priority : "1",
	Providerkey : "",
	Url: "www.foobar.com",		
}

err = p.Push(n)
if err != nil {
	fmt.Println("Unable to send Prowl notification! - " + + err.Error())
}

err = p.DelKey("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
if err != nil {
	fmt.Println("Unable to remove key! - " + err.Error())
}

Documentation

Index

Constants

View Source
const (
	API_SERVER = "https://api.prowlapp.com"
	ADD_PATH   = "/publicapi/add"
	API_URL    = API_SERVER + ADD_PATH
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Goprowl

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

func (*Goprowl) DelKey

func (gp *Goprowl) DelKey(key string) error

func (*Goprowl) Push

func (gp *Goprowl) Push(n *Notification) (err error)

func (*Goprowl) RegisterKey

func (gp *Goprowl) RegisterKey(key string) error

type Notification

type Notification struct {
	Application string
	Description string
	Event       string
	Priority    string
	Providerkey string
	Url         string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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