Crates.io | pagerduty-rs |
lib.rs | pagerduty-rs |
version | 0.1.6 |
source | src |
created_at | 2020-12-02 23:19:22.974852 |
updated_at | 2022-03-03 20:09:52.594628 |
description | PagerDuty API from Rust. |
homepage | |
repository | https://github.com/archisgore/pagerduty-rs |
max_upload_size | |
id | 319044 |
size | 58,929 |
A PagerDuty Events V2 API Client Library in Rust.
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;