implemented TTL feature

This commit is contained in:
damage 2023-07-12 22:50:46 +02:00
parent a9286162c8
commit be619b1843
2 changed files with 13 additions and 1 deletions

View File

@ -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
*

View File

@ -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;