refactorings and updated readme.md

This commit is contained in:
Sven Kubiak
2016-10-20 08:35:08 +02:00
parent 70cc6aa712
commit 9c26be1068
3 changed files with 39 additions and 39 deletions

View File

@ -21,26 +21,26 @@ Usage
2) Use the JPushover object with the required informations were you want
JPushover.build()
.token("MyToken")
.user("MyUser")
.message("MyMessage")
.wihtToken("MyToken")
.withUser("MyUser")
.withMessage("MyMessage")
.push();
You can additionally add all available options from the official [Pushover documentation][2]
You can also validate a user and token using the following method
boolean valid = JPushover().build()
.token("MyToken")
.user("MyUser")
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()
.token("MyToken")
.user("MyUser")
.message("MyMessage")
.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.