fbrnch-0.7.3: Build and create Fedora package repos and branches
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 Value) Source #

Project info

`pagureProjectInfo server "repo"` `pagureProjectInfo server "namespace/repo"`

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

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

list user's forks

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

list user's repos

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

low-level query

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

makeKey :: String -> String -> Query #

Make a singleton key-value Query

makeItem :: String -> String -> QueryItem #

Make a key-value QueryItem

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

Maybe create a query key

type Query = [QueryItem] #

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 -> Maybe a #

Look up key in object

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

Like lookupKey but raises an error if no key found