All Downloads are FREE. Search and download functionalities are using the official Maven repository.

in.ashwanthkumar.notify.pagerduty.SimplePDNotifier Maven / Gradle / Ivy

There is a newer version: 1.0-rc3
Show newest version
package in.ashwanthkumar.notify.pagerduty;

import com.squareup.pagerduty.incidents.PagerDuty;
import com.squareup.pagerduty.incidents.Trigger;
import in.ashwanthkumar.notify.Notifier;

public class SimplePDNotifier implements Notifier {

    private String apiKey;

    public SimplePDNotifier(String apiKey) {
        this.apiKey = apiKey;
    }

    @Override
    public void notify(String message) {
        PagerDuty pd = PagerDuty.create(apiKey);
        pd.notify(new Trigger.Builder(message).build());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy