Copyright | (c) 2020 Jens Petersen |
---|---|
License | GPL-2.0-only |
Maintainer | Jens Petersen <petersen@redhat.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Pagure REST client library
Synopsis
- pagureProjectInfo :: String -> String -> IO (Either String Object)
- pagureListProjects :: String -> Query -> IO Object
- pagureListProjectIssues :: String -> String -> Query -> IO (Either String Object)
- data IssueTitleStatus = IssueTitleStatus {
- pagureIssueId :: Integer
- pagureIssueTitle :: String
- pagureIssueStatus :: Text
- pagureIssueCloseStatus :: Maybe Text
- 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 Object
- pagureUserForks :: String -> String -> IO [Text]
- pagureUserInfo :: String -> String -> Query -> IO (Either String Object)
- pagureUserRepos :: String -> String -> IO [Text]
- pagureListGroups :: String -> Maybe String -> Query -> IO Object
- pagureGroupInfo :: String -> String -> Query -> IO (Either String Object)
- pagureProjectGitURLs :: String -> String -> IO (Either String Object)
- queryPagure :: String -> String -> Query -> IO Object
- queryPagure' :: String -> String -> Query -> IO Object
- queryPagureSingle :: String -> String -> Query -> IO (Either String Object)
- queryPagurePaged :: String -> String -> Query -> (String, String) -> IO [Object]
- 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 Object) Source #
pagureListProjects :: String -> Query -> IO Object Source #
List projects
pagureListProjectIssues :: String -> String -> Query -> IO (Either String Object) Source #
List project issues
data IssueTitleStatus Source #
IssueTitleStatus | |
|
pagureListProjectIssueTitlesStatus :: String -> String -> Query -> IO (Either String [IssueTitleStatus]) Source #
List project issue titles
pagureProjectIssueInfo :: String -> String -> Int -> IO (Either String Object) Source #
Issue information
pagureListGitBranches :: String -> String -> IO (Either String [String]) Source #
List repo branches
pagureListGitBranchesWithCommits :: String -> String -> IO (Either String Object) Source #
List repo branches with commits
pagureListUsers :: String -> String -> IO Object Source #
List users
pagureUserForks :: String -> String -> IO [Text] Source #
list user's forks
pagureUserInfo :: String -> String -> Query -> IO (Either String Object) Source #
User information
pagureUserRepos :: String -> String -> IO [Text] Source #
list user's repos
pagureListGroups :: String -> Maybe String -> Query -> IO Object Source #
List groups
pagureGroupInfo :: String -> String -> Query -> IO (Either String Object) Source #
Group information
pagureProjectGitURLs :: String -> String -> IO (Either String Object) Source #
Project Git URLs
queryPagure :: String -> String -> Query -> IO Object Source #
low-level query
queryPagure' :: String -> String -> Query -> IO Object Source #
low-level query Like queryPagure but errors if JSON has "error" field: eg for a non-existent API query path
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
Warning: this can potentially download very large amounts of data. For potentially large queries, it is a good idea to queryPagureCount first.
Errors for a non-existent API path
queryPagureCount :: String -> String -> Query -> String -> IO (Maybe Integer) Source #
count total number of hits FIXME: errors if the query fails
lookupKey' :: FromJSON a => Text -> Object -> a #