implemented TTL feature
This commit is contained in:
parent
a9286162c8
commit
be619b1843
@ -224,6 +224,17 @@ public class Message implements API {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ttl Seconds until this message should be automatically removed from the device. Needs to be positive
|
||||
* @see https://pushover.net/api#ttl
|
||||
* @return Message instance
|
||||
*/
|
||||
public Message withTTL(int ttl) {
|
||||
body.put(Param.TTL.toString(), Integer.toString(ttl));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses a given proxy for the HTTP requests to Pushover
|
||||
*
|
||||
|
@ -24,7 +24,8 @@ public enum Param {
|
||||
TOKEN("token"),
|
||||
URL("url"),
|
||||
URL_TITLE("url_title"),
|
||||
USER("user");
|
||||
USER("user"),
|
||||
TTL("ttl");
|
||||
|
||||
private final String value;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user