License | BSD-3-Clause |
---|---|
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
The Github Repo Contents API, as documented at https://developer.github.com/v3/repos/contents/
Synopsis
- contentsFor :: Name Owner -> Name Repo -> Text -> Maybe Text -> IO (Either Error Content)
- contentsFor' :: Maybe Auth -> Name Owner -> Name Repo -> Text -> Maybe Text -> IO (Either Error Content)
- contentsForR :: Name Owner -> Name Repo -> Text -> Maybe Text -> Request k Content
- readmeFor :: Name Owner -> Name Repo -> IO (Either Error Content)
- readmeFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Content)
- readmeForR :: Name Owner -> Name Repo -> Request k Content
- archiveFor :: Name Owner -> Name Repo -> ArchiveFormat -> Maybe Text -> IO (Either Error URI)
- archiveFor' :: Maybe Auth -> Name Owner -> Name Repo -> ArchiveFormat -> Maybe Text -> IO (Either Error URI)
- archiveForR :: Name Owner -> Name Repo -> ArchiveFormat -> Maybe Text -> Request k URI
- createFile :: Auth -> Name Owner -> Name Repo -> CreateFile -> IO (Either Error ContentResult)
- createFileR :: Name Owner -> Name Repo -> CreateFile -> Request RW ContentResult
- updateFile :: Auth -> Name Owner -> Name Repo -> UpdateFile -> IO (Either Error ContentResult)
- updateFileR :: Name Owner -> Name Repo -> UpdateFile -> Request RW ContentResult
- deleteFile :: Auth -> Name Owner -> Name Repo -> DeleteFile -> IO (Either Error ())
- deleteFileR :: Name Owner -> Name Repo -> DeleteFile -> Request RW ()
- module GitHub.Data
Querying contents
contentsFor :: Name Owner -> Name Repo -> Text -> Maybe Text -> 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 Auth -> Name Owner -> Name Repo -> Text -> Maybe Text -> 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 (BasicAuth (user, password))) "thoughtbot" "paperclip" "README.md" Nothing
readmeFor :: Name Owner -> Name Repo -> IO (Either Error Content) Source #
The contents of a README file in a repo, given the repo owner and name
readmeFor "thoughtbot" "paperclip"
readmeFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Content) Source #
The contents of a README file in a repo, given the repo owner and name With Authentication
readmeFor' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip"
archiveFor :: Name Owner -> Name Repo -> ArchiveFormat -> Maybe Text -> IO (Either Error URI) Source #
The archive of a repo, given the repo owner, name, and archive type
archiveFor "thoughtbot" "paperclip" ArchiveFormatTarball Nothing
archiveFor' :: Maybe Auth -> Name Owner -> Name Repo -> ArchiveFormat -> Maybe Text -> IO (Either Error URI) Source #
The archive of a repo, given the repo owner, name, and archive type With Authentication
archiveFor' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip" ArchiveFormatTarball Nothing
Create
:: Auth | |
-> Name Owner | owner |
-> Name Repo | repository name |
-> CreateFile | |
-> IO (Either Error ContentResult) |
Create a file.
createFileR :: Name Owner -> Name Repo -> CreateFile -> Request RW ContentResult Source #
Create a file. See https://developer.github.com/v3/repos/contents/#create-a-file
Update
:: Auth | |
-> Name Owner | owner |
-> Name Repo | repository name |
-> UpdateFile | |
-> IO (Either Error ContentResult) |
Update a file.
updateFileR :: Name Owner -> Name Repo -> UpdateFile -> Request RW ContentResult Source #
Update a file. See https://developer.github.com/v3/repos/contents/#update-a-file
Delete
Delete a file.
deleteFileR :: Name Owner -> Name Repo -> DeleteFile -> Request RW () Source #
Delete a file. See https://developer.github.com/v3/repos/contents/#delete-a-file
module GitHub.Data