-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Pagure REST client library
--   
--   A library for querying a Pagure gitforge via REST
@package pagure
@version 0.2.1


-- | Pagure REST client library
module Fedora.Pagure

-- | Project info
--   
--   <tt>pagureProjectInfo server "<a>repo</a>"</tt> <tt>pagureProjectInfo
--   server "<a>namespace</a>/<a>repo</a>"</tt>
--   
--   <a>https://pagure.io/api/0/#projects-tab</a>
pagureProjectInfo :: String -> String -> IO (Either String Object)

-- | List projects
--   
--   <a>https://pagure.io/api/0/#projects-tab</a>
pagureListProjects :: String -> Query -> IO Object

-- | List project issues
--   
--   <a>https://pagure.io/api/0/#issues-tab</a>
pagureListProjectIssues :: String -> String -> Query -> IO (Either String Object)
data IssueTitleStatus
IssueTitleStatus :: Integer -> String -> Text -> Maybe Text -> IssueTitleStatus
[pagureIssueId] :: IssueTitleStatus -> Integer
[pagureIssueTitle] :: IssueTitleStatus -> String
[pagureIssueStatus] :: IssueTitleStatus -> Text
[pagureIssueCloseStatus] :: IssueTitleStatus -> Maybe Text

-- | List project issue titles
--   
--   <a>https://pagure.io/api/0/#issues-tab</a>
pagureListProjectIssueTitlesStatus :: String -> String -> Query -> IO (Either String [IssueTitleStatus])

-- | Issue information
--   
--   <a>https://pagure.io/api/0/#issues-tab</a>
pagureProjectIssueInfo :: String -> String -> Int -> IO (Either String Object)

-- | List repo branches
--   
--   <a>https://pagure.io/api/0/#projects-tab</a>
pagureListGitBranches :: String -> String -> IO (Either String [String])

-- | List repo branches with commits
--   
--   <a>https://pagure.io/api/0/#projects-tab</a>
pagureListGitBranchesWithCommits :: String -> String -> IO (Either String Object)

-- | List users
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureListUsers :: String -> String -> IO Object

-- | list user's forks
pagureUserForks :: String -> String -> IO [Text]

-- | User information
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureUserInfo :: String -> String -> Query -> IO (Either String Object)

-- | list user's repos
pagureUserRepos :: String -> String -> IO [Text]

-- | List groups
--   
--   <a>https://pagure.io/api/0/#groups-tab</a>
pagureListGroups :: String -> Maybe String -> Query -> IO Object

-- | Group information
--   
--   <a>https://pagure.io/api/0/#groups-tab</a>
pagureGroupInfo :: String -> String -> Query -> IO (Either String Object)

-- | list group's repos
pagureGroupRepos :: String -> Bool -> String -> IO [Text]

-- | Project Git URLs
--   
--   <a>https://pagure.io/api/0/#projects-tab</a>
pagureProjectGitURLs :: String -> String -> IO (Either String Object)

-- | low-level query
queryPagure :: String -> String -> Query -> IO Object

-- | single query
queryPagureSingle :: String -> String -> Query -> IO (Either String Object)

-- | count total number of hits
queryPagureCount :: String -> String -> Query -> String -> IO (Maybe Integer)

-- | Get count (with queryPagureCount) or full results (queryPagurePaged)
queryPagureCountPaged :: String -> Bool -> String -> Query -> (String, String) -> IO [Object]
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

-- | helper to extract fullnames of repos
getRepos :: Text -> Object -> [Text]
