copr-1.1.1: Haskell interface to the Fedora Copr system

Portabilityportable
Stabilityexperimental
Maintainerricky@elrod.me
Safe HaskellNone

Fedora.Copr

Description

Provides a Haskell interface to the Fedora Copr build system API.

Synopsis

Documentation

data CoprConfig Source

Constructors

CoprConfig 

Fields

domain :: Hostname

The domain on which Copr is hosted.

port :: Port

The port on which Copr operates.

ssl :: Bool

Should we use SSL or Plain Text?

login :: ByteString

The API login (not the same as username).

token :: ByteString

The API token.

withConfig :: CoprConfig -> (CoprConfig -> IO a) -> IO aSource

A utility wrapper for calling API methods with a CoprConfig.

You can use this to do things like:

>>> let c = defaultConfig { login = "your_login", token = "your_token" }
>>> withConfig c $ coprs "codeblock"

addBuildSource

Arguments

:: Username

The username of the person who owns the copr project.

-> ProjectName

The project to add the build to.

-> CoprBuild

A representation of the build to add.

-> CoprConfig

The configuration to use.

-> IO CoprBuildResponse 

Add a build to a copr project.

This makes use of the /api/coprs[username]\[project]/new_build/ endpoint.

>>> withConfig c $ addBuild "codeblock" "testproject" (CoprBuild (NEL.fromList ["http://example.com/foo-1.0.0.src.rpm"]) 2048 3600)

buildStatusSource

Arguments

:: Int

The build ID number to check.

-> CoprConfig

The configuration to use.

-> IO CoprStatusResponse 

Check the status of a copr build.

This makes use of the /api/coprs/build_status/[build_id]/ endpoint.

>>> withConfig c $ buildStatus 1033

coprsSource

Arguments

:: Username

The username of the person whose projects we want to list.

-> CoprConfig

The configuration to use.

-> IO Coprs 

Retrieve a list of copr projects for an individual user.

This makes use of the /api/coprs/[username]/ endpoint.

>>> withConfig c $ coprs "codeblock"

newSource

Arguments

:: Username

The username of the person whose project should be created.

-> CoprProject

The copr project to be created.

-> CoprConfig

The configuration to use.

-> IO NewCoprResponse 

Create a new copr project.

This makes use of the /api/coprs/[username]/new/ endpoint.

>>> withConfig c $ new "codeblock" (CoprProject "testproject" [] [] (NEL.fromList ["fedora-20-x86_64"]))