mod entities;
pub use entities::alert::AlertData as AlertData;
pub use entities::alert::Alert as Alert;
pub use entities::alert::Priority as Priority;
pub struct OpsGenie {
api_key: String,
}
impl OpsGenie {
pub fn new(key: String) -> OpsGenie {
OpsGenie {
api_key: key.clone(),
}
}
pub fn alert(&self, alert_data: AlertData) -> Result<Alert, reqwest::Error> {
Alert::create(&self.api_key, alert_data)
}
}