Skip to content

Commit 792665d

Browse files
authored
Merge pull request #345 from hercules-ci/organizationsR
Add organizationsR to request user organizations
2 parents e8dda55 + d79ceec commit 792665d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/GitHub.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ module GitHub (
156156
-- * Edit an organization
157157
publicOrganizationsForR,
158158
publicOrganizationR,
159+
organizationsR,
159160
-- ** Members
160161
-- | See <https://developer.github.com/v3/orgs/members/>
161162
--

src/GitHub/Endpoints/Organizations.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module GitHub.Endpoints.Organizations (
1111
publicOrganization,
1212
publicOrganization',
1313
publicOrganizationR,
14+
organizationsR,
1415
module GitHub.Data,
1516
) where
1617

@@ -32,7 +33,12 @@ publicOrganizationsFor' auth org =
3233
publicOrganizationsFor :: Name User -> IO (Either Error (Vector SimpleOrganization))
3334
publicOrganizationsFor = publicOrganizationsFor' Nothing
3435

35-
-- | List user organizations.
36+
-- | List all user organizations.
37+
-- See <https://developer.github.com/v3/orgs/#list-your-organizations>
38+
organizationsR :: FetchCount -> Request k (Vector SimpleOrganization)
39+
organizationsR = pagedQuery ["user", "orgs"] []
40+
41+
-- | List public user organizations.
3642
-- See <https://developer.github.com/v3/orgs/#list-user-organizations>
3743
publicOrganizationsForR :: Name User -> FetchCount -> Request k (Vector SimpleOrganization)
3844
publicOrganizationsForR user = pagedQuery ["users", toPathPart user, "orgs"] []

0 commit comments

Comments
 (0)