forked from haskell-github/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvents.hs
More file actions
28 lines (25 loc) · 1.02 KB
/
Events.hs
File metadata and controls
28 lines (25 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- The events API as described on <https://developer.github.com/v3/activity/events/>.
module GitHub.Endpoints.Activity.Events (
-- * Events
repositoryEventsR,
userEventsR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
-- | List repository events.
-- See <https://developer.github.com/v3/activity/events/#list-repository-events>
repositoryEventsR :: Name Owner -> Name Repo -> FetchCount -> Request 'RO (Vector Event)
repositoryEventsR user repo =
pagedQuery ["repos", toPathPart user, toPathPart repo, "events"] []
-- | List user public events.
-- See <https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user>
userEventsR :: Name User -> FetchCount -> Request 'RO (Vector Event)
userEventsR user =
pagedQuery ["users", toPathPart user, "events", "public"] []