-
Notifications
You must be signed in to change notification settings - Fork 196
Expand file tree
/
Copy pathProjects.hs
More file actions
43 lines (34 loc) · 1.45 KB
/
Projects.hs
File metadata and controls
43 lines (34 loc) · 1.45 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
--
-- The repo commits API as described on
-- <https://docs.github.com/en/rest/reference/projects>
module GitHub.Endpoints.Repos.Projects (
repoProjectsForR
, orgProjectsForR
, projectColumnsForR
, columnCardsForR
) where
import GitHub.Data
import GitHub.Data.Request
import GitHub.Request
import GitHub.Data.Projects
import GitHub.Internal.Prelude
import Prelude ()
-- | List projects for a repository
-- See <https ://docs.github.com/en/rest/reference/projects#list-repository-projects
repoProjectsForR :: Name Owner -> Name Repo -> FetchCount -> GenRequest ('MtPreview Inertia) k (Vector Project)
repoProjectsForR user repo =
PagedQuery ["repos", toPathPart user, toPathPart repo, "projects"] []
orgProjectsForR :: Name Owner -> FetchCount -> GenRequest ( 'MtPreview Inertia) k (Vector Project)
orgProjectsForR user =
PagedQuery ["orgs", toPathPart user, "projects"] []
projectColumnsForR :: (Id Project) -> FetchCount -> GenRequest ( 'MtPreview Inertia) k (Vector Column)
projectColumnsForR project_id =
PagedQuery ["projects", toPathPart project_id, "columns"] []
columnCardsForR :: (Id Column) -> FetchCount -> GenRequest ( 'MtPreview Inertia) k (Vector Card)
columnCardsForR column_id =
PagedQuery ["projects", "columns", toPathPart column_id, "cards"] []