commit
0cbcf27da7
@ -224,6 +224,17 @@ public class Message implements API {
|
|||||||
return this;
|
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
|
* Uses a given proxy for the HTTP requests to Pushover
|
||||||
*
|
*
|
||||||
|
@ -24,7 +24,8 @@ public enum Param {
|
|||||||
TOKEN("token"),
|
TOKEN("token"),
|
||||||
URL("url"),
|
URL("url"),
|
||||||
URL_TITLE("url_title"),
|
URL_TITLE("url_title"),
|
||||||
USER("user");
|
USER("user"),
|
||||||
|
TTL("ttl");
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user