pagerduty-rs

Crates.iopagerduty-rs
lib.rspagerduty-rs
version0.1.6
sourcesrc
created_at2020-12-02 23:19:22.974852
updated_at2022-03-03 20:09:52.594628
descriptionPagerDuty API from Rust.
homepage
repositoryhttps://github.com/archisgore/pagerduty-rs
max_upload_size
id319044
size58,929
Archis (archisgore)

documentation

README

Build Status

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;
Commit count: 38

cargo fmt