pagure-0.1.0: Pagure REST client library
Copyright(c) 2020 Jens Petersen
LicenseGPL-2.0-only
MaintainerJens Petersen <petersen@redhat.com>
Safe HaskellNone
LanguageHaskell2010

Fedora.Pagure

Description

Pagure REST client library

Synopsis

Documentation

pagureProjectInfo :: String -> String -> IO (Either String Object) Source #

Project info

@ pagureProjectInfo server "repo" pagureProjectInfo server "namespace/repo" @

https://pagure.io/api/0/#projects-tab

pagureListProjectIssues :: String -> String -> Query -> IO (Either String Object) Source #

data IssueTitleStatus Source #

Constructors

IssueTitleStatus 

Fields

pagureListProjectIssueTitlesStatus :: String -> String -> Query -> IO (Either String [IssueTitleStatus]) Source #

List project issue titles

https://pagure.io/api/0/#issues-tab

pagureProjectIssueInfo :: String -> String -> Int -> IO (Either String Object) Source #

pagureListGitBranches :: String -> String -> IO (Either String [String]) Source #

pagureListGitBranchesWithCommits :: String -> String -> IO (Either String Object) Source #

List repo branches with commits

https://pagure.io/api/0/#projects-tab

pagureListUsers :: String -> String -> IO Object Source #

pagureUserForks :: String -> String -> IO [Text] Source #

list user's forks

pagureUserInfo :: String -> String -> Query -> IO (Either String Object) Source #

pagureUserRepos :: String -> String -> IO [Text] Source #

list user's repos

pagureListGroups :: String -> Maybe String -> Query -> IO Object Source #

pagureProjectGitURLs :: String -> String -> IO (Either String Object) Source #

queryPagure :: String -> String -> Query -> IO Object Source #

low-level query

queryPagureSingle :: String -> String -> Query -> IO (Either String Object) Source #

single query

queryPagurePaged :: String -> String -> Query -> (String, String) -> IO [Object] Source #

get all pages of results

Note this can potentially download very large amount of data. For potentially large queries, it is a good idea to queryPagureCount first.

queryPagureCount :: String -> String -> Query -> String -> IO (Maybe Integer) Source #

count total number of hits

makeKey :: String -> String -> Query #

makeItem :: String -> String -> QueryItem #

maybeKey :: String -> Maybe String -> Query #

type Query = [QueryItem] #

type QueryItem = (ByteString, Maybe ByteString) #

lookupKey :: FromJSON a => Text -> Object -> Maybe a #

lookupKey' :: FromJSON a => Text -> Object -> a #