Skip to content

archisgore/pagerduty-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

A PagerDuty Events V2 API Client Library in Rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%