Copyright | (c) 2020 Jens Petersen |
---|---|
License | GPL-2.0-only |
Maintainer | Jens Petersen <petersen@redhat.com> |
Safe Haskell | None |
Language | Haskell2010 |
Pagure REST client library
Synopsis
- pagureProjectInfo :: String -> String -> IO (Either String Value)
- pagureListProjects :: String -> Query -> IO Value
- pagureListProjectIssues :: String -> String -> Query -> IO (Either String Value)
- data IssueTitleStatus = IssueTitleStatus {}
- pagureListProjectIssueTitlesStatus :: String -> String -> Query -> IO (Either String [IssueTitleStatus])
- pagureProjectIssueInfo :: String -> String -> Int -> IO (Either String Object)
- pagureListGitBranches :: String -> String -> IO (Either String [String])
- pagureListGitBranchesWithCommits :: String -> String -> IO (Either String Object)
- pagureListUsers :: String -> String -> IO Value
- pagureUserForks :: String -> String -> IO [Text]
- pagureUserInfo :: String -> String -> Query -> IO (Either String Value)
- pagureUserRepos :: String -> String -> IO [Text]
- pagureListGroups :: String -> Maybe String -> Query -> IO Value
- pagureProjectGitURLs :: String -> String -> IO (Either String Value)
- queryPagure :: String -> String -> Query -> IO Value
- queryPagureSingle :: String -> String -> Query -> IO (Either String Value)
- queryPagurePaged :: String -> String -> Query -> (String, String) -> IO [Value]
- queryPagureCount :: String -> String -> Query -> String -> IO (Maybe Integer)
- 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
Documentation
pagureProjectInfo :: String -> String -> IO (Either String Value) Source #
pagureListProjectIssues :: String -> String -> Query -> IO (Either String Value) Source #
List project issues
data IssueTitleStatus Source #
pagureListProjectIssueTitlesStatus :: String -> String -> Query -> IO (Either String [IssueTitleStatus]) Source #
List project issue titles
pagureProjectIssueInfo :: String -> String -> Int -> IO (Either String Object) Source #
Issue information
pagureListGitBranchesWithCommits :: String -> String -> IO (Either String Object) Source #
List repo branches with commits
queryPagurePaged :: String -> String -> Query -> (String, String) -> IO [Value] 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
Query.
General form: a=b&c=d
, but if the value is Nothing, it becomes
a&c=d
.
type QueryItem = (ByteString, Maybe ByteString) #
Query item
lookupKey' :: FromJSON a => Text -> Object -> a #
Like lookupKey but raises an error if no key found