@@ -1,53 +0,0 @@
1−{-# LANGUAGE OverloadedStrings #-}
2−{-# LANGUAGE TemplateHaskell #-}
3−
4−-- Module : Network.PagerDuty.REST.EscalationPolicies.OnCall
5−-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
6−-- License : This Source Code Form is subject to the terms of
7−-- the Mozilla Public License, v. 2.0.
8−-- A copy of the MPL can be found in the LICENSE file or
9−-- you can obtain it at http://mozilla.org/MPL/2.0/.
10−-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
11−-- Stability : experimental
12−-- Portability : non-portable (GHC extensions)
13−
14−-- | List escalation policies for currently on-call users.
15−module Network.PagerDuty.REST.EscalationPolicies.OnCall
16− ( ListOnCallPolicies
17− , listOnCallPolicies
18− , locpQuery
19− ) where
20−
21−import Control.Lens
22−import Data.Monoid
23−import Data.Text (Text)
24−import Data.Time
25−import Network.HTTP.Types
26−import Network.PagerDuty.TH
27−import Network.PagerDuty.Types
28−
29−newtype ListOnCallPolicies = ListOnCallPolicies
30− { _locpQuery :: Maybe Text
31− } deriving (Eq, Show)
32−
33−queryRequest ''ListOnCallPolicies
34−
35−instance Paginate ListOnCallPolicies
36−
37−-- | Filters the result, showing only the escalation policies whose names match
38−-- the query.
39−makeLens "_locpQuery" ''ListOnCallPolicies
40−
41−-- | List all the existing escalation policies with currently on-call users.
42−--
43−-- If the start and end of an on-call object are null, then the user is always
44−-- on-call for an escalation policy level.
45−--
46−-- @GET \/escalation_policies\/on_call@
47−--
48−-- /See:/ <http://developer.pagerduty.com/documentation/rest/escalation_policies/on_call>
49−listOnCallPolicies :: Request ListOnCallPolicies s [Policy]
50−listOnCallPolicies =
51− mk ListOnCallPolicies
52− { _locpQuery = Nothing
53− } & path .~ "policies"