github-0.22: Access to the GitHub API, v3.

LicenseBSD-3-Clause
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

GitHub.Endpoints.Organizations.Teams

Description

The Owner teams API as described on http://developer.github.com/v3/orgs/teams/.

Synopsis

Documentation

teamsOf :: Name Organization -> IO (Either Error (Vector SimpleTeam)) Source #

List the public teams of an Owner.

teamsOf "thoughtbot"

teamsOf' :: Maybe Auth -> Name Organization -> IO (Either Error (Vector SimpleTeam)) Source #

List teams. List the teams of an Owner. When authenticated, lists private teams visible to the authenticated user. When unauthenticated, lists only public teams for an Owner.

teamsOf' (Just $ OAuth "token") "thoughtbot"

teamInfoFor :: Id Team -> IO (Either Error Team) Source #

The information for a single team, by team id.

teamInfoFor' (Just $ OAuth "token") 1010101

teamInfoFor' :: Maybe Auth -> Id Team -> IO (Either Error Team) Source #

The information for a single team, by team id. With authentication

teamInfoFor' (Just $ OAuth "token") 1010101

createTeamFor' :: Auth -> Name Organization -> CreateTeam -> IO (Either Error Team) Source #

Create a team under an Owner

createTeamFor' (OAuth "token") "Owner" (CreateTeam "newteamname" "some description" [] PermssionPull)

editTeam' :: Auth -> Id Team -> EditTeam -> IO (Either Error Team) Source #

Edit a team, by id.

editTeamFor'

deleteTeam' :: Auth -> Id Team -> IO (Either Error ()) Source #

Delete a team, by id.

deleteTeam' (OAuth "token") 1010101

listTeamRepos :: Id Team -> IO (Either Error (Vector Repo)) Source #

Retrieve repositories for a team.

listTeamRepos (GitHub.mkTeamId team_id)

listTeamRepos' :: Maybe Auth -> Id Team -> IO (Either Error (Vector Repo)) Source #

The repositories of a single team, by team id. With authentication

listTeamRepos' (Just $ GitHub.OAuth token) (GitHub.mkTeamId team_id)

addOrUpdateTeamRepo' :: Auth -> Id Team -> Name Organization -> Name Repo -> Permission -> IO (Either Error ()) Source #

Add a repository to a team or update the permission on the repository.

addOrUpdateTeamRepo' (OAuth "token") 1010101 "mburns" (Just PermissionPull)

teamMembershipInfoFor :: Id Team -> Name Owner -> IO (Either Error TeamMembership) Source #

Retrieve team mebership information for a user.

teamMembershipInfoFor 1010101 "mburns"

teamMembershipInfoFor' :: Maybe Auth -> Id Team -> Name Owner -> IO (Either Error TeamMembership) Source #

Retrieve team mebership information for a user. With authentication

teamMembershipInfoFor' (Just $ OAuth "token") 1010101 "mburns"

addTeamMembershipFor' :: Auth -> Id Team -> Name Owner -> Role -> IO (Either Error TeamMembership) Source #

Add (or invite) a member to a team.

addTeamMembershipFor' (OAuth "token") 1010101 "mburns" RoleMember

deleteTeamMembershipFor' :: Auth -> Id Team -> Name Owner -> IO (Either Error ()) Source #

Delete a member of a team.

deleteTeamMembershipFor' (OAuth "token") 1010101 "mburns"

listTeamsCurrent' :: Auth -> IO (Either Error (Vector Team)) Source #

List teams for current authenticated user

listTeamsCurrent' (OAuth "token")