pagure-0.2.1: Pagure REST client library
Copyright(c) 2020-2024 Jens Petersen
LicenseGPL-2.0-or-later
MaintainerJens Petersen <petersen@redhat.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fedora.Pagure

Description

Pagure REST client library

Synopsis

Documentation

pagureProjectInfo Source #

Arguments

:: String

server

-> String

project

-> IO (Either String Object) 

Project info

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

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

pagureListProjectIssues Source #

Arguments

:: String

server

-> String

project repo

-> Query

parameters

-> IO (Either String Object) 

pagureProjectIssueInfo Source #

Arguments

:: String

server

-> String

repo

-> Int

issue number

-> IO (Either String Object) 

pagureUserForks Source #

Arguments

:: String

server

-> String

user

-> IO [Text] 

list user's forks

pagureUserInfo Source #

Arguments

:: String

server

-> String

user

-> Query

parameters

-> IO (Either String Object) 

pagureUserRepos Source #

Arguments

:: String

server

-> String

user

-> IO [Text] 

list user's repos

pagureListGroups Source #

Arguments

:: String

server

-> Maybe String

optional pattern

-> Query

parameters

-> IO Object 

pagureGroupInfo Source #

Arguments

:: String

server

-> String

group

-> Query

parameters

-> IO (Either String Object) 

pagureGroupRepos Source #

Arguments

:: String

server

-> Bool

count

-> String

group

-> IO [Text] 

list group's repos

queryPagure Source #

Arguments

:: String

server

-> String

api path

-> Query

parameters

-> IO Object 

low-level query

queryPagureSingle Source #

Arguments

:: String

server

-> String

api path

-> Query

parameters

-> IO (Either String Object) 

single query

queryPagureCount Source #

Arguments

:: String

server

-> String

api path

-> Query

parameters

-> String

pagination name

-> IO (Maybe Integer) 

count total number of hits

queryPagureCountPaged Source #

Arguments

:: String

server

-> Bool

count

-> String

api path

-> Query

parameters

-> (String, String)

pagination and paging names

-> IO [Object] 

Get count (with queryPagureCount) or full results (queryPagurePaged)

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

A sequence of QueryItems.

type QueryItem = (ByteString, Maybe ByteString) #

An item from the query string, split up into two parts.

The second part should be Nothing if there was no key-value separator after the query item name.

Since: http-types-0.2.0

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

getRepos Source #

Arguments

:: Text

field (eg "repos")

-> Object

results page

-> [Text] 

helper to extract fullnames of repos