minor refactoring
This commit is contained in:
parent
646593ca6d
commit
a6a01808b9
@ -18,6 +18,11 @@ import de.svenkubiak.jpushover.enums.Constants;
|
||||
import de.svenkubiak.jpushover.enums.Priority;
|
||||
import de.svenkubiak.jpushover.enums.Sound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author svenkubiak
|
||||
*
|
||||
*/
|
||||
public class JPushover {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JPushover.class);
|
||||
|
||||
@ -39,7 +44,7 @@ public class JPushover {
|
||||
* Your application's API token
|
||||
* (required)
|
||||
*
|
||||
* @param token
|
||||
* @param token The pushover API token
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover token(String token) {
|
||||
@ -52,7 +57,7 @@ public class JPushover {
|
||||
* viewable when logged into the @see <a href="https://pushover.net/login">pushover dashboard</a>
|
||||
* (required)
|
||||
*
|
||||
* @param user
|
||||
* @param user The username
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover user(String user) {
|
||||
@ -64,7 +69,7 @@ public class JPushover {
|
||||
* Your message
|
||||
* (required)
|
||||
*
|
||||
* @param message
|
||||
* @param message The message to sent
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover message(String message) {
|
||||
@ -77,7 +82,7 @@ public class JPushover {
|
||||
* rather than all of the user's devices
|
||||
* (optional)
|
||||
*
|
||||
* @param device
|
||||
* @param device The device name
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover device(String device) {
|
||||
@ -89,7 +94,7 @@ public class JPushover {
|
||||
* Your message's title, otherwise your app's name is used
|
||||
* (optional)
|
||||
*
|
||||
* @param title
|
||||
* @param title The title
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover title(String title) {
|
||||
@ -101,7 +106,7 @@ public class JPushover {
|
||||
* A supplementary URL to show with your message
|
||||
* (optional)
|
||||
*
|
||||
* @param url
|
||||
* @param url The url
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover url(String url) {
|
||||
@ -112,7 +117,7 @@ public class JPushover {
|
||||
/**
|
||||
* A title for your supplementary URL, otherwise just the URL is shown
|
||||
*
|
||||
* @param urlTitle
|
||||
* @param urlTitle The url title
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover urlTitle(String urlTitle) {
|
||||
@ -124,7 +129,7 @@ public class JPushover {
|
||||
* 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
|
||||
*
|
||||
* @param timestamp
|
||||
* @param timestamp The Unix timestamp
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover timestamp(String timestamp) {
|
||||
@ -136,7 +141,7 @@ public class JPushover {
|
||||
* Priority of the message based on the @see <a href="https://pushover.net/api#priority">documentation</a>
|
||||
* (optional)
|
||||
*
|
||||
* @param priority
|
||||
* @param priority The priority enum
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover priority(Priority priority) {
|
||||
@ -149,7 +154,7 @@ public class JPushover {
|
||||
* the user's default sound choice
|
||||
* (optional)
|
||||
*
|
||||
* @param sound
|
||||
* @param sound THe sound enum
|
||||
* @return JPushover instance
|
||||
*/
|
||||
public JPushover sound(Sound sound) {
|
||||
|
@ -1,5 +1,10 @@
|
||||
package de.svenkubiak.jpushover;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author svenkubiak
|
||||
*
|
||||
*/
|
||||
public class JPushoverResponse {
|
||||
private String pushoverResponse;
|
||||
private int pushoverHttpStatus;
|
||||
@ -40,7 +45,7 @@ public class JPushoverResponse {
|
||||
}
|
||||
|
||||
/**
|
||||
* True if request to pushover API returned HTTP code 200, false otherwise
|
||||
* True if the request to the pushover API returned HTTP code 200, false otherwise
|
||||
* @return boolen
|
||||
*/
|
||||
public boolean isSuccessful() {
|
||||
|
@ -1,5 +1,10 @@
|
||||
package de.svenkubiak.jpushover.enums;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author svenkubiak
|
||||
*
|
||||
*/
|
||||
public enum Constants {
|
||||
PUSHOVER_URL("https://api.pushover.net/1/messages.json"),
|
||||
MESSAGE("message"),
|
||||
|
@ -1,5 +1,10 @@
|
||||
package de.svenkubiak.jpushover.enums;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author svenkubiak
|
||||
*
|
||||
*/
|
||||
public enum Priority {
|
||||
LOWEST("-2"),
|
||||
LOW("-1"),
|
||||
|
@ -1,5 +1,10 @@
|
||||
package de.svenkubiak.jpushover.enums;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author svenkubiak
|
||||
*
|
||||
*/
|
||||
public enum Sound {
|
||||
PUSHOVER("pushover"),
|
||||
BIKE("bike"),
|
||||
|
@ -1,10 +0,0 @@
|
||||
package de.svenkubiak.jpushover;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
public class AppTest {
|
||||
@Test
|
||||
public void testApp() {
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user