Safe Haskell | None |
---|---|
Language | Haskell98 |
The Github Repos API, as documented at http://developer.github.com/v3/repos/
- userRepos :: String -> RepoPublicity -> IO (Either Error [Repo])
- userRepos' :: Maybe GithubAuth -> String -> RepoPublicity -> IO (Either Error [Repo])
- userRepo :: String -> String -> IO (Either Error Repo)
- userRepo' :: Maybe GithubAuth -> String -> String -> IO (Either Error Repo)
- organizationRepos :: String -> IO (Either Error [Repo])
- organizationRepos' :: Maybe GithubAuth -> String -> IO (Either Error [Repo])
- organizationRepo :: String -> String -> IO (Either Error Repo)
- organizationRepo' :: Maybe GithubAuth -> String -> String -> IO (Either Error Repo)
- contributors :: String -> String -> IO (Either Error [Contributor])
- contributors' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Contributor])
- contributorsWithAnonymous :: String -> String -> IO (Either Error [Contributor])
- contributorsWithAnonymous' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Contributor])
- languagesFor :: String -> String -> IO (Either Error [Language])
- languagesFor' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Language])
- tagsFor :: String -> String -> IO (Either Error [Tag])
- tagsFor' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Tag])
- branchesFor :: String -> String -> IO (Either Error [Branch])
- branchesFor' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Branch])
- contentsFor :: String -> String -> String -> Maybe String -> IO (Either Error Content)
- contentsFor' :: Maybe GithubAuth -> String -> String -> String -> Maybe String -> IO (Either Error Content)
- module Github.Data
- data RepoPublicity
- createRepo :: GithubAuth -> NewRepo -> IO (Either Error Repo)
- createOrganizationRepo :: GithubAuth -> String -> NewRepo -> IO (Either Error Repo)
- newRepo :: String -> NewRepo
- data NewRepo = NewRepo {}
- editRepo :: GithubAuth -> String -> String -> Edit -> IO (Either Error Repo)
- def :: Default a => a
- data Edit = Edit {}
- deleteRepo :: GithubAuth -> String -> String -> IO (Either Error ())
Querying repositories
userRepos :: String -> RepoPublicity -> IO (Either Error [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 are currently not supported.
userRepos "mike-burns" All
userRepos' :: Maybe GithubAuth -> String -> RepoPublicity -> IO (Either Error [Repo]) Source
The repos for a user, by their login. With authentication, but note that private repos are currently not supported.
userRepos' (Just (GithubBasicAuth (user, password))) "mike-burns" All
userRepo :: String -> String -> IO (Either Error Repo) Source
Details on a specific repo, given the owner and repo name.
userRepo "mike-burns" "github"
userRepo' :: Maybe GithubAuth -> String -> String -> IO (Either Error Repo) Source
Details on a specific repo, given the owner and repo name. With authentication.
userRepo' (Just (GithubBasicAuth (user, password))) "mike-burns" "github"
organizationRepos :: String -> IO (Either Error [Repo]) Source
The repos for an organization, by the organization name.
organizationRepos "thoughtbot"
organizationRepos' :: Maybe GithubAuth -> String -> IO (Either Error [Repo]) Source
The repos for an organization, by the organization name. With authentication.
organizationRepos (Just (GithubBasicAuth (user, password))) "thoughtbot"
organizationRepo :: String -> String -> IO (Either Error Repo) Source
A specific organization repo, by the organization name.
organizationRepo "thoughtbot" "github"
organizationRepo' :: Maybe GithubAuth -> String -> String -> IO (Either Error Repo) Source
A specific organization repo, by the organization name. With authentication.
organizationRepo (Just (GithubBasicAuth (user, password))) "thoughtbot" "github"
contributors :: String -> String -> IO (Either Error [Contributor]) Source
The contributors to a repo, given the owner and repo name.
contributors "thoughtbot" "paperclip"
contributors' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Contributor]) Source
The contributors to a repo, given the owner and repo name. With authentication.
contributors' (Just (GithubBasicAuth (user, password))) "thoughtbot" "paperclip"
contributorsWithAnonymous :: String -> String -> IO (Either Error [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 GithubAuth -> String -> String -> IO (Either Error [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 (GithubBasicAuth (user, password))) "thoughtbot" "paperclip"
languagesFor :: String -> String -> IO (Either Error [Language]) 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 GithubAuth -> String -> String -> IO (Either Error [Language]) 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 (GithubBasicAuth (user, password))) "mike-burns" "ohlaunch"
tagsFor :: String -> String -> IO (Either Error [Tag]) Source
The git tags on a repo, given the repo owner and name.
tagsFor "thoughtbot" "paperclip"
tagsFor' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Tag]) Source
The git tags on a repo, given the repo owner and name. With authentication.
tagsFor' (Just (GithubBasicAuth (user, password))) "thoughtbot" "paperclip"
branchesFor :: String -> String -> IO (Either Error [Branch]) Source
The git branches on a repo, given the repo owner and name.
branchesFor "thoughtbot" "paperclip"
branchesFor' :: Maybe GithubAuth -> String -> String -> IO (Either Error [Branch]) Source
The git branches on a repo, given the repo owner and name. With authentication.
branchesFor' (Just (GithubBasicAuth (user, password))) "thoughtbot" "paperclip"
contentsFor :: String -> String -> String -> Maybe String -> IO (Either Error Content) Source
The contents of a file or directory in a repo, given the repo owner, name, and path to the file
contentsFor "thoughtbot" "paperclip" "README.md"
contentsFor' :: Maybe GithubAuth -> String -> String -> String -> Maybe String -> IO (Either Error Content) Source
The contents of a file or directory in a repo, given the repo owner, name, and path to the file With Authentication
contentsFor' (Just (GithubBasicAuth (user, password))) "thoughtbot" "paperclip" "README.md"
module Github.Data
data RepoPublicity Source
Filter the list of the user's repos using any of these constructors.
Create
createRepo :: GithubAuth -> NewRepo -> IO (Either Error Repo) Source
Create a new repository.
createRepo (GithubBasicAuth (user, password)) (newRepo "some_repo") {newRepoHasIssues = Just False}
createOrganizationRepo :: GithubAuth -> String -> NewRepo -> IO (Either Error Repo) Source
Create a new repository for an organization.
createOrganizationRepo (GithubBasicAuth (user, password)) "thoughtbot" (newRepo "some_repo") {newRepoHasIssues = Just False}
Edit
Edit an existing repository.
editRepo (GithubBasicAuth (user, password)) "some_user" "some_repo" def {editDescription = Just "some description"}
Edit | |
|
Delete
Delete an existing repository.
deleteRepo (GithubBasicAuth (user, password)) "thoughtbot" "some_repo"