-- 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.2


-- | 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 project pull-requests
--   
--   <a>https://pagure.io/api/0/#pull_requests-tab</a>
pagureListProjectPRs :: String -> String -> Query -> IO (Either String Object)

-- | Pull request information
--   
--   <a>https://pagure.io/api/0/#pull_requests-tab</a>
pagureProjectPRInfo :: 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 repos
pagureUserRepos :: String -> String -> IO [Text]

-- | 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)

-- | User Activity stats
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureUserActivityStats :: String -> Bool -> String -> IO (Either String Object)

-- | User Activity on date
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureUserActivityDate :: String -> Bool -> String -> String -> IO (Either String Object)

-- | User Activity on date
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureUserIssues :: String -> Bool -> String -> IO [Object]

-- | User's filed pull requests
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureUserRequestsFiled :: String -> Bool -> String -> String -> IO [Object]

-- | User's actionable pull requests
--   
--   <a>https://pagure.io/api/0/#users-tab</a>
pagureUserRequestsActionable :: String -> Bool -> String -> String -> IO [Object]

-- | 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)

-- | Project contributors
--   
--   <a>https://pagure.io/api/0/#projects-tab</a>
pagureProjectContributors :: 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 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.
queryPagurePaged :: String -> String -> Query -> (String, String) -> IO [Object]

-- | 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]
