Class: PagerDuty::ExternalServices::Service
- Inherits:
-
Service
- Object
- Common::Client::Base
- Service
- PagerDuty::ExternalServices::Service
- Includes:
- Common::Client::Concerns::Monitoring
- Defined in:
- lib/pagerduty/external_services/service.rb
Constant Summary collapse
- QUERY =
Equivalent to ‘External:’
CGI.escape(Settings.maintenance.service_query_prefix)
- LIMIT =
100
Constants inherited from Service
Instance Method Summary collapse
-
#get_services ⇒ PagerDuty::ExternalServices::Response
Calls PagerDuty’s GET /services endpoint, and returns a pre-serialized representation of the raw response.
Methods included from Common::Client::Concerns::Monitoring
Methods inherited from Service
Methods inherited from Common::Client::Base
configuration, #raise_backend_exception
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Instance Method Details
#get_services ⇒ PagerDuty::ExternalServices::Response
Calls PagerDuty’s GET /services endpoint, and returns a pre-serialized representation of the raw response.
26 27 28 29 30 31 32 |
# File 'lib/pagerduty/external_services/service.rb', line 26 def get_services with_monitoring do raw_response = perform(:get, "/services?limit=#{LIMIT}&query=#{QUERY}") PagerDuty::ExternalServices::Response.from(raw_response) end end |