----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause -- Maintainer : Oleg Grenrus -- -- The repo watching API as described on -- . module GitHub.Endpoints.Activity.Notifications ( getNotificationsR, markNotificationAsReadR, markAllNotificationsAsReadR, ) where import GitHub.Data import GitHub.Internal.Prelude import Prelude () -- | List your notifications. -- See getNotificationsR :: FetchCount -> Request 'RA (Vector Notification) getNotificationsR = pagedQuery ["notifications"] [] -- | Mark a thread as read. -- See markNotificationAsReadR :: Id Notification -> GenRequest 'MtUnit 'RW () markNotificationAsReadR nid = Command Patch ["notifications", "threads", toPathPart nid] (encode ()) -- | Mark as read. -- See markAllNotificationsAsReadR :: GenRequest 'MtUnit 'RW () markAllNotificationsAsReadR = Command Put ["notifications"] $ encode emptyObject