Sha256: 05897c2609f3c07663ef1126893f99a2c46da9a8f3cd835361030df623f84cc4
Contents?: true
Size: 1.5 KB
Versions: 6
Compression:
Stored size: 1.5 KB
Contents
pagerduty ========= Provides a simple interface for calling into the [Pagerduty](http://pagerduty.com) API. Installation ------------ Install pagerduty with this command: gem install pagerduty Usage ----- Pagerduty exposes three classes, `Pagerduty`, `PagerdutyIncident` and `PagerdutyException`. Instances of `PagerdutyIncident` are created and returned for every API call. `Pagerduty`'s constructor takes 2 arguments - your `service_key` and an optional argument to set the 'incident_key' You can then use the method `trigger` to trigger a new incident with Pagerduty: require 'pagerduty' p = Pagerduty.new "your_pagerduty_service_key" incident = p.trigger "Everything went down!" Incidents can be retriggered, acknowledged with the `PagerdutyIncident#acknowledge` method, and resolved with `PagerdutyIncident#resolve`. Additionally, all API methods (`trigger`, `acknowledge`, `resolve`) take an optional second parameter `details`, which should be a hash containing any extra information that should be recorded with Pagerduty. If the Pagerduty API does not return success, a `PagerdutyException` will be thrown which has the properties `pagerduty_instance` (the instance of either `Pagerduty` or `PagerdutyException` that caused the exception) and `api_response`, which is a hash representation of the JSON response from the Pagerduty API. Copyright --------- Copyright (c) 2010 [Envato](http://envato.com) & [Charlie Somerville](http://charliesomerville.com). See LICENSE.txt for further details.
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
pagerduty-1.4.0 | README.md |
pagerduty-1.3.4 | README.md |
pagerduty-1.3.3 | README.md |
pagerduty-1.3.2 | README.md |
pagerduty-1.3.1 | README.md |
pagerduty-1.3.0 | README.md |