pushover

package
v0.0.0-...-3009a32 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client  *http.Client
	Device  string
	Token   string
	UserKey string
}

func New

func New(device, userKey, token string) *Client

func (*Client) SendMessage

func (c *Client) SendMessage(title, message string) error

type SendMessageErrorResponse

type SendMessageErrorResponse struct {
	SendMessageResponse
	Token  string   `json:"token"`
	Errors []string `json:"errors"`
}

SendMessageErrorResponse is the type of SendMessage error response messages Example: {"token":"invalid","errors":["application token is invalid"],"status":0,"request":"7d9fe901-5339-4be6-8d23-0e99650ca1e2"}

type SendMessageRequest

type SendMessageRequest struct {
	Token   string `json:"token"`
	User    string `json:"user"`
	Device  string `json:"device"`
	Title   string `json:"title"`
	Message string `json:"message"`
	HTML    string `json:"html"`
}

SendMessageRequest is the type of SendMessage request messages

type SendMessageResponse

type SendMessageResponse struct {
	Status  int    `json:"status"`
	Request string `json:"request"`
}

SendMessageResponse is the type of SendMessage response messages Example: {"status":1,"request":"e4a934f5-212f-4010-b321-d9c48a244a64"}

Jump to

Keyboard shortcuts

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