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

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

GitHub.Endpoints.Repos.Contents

Contents

Description

The Github Repo Contents API, as documented at https://developer.github.com/v3/repos/contents/

Synopsis

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 "github-username" "github-password") "thoughtbot" "paperclip" "README.md" Nothing

contentsForR Source #

Arguments

:: Name Owner 
-> Name Repo 
-> Text

file or directory

-> Maybe Text

Git commit

-> Request k Content 

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 "github-username" "github-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 "github-username" "github-password") "thoughtbot" "paperclip" ArchiveFormatTarball Nothing

archiveForR Source #

Arguments

:: Name Owner 
-> Name Repo 
-> ArchiveFormat

The type of archive to retrieve

-> Maybe Text

Git commit

-> GenRequest MtRedirect rw URI 

Create

createFile Source #

Arguments

:: Auth 
-> Name Owner

owner

-> Name Repo

repository name

-> CreateFile 
-> IO (Either Error ContentResult) 

Create a file.

Update

updateFile Source #

Arguments

:: Auth 
-> Name Owner

owner

-> Name Repo

repository name

-> UpdateFile 
-> IO (Either Error ContentResult) 

Update a file.

Delete

deleteFile Source #

Arguments

:: Auth 
-> Name Owner

owner

-> Name Repo

repository name

-> DeleteFile 
-> IO (Either Error ()) 

Delete a file.