8 releases
0.1.6 | Mar 3, 2022 |
---|---|
0.1.5 | Feb 4, 2022 |
0.1.4 | Dec 23, 2021 |
0.1.1 | Jan 5, 2021 |
0.0.1 | Dec 2, 2020 |
#1338 in Web programming
1,306 downloads per month
Used in 2 crates
35KB
651 lines
pagerduty-rs
A PagerDuty Events V2 API Client Library in Rust.
Using the API
Complete API examples are provided as integration tests.
With feature sync
:
use pagerduty_rs::eventsv2sync::*;
use pagerduty_rs::types::*;
// ....
// Create an API client with an Integration Key
let ev2 = EventsV2::new(String::from("IntegrationKey"), Some("Optional pagerduty-rs user agent".to_owned())).unwrap();
// Then send an event (which might be a change, alert trigger/acknowledge/resolve)...
ev2.event(Event::AlertTrigger(AlertTrigger{
// ...
}));
With feature async
:
use pagerduty_rs::eventsv2async::*;
use pagerduty_rs::types::*;
// ....
// Create an API client with an Integration Key
let ev2 = EventsV2::new(String::from("IntegrationKey"), Some("Optional pagerduty-rs user agent".to_owned())).unwrap();
// Then send an event (which might be a change, alert trigger/acknowledge/resolve)...
ev2.event(Event::AlertTrigger(AlertTrigger{
// ...
})).await;
Dependencies
~5–18MB
~273K SLoC