diff --git a/README.md b/README.md
index 366efd1..4e25b95 100644
--- a/README.md
+++ b/README.md
@@ -34,20 +34,20 @@ You can additionally add all available options from the official [Pushover docum
You can also validate a user and token using the following method
- boolean valid = new JPushover()
+ boolean valid = JPushover().build()
.token("MyToken")
.user("MyUser")
.validate();
If you want more information and/or the response from the Pushover API, use the JPushoverResponse object.
- JPushoverResponse jPushoverResponse = JPushover()
+ JPushoverResponse jPushoverResponse = JPushover.build()
.token("MyToken")
.user("MyUser")
.message("MyMessage")
.push();
-JPushoverResponse will return the raw HTTP status code, along with the raw JSON response and a convenient boolean if the request was successful or not.
+The JPushoverResponse will return the raw HTTP status code, along with the raw JSON response and a convenient boolean if the request was successful or not.
[1]: https://pushover.net
[2]: https://pushover.net/api
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 5531e1e..d5c461a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -165,11 +165,6 @@
4.12
test
-
- com.google.guava
- guava
- 18.0
-
diff --git a/src/main/java/de/svenkubiak/jpushover/JPushover.java b/src/main/java/de/svenkubiak/jpushover/JPushover.java
index d136116..9fc198f 100644
--- a/src/main/java/de/svenkubiak/jpushover/JPushover.java
+++ b/src/main/java/de/svenkubiak/jpushover/JPushover.java
@@ -46,6 +46,10 @@ public class JPushover {
this.priority(Priority.NORMAL);
}
+ /**
+ * Creates a new JPushover instance
+ * @return JPushover instance
+ */
public static JPushover build() {
return new JPushover();
}
@@ -209,7 +213,7 @@ public class JPushover {
/**
* 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
+ * pushover servers will send a request to when the user has acknowledged your
* notification.
* Only required if priority is set to emergency.
*
@@ -340,9 +344,9 @@ public class JPushover {
.add(Constants.EXPIRE.toString(), this.pushoverExpire)
.add(Constants.CALLBACK.toString(), this.pushoverCallback)
.add(Constants.URLTITLE.toString(), this.pushoverUrlTitle)
- .add(Constants.PRIORITY.toString(), this.pushoverPriority.get())
+ .add(Constants.PRIORITY.toString(), this.pushoverPriority.toString())
.add(Constants.TIMESTAMP.toString(), this.pushoverTimestamp)
- .add(Constants.SOUND.toString(), this.pushoverSound.get())
+ .add(Constants.SOUND.toString(), this.pushoverSound.toString())
.add(Constants.HTML.toString(), this.pushoverHtml ? "1" : "0")
.build();
diff --git a/src/main/java/de/svenkubiak/jpushover/JPushoverResponse.java b/src/main/java/de/svenkubiak/jpushover/JPushoverResponse.java
index d309bcf..fe5cac1 100644
--- a/src/main/java/de/svenkubiak/jpushover/JPushoverResponse.java
+++ b/src/main/java/de/svenkubiak/jpushover/JPushoverResponse.java
@@ -26,24 +26,21 @@ public class JPushoverResponse {
}
/**
- * The raw Json Response from the pushover API
- * @return String
+ * @return The pushover response
*/
public String getResponse() {
return pushoverResponse;
}
/**
- * The HTTP status from the HTTP request
- * @return int
+ * @return The HTTP status
*/
public int getHttpStatus() {
return pushoverHttpStatus;
}
/**
- * True if the request to the pushover API returned HTTP code 200, false otherwise
- * @return boolen
+ * @return true if the api returned a HTTP status code 200, false othwise
*/
public boolean isSuccessful() {
return pushoverSuccessful;
diff --git a/src/main/java/de/svenkubiak/jpushover/enums/Priority.java b/src/main/java/de/svenkubiak/jpushover/enums/Priority.java
index cd11eba..11e225d 100644
--- a/src/main/java/de/svenkubiak/jpushover/enums/Priority.java
+++ b/src/main/java/de/svenkubiak/jpushover/enums/Priority.java
@@ -18,7 +18,7 @@ public enum Priority {
this.value = value;
}
- public String get() {
+ public String toString() {
return this.value;
}
}
\ No newline at end of file
diff --git a/src/main/java/de/svenkubiak/jpushover/enums/Sound.java b/src/main/java/de/svenkubiak/jpushover/enums/Sound.java
index 2cbbf57..d6d5476 100644
--- a/src/main/java/de/svenkubiak/jpushover/enums/Sound.java
+++ b/src/main/java/de/svenkubiak/jpushover/enums/Sound.java
@@ -8,7 +8,7 @@ package de.svenkubiak.jpushover.enums;
public enum Sound {
PUSHOVER("pushover"),
BIKE("bike"),
- BUGLE("bugke"),
+ BUGLE("bugle"),
CASHREGISTET("cashregister"),
CLASSICAL("classical"),
COSMIC("cosmic"),
@@ -35,7 +35,7 @@ public enum Sound {
this.value = value;
}
- public String get() {
+ public String toString() {
return this.value;
}
}