1.5 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.5 KiB
		
	
	
	
	
	
	
	
JPushover
Convenient class for sending messages to Pushover in Java project
Usage
- 
Add the jpushover dependency to your pom.xml:
de.svenkubiak jpushover x.x.x - 
Use the JPushover object with the required informations were you want
JPushover.build() .wihtToken("MyToken") .withUser("MyUser") .withMessage("MyMessage") .push();
 
You can additionally add all available options from the official Pushover documentation
You can also validate a user and token using the following method
boolean valid = JPushover.build()
	.withToken("MyToken")
	.withUser("MyUser")
	.validate();
If you want more information and/or the response from the Pushover API, use the JPushoverResponse object.
JPushoverResponse jPushoverResponse = JPushover.build()
	.withToken("MyToken")
	.withUser("MyUser")
	.withMessage("MyMessage")
	.push();
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.
