[−][src]Crate pushover_api
A Rust library to interact with the Pushover.net API.
Note
This library is woefully incomplete and primarily built on a "want to have" basis. If you find yourself missing something from the Pushover API and want it implemented, please create an issue for it (or email me at me@bauke.xyz).
Examples
To send just a message to a user, you can use the convenience
send_simple_message
function.
use pushover_api::send_simple_message; send_simple_message("application token", "user key", "Message").unwrap();
To send a more complex message, create a Message
and send()
it.
use pushover_api::Message; let message = Message { token: "application token".to_string(), user: "user key".to_string(), message: "Message".to_string(), title: Some("Title".to_string()), url: Some("https://example.com".to_string()), ..Message::default() }; let response = message.send().unwrap(); dbg!(response);
Structs
Message | The full message body to send to the Pushover API. |
MessageResponse | The response from Pushover and the HTTP status code after a message was successfully sent. |
Enums
MessagePriority | The message priority. |
Functions
send_simple_message | Convenience function to send a simple message without having to construct
the |