License | BSD-3-Clause |
---|---|
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
The Github Repos API, as documented at http://developer.github.com/v3/repos/
Synopsis
- currentUserRepos :: Auth -> RepoPublicity -> IO (Either Error (Vector Repo))
- currentUserReposR :: RepoPublicity -> FetchCount -> Request k (Vector Repo)
- userRepos :: Name Owner -> RepoPublicity -> IO (Either Error (Vector Repo))
- userRepos' :: Maybe Auth -> Name Owner -> RepoPublicity -> IO (Either Error (Vector Repo))
- userReposR :: Name Owner -> RepoPublicity -> FetchCount -> Request k (Vector Repo)
- organizationRepos :: Name Organization -> IO (Either Error (Vector Repo))
- organizationRepos' :: Maybe Auth -> Name Organization -> RepoPublicity -> IO (Either Error (Vector Repo))
- organizationReposR :: Name Organization -> RepoPublicity -> FetchCount -> Request k (Vector Repo)
- repository :: Name Owner -> Name Repo -> IO (Either Error Repo)
- repository' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Repo)
- repositoryR :: Name Owner -> Name Repo -> Request k Repo
- contributors :: Name Owner -> Name Repo -> IO (Either Error (Vector Contributor))
- contributors' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Contributor))
- contributorsR :: Name Owner -> Name Repo -> Bool -> FetchCount -> Request k (Vector Contributor)
- contributorsWithAnonymous :: Name Owner -> Name Repo -> IO (Either Error (Vector Contributor))
- contributorsWithAnonymous' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Contributor))
- languagesFor :: Name Owner -> Name Repo -> IO (Either Error Languages)
- languagesFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Languages)
- languagesForR :: Name Owner -> Name Repo -> Request k Languages
- tagsFor :: Name Owner -> Name Repo -> IO (Either Error (Vector Tag))
- tagsFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Tag))
- tagsForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Tag)
- branchesFor :: Name Owner -> Name Repo -> IO (Either Error (Vector Branch))
- branchesFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Branch))
- branchesForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Branch)
- createRepo' :: Auth -> NewRepo -> IO (Either Error Repo)
- createRepoR :: NewRepo -> Request RW Repo
- createOrganizationRepo' :: Auth -> Name Organization -> NewRepo -> IO (Either Error Repo)
- createOrganizationRepoR :: Name Organization -> NewRepo -> Request RW Repo
- forkExistingRepo' :: Auth -> Name Owner -> Name Repo -> Maybe (Name Owner) -> IO (Either Error Repo)
- forkExistingRepoR :: Name Owner -> Name Repo -> Maybe (Name Owner) -> Request RW Repo
- editRepo :: Auth -> Name Owner -> Name Repo -> EditRepo -> IO (Either Error Repo)
- editRepoR :: Name Owner -> Name Repo -> EditRepo -> Request RW Repo
- deleteRepo :: Auth -> Name Owner -> Name Repo -> IO (Either Error ())
- deleteRepoR :: Name Owner -> Name Repo -> GenRequest MtUnit RW ()
- module GitHub.Data
Querying repositories
currentUserRepos :: Auth -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #
List your repositories.
currentUserReposR :: RepoPublicity -> FetchCount -> Request k (Vector Repo) Source #
List your repositories. See https://developer.github.com/v3/repos/#list-your-repositories
userRepos :: Name Owner -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #
The repos for a user, by their login. Can be restricted to just repos they own, are a member of, or publicize. Private repos will return empty list.
userRepos "mike-burns" All
userRepos' :: Maybe Auth -> Name Owner -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #
The repos for a user, by their login. With authentication.
userRepos' (Just $ BasicAuth "github-username" "github-password") "mike-burns" All
userReposR :: Name Owner -> RepoPublicity -> FetchCount -> Request k (Vector Repo) Source #
List user repositories. See https://developer.github.com/v3/repos/#list-user-repositories
organizationRepos :: Name Organization -> IO (Either Error (Vector Repo)) Source #
The repos for an organization, by the organization name.
organizationRepos "thoughtbot"
organizationRepos' :: Maybe Auth -> Name Organization -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #
The repos for an organization, by the organization name. With authentication.
organizationRepos (Just $ BasicAuth "github-username" "github-password") "thoughtbot" All
organizationReposR :: Name Organization -> RepoPublicity -> FetchCount -> Request k (Vector Repo) Source #
List organization repositories. See https://developer.github.com/v3/repos/#list-organization-repositories
repository :: Name Owner -> Name Repo -> IO (Either Error Repo) Source #
Details on a specific repo, given the owner and repo name.
repository "mike-burns" "github"
repository' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Repo) Source #
Details on a specific repo, given the owner and repo name. With authentication.
repository' (Just $ BasicAuth "github-username" "github-password") "mike-burns" "github"
repositoryR :: Name Owner -> Name Repo -> Request k Repo Source #
Query single repository. See https://developer.github.com/v3/repos/#get
contributors :: Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #
The contributors to a repo, given the owner and repo name.
contributors "thoughtbot" "paperclip"
contributors' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #
The contributors to a repo, given the owner and repo name. With authentication.
contributors' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip"
:: Name Owner | |
-> Name Repo | |
-> Bool | Include anonymous |
-> FetchCount | |
-> Request k (Vector Contributor) |
List contributors. See https://developer.github.com/v3/repos/#list-contributors
contributorsWithAnonymous :: Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #
The contributors to a repo, including anonymous contributors (such as deleted users or git commits with unknown email addresses), given the owner and repo name.
contributorsWithAnonymous "thoughtbot" "paperclip"
contributorsWithAnonymous' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #
The contributors to a repo, including anonymous contributors (such as deleted users or git commits with unknown email addresses), given the owner and repo name. With authentication.
contributorsWithAnonymous' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip"
languagesFor :: Name Owner -> Name Repo -> IO (Either Error Languages) Source #
The programming languages used in a repo along with the number of characters written in that language. Takes the repo owner and name.
languagesFor "mike-burns" "ohlaunch"
languagesFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Languages) Source #
The programming languages used in a repo along with the number of characters written in that language. Takes the repo owner and name. With authentication.
languagesFor' (Just $ BasicAuth "github-username" "github-password") "mike-burns" "ohlaunch"
languagesForR :: Name Owner -> Name Repo -> Request k Languages Source #
List languages. See https://developer.github.com/v3/repos/#list-languages
tagsFor :: Name Owner -> Name Repo -> IO (Either Error (Vector Tag)) Source #
The git tags on a repo, given the repo owner and name.
tagsFor "thoughtbot" "paperclip"
tagsFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Tag)) Source #
The git tags on a repo, given the repo owner and name. With authentication.
tagsFor' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip"
tagsForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Tag) Source #
List tags. See https://developer.github.com/v3/repos/#list-tags
branchesFor :: Name Owner -> Name Repo -> IO (Either Error (Vector Branch)) Source #
The git branches on a repo, given the repo owner and name.
branchesFor "thoughtbot" "paperclip"
branchesFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Branch)) Source #
The git branches on a repo, given the repo owner and name. With authentication.
branchesFor' (Just $ BasicAuth "github-username" "github-password") "thoughtbot" "paperclip"
branchesForR :: Name Owner -> Name Repo -> FetchCount -> Request k (Vector Branch) Source #
List branches. See https://developer.github.com/v3/repos/#list-branches
Create
createRepo' :: Auth -> NewRepo -> IO (Either Error Repo) Source #
Create a new repository.
createRepo' (BasicAuth (user, password)) (newRepo "some_repo") {newRepoHasIssues = Just False}
createRepoR :: NewRepo -> Request RW Repo Source #
Create a new repository. See https://developer.github.com/v3/repos/#create
createOrganizationRepo' :: Auth -> Name Organization -> NewRepo -> IO (Either Error Repo) Source #
Create a new repository for an organization.
createOrganizationRepo (BasicAuth (user, password)) "thoughtbot" (newRepo "some_repo") {newRepoHasIssues = Just False}
createOrganizationRepoR :: Name Organization -> NewRepo -> Request RW Repo Source #
Create a new repository for an organization. See https://developer.github.com/v3/repos/#create
forkExistingRepo' :: Auth -> Name Owner -> Name Repo -> Maybe (Name Owner) -> IO (Either Error Repo) Source #
Fork an existing repository.
forkExistingRepoR :: Name Owner -> Name Repo -> Maybe (Name Owner) -> Request RW Repo Source #
Fork an existing repository. See https://developer.github.com/v3/repos/forks/#create-a-fork TODO: The third paramater (an optional Organisation) is not used yet.
Edit
Edit an existing repository.
editRepo (BasicAuth (user, password)) "some_user" "some_repo" def {editDescription = Just "some description"}
editRepoR :: Name Owner -> Name Repo -> EditRepo -> Request RW Repo Source #
Edit an existing repository. See https://developer.github.com/v3/repos/#edit
Delete
deleteRepo :: Auth -> Name Owner -> Name Repo -> IO (Either Error ()) Source #
Delete an existing repository.
deleteRepo (BasicAuth (user, password)) "thoughtbot" "some_repo"
deleteRepoR :: Name Owner -> Name Repo -> GenRequest MtUnit RW () Source #
Delete a repository,. See https://developer.github.com/v3/repos/#delete-a-repository
Data
module GitHub.Data