Module: Pagerduty
- Defined in:
- lib/pagerduty.rb,
lib/pagerduty/version.rb,
lib/pagerduty/events_api_v1.rb,
lib/pagerduty/events_api_v2.rb,
lib/pagerduty/http_transport.rb
Defined Under Namespace
Classes: EventsApiV1, EventsApiV2, HttpTransport
Constant Summary collapse
- VERSION =
"4.0.1"
Class Method Summary collapse
-
.build(config) ⇒ Pagerduty::EventsApiV1
Build an instance that will send API calls to the specified Pagerduty Events API version.
Class Method Details
.build(config) ⇒ Pagerduty::EventsApiV1
Build an instance that will send API calls to the specified Pagerduty Events API version.
66 67 68 69 70 71 72 73 74 |
# File 'lib/pagerduty.rb', line 66 def self.build(config) raise ArgumentError, "integration_key not provided" unless config.key?(:integration_key) raise ArgumentError, "incident_key provided" if config.key?(:incident_key) version = config.fetch(:api_version) do raise ArgumentError, "api_version not provided" end events_api_class(version).new(config) end |