{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} -- | -- Module : Network.GitHub.API -- Copyright : (c) Finlay Thompson, 2015 -- License : BSD3 -- Maintainer : finlay.thompson@gmail.com -- Stability : experimental module Network.GitHub.API where import Servant.API import Network.GitHub.Types -- | type UserOrganisations = "user" :> "orgs" :> Get '[JSON] [Organisation] -- | type OrganisationTeams = "orgs" :> Capture "org" OrgLogin :> "teams" :> Get '[JSON] [Team] -- | type TeamMembers = "teams" :> Capture "id" TeamId :> "members" :> Get '[JSON] [Member] -- | type TeamRepositories = "teams" :> Capture "id" TeamId :> "repos" :> Get '[JSON] [Repository] -- | type GetTeam = "teams" :> Capture "id" TeamId :> Get '[JSON] Team -- | type GetUser = "user" :> Get '[JSON] User -- | type UserRepositories = "user" :> "repos" :> QueryParam "type" String :> Get '[JSON] [Repository] -- | type GetCommit = "repos" :> Capture "org" OrgLogin :> Capture "repo" RepoName :> "commits" :> Capture "sha" Sha :> Get '[JSON] Commit -- | -- GET /repos/:owner/:repo/contents/:path type GetContent = "repos" :> Capture "org" OrgLogin :> Capture "repo" RepoName :> "contents" :> Capture "path" String :> QueryParam "ref" String :> QueryParam "path" String :> Get '[JSON] Content