public class JPushover extends Object
| Constructor and Description |
|---|
JPushover() |
| Modifier and Type | Method and Description |
|---|---|
static JPushover |
build()
Creates a new JPushover instance
|
JPushover |
enableHtml()
Enables HTML in the pushover message
(optional)
|
File |
getAttachment() |
String |
getCallback() |
String |
getDevice() |
String |
getExpire() |
String |
getMessage() |
Priority |
getPriority() |
String |
getRetry() |
Sound |
getSound() |
String |
getTimestamp() |
String |
getTitle() |
String |
getToken() |
String |
getUrl() |
String |
getUrlTitle() |
String |
getUser() |
boolean |
isHtml() |
JPushoverResponse |
push()
Sends a message to pushover
|
boolean |
validate()
Sends a validation request to pushover ensuring that the token and user
is correct, that there is at least one active device on the account.
|
JPushover |
withAttachment(File attachment)
Add a file attachment to be added to the request
|
JPushover |
withCallback(String callback)
Callback parameter may be supplied with a publicly-accessible URL that the
pushover servers will send a request to when the user has acknowledged your
notification.
|
JPushover |
withDevice(String device)
Your user's device name to send the message directly to that device,
rather than all of the user's devices
(optional)
|
JPushover |
withExpire(String expire)
Specifies how many seconds your notification will continue to be retried for (every retry seconds).
|
JPushover |
withMessage(String message)
Your message
(required)
|
JPushover |
withPriority(Priority priority)
Priority of the message based on the @see documentation
(optional)
|
JPushover |
withRetry(String retry)
Specifies how often (in seconds) the Pushover servers will send the same notification to the user.
|
JPushover |
withSound(Sound sound)
The name of one of the sounds supported by device clients to override
the user's default sound choice
(optional)
|
JPushover |
withTimestamp(String timestamp)
A Unix timestamp of your message's date and time to display to the user,
rather than the time your message is received by our API
|
JPushover |
withTitle(String title)
Your message's title, otherwise your app's name is used
(optional)
|
JPushover |
withToken(String token)
Your application's API token
(required)
|
JPushover |
withUrl(String url)
A supplementary URL to show with your message
(optional)
|
JPushover |
withUrlTitle(String urlTitle)
A title for your supplementary URL, otherwise just the URL is shown
|
JPushover |
withUser(String user)
The user/group key (not e-mail address) of your user (or you),
viewable when logged into the @see pushover dashboard
(required)
|
public static JPushover build()
public final JPushover withToken(String token)
token - The pushover API tokenpublic final JPushover withUser(String user)
user - The usernamepublic final JPushover withRetry(String retry)
retry - Number of secondspublic final JPushover withAttachment(File attachment)
attachment - The attachment to addpublic final JPushover withExpire(String expire)
expire - Number of secondspublic final JPushover withMessage(String message)
message - The message to sentpublic final JPushover withDevice(String device)
device - The device namepublic final JPushover withTitle(String title)
title - The titlepublic final JPushover withUrl(String url)
url - The urlpublic final JPushover enableHtml()
public final JPushover withUrlTitle(String urlTitle)
urlTitle - The url titlepublic final JPushover withTimestamp(String timestamp)
timestamp - The Unix timestamppublic final JPushover withPriority(Priority priority)
priority - The priority enumpublic final JPushover withSound(Sound sound)
sound - THe sound enumpublic final JPushover withCallback(String callback)
callback - The callback URLpublic boolean validate()
public final JPushoverResponse push()
public String getToken()
public String getUser()
public String getMessage()
public String getDevice()
public String getTitle()
public String getUrl()
public String getUrlTitle()
public String getTimestamp()
public String getRetry()
public File getAttachment()
public String getExpire()
public String getCallback()
public Priority getPriority()
public Sound getSound()
public boolean isHtml()
Copyright © 2018. All rights reserved.