circlehs-0.0.1: The CircleCI REST API for Haskell

Copyright(c) Denis Shevchenko, 2016
Safe HaskellNone




API calls for work with info about projects.


API call

getProjectsInfo Source


:: CircleCIResponse [ProjectInfo]

Info about projects.

Show info about all projects user is following. Based on

Usage example:

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}

import CircleCI

main :: IO ()
main = runCircleCI getProjectsInfo
                   (AccountAPIToken "e64c674195bbc0d0be3efa2whatever")
    >>= \case
        Left problem -> print problem
        Right info   -> print info

Types for calls and response

data ProjectInfo Source

Info about single project.




language :: Text

Programming language using in this project.

repositoryName :: Text
repositoryUrl :: Text

Repository URL.

branches :: [BranchBuildInfo]

Info about recent builds in branches.

defaultBranch :: Text

Name of default branch.

isOpenSource :: Bool

If True - project is open.

followed :: Bool

If True - project is followed by some user.

gitHubUserName :: Text

GitHub user name. Slack

slackChannel :: Maybe Text

Slack channel name.

slackWebhookUrl :: Maybe Text

Slack webhook URL.

slackNotifyPreferenses :: Maybe Text

Slack notify preferences.

slackSubdomain :: Maybe Text

Slack subdomain.

slackAPIToken :: Maybe Text

Slack API token. HipChat

hipchatNotifyPreferenses :: Maybe Text

HipChat notify preferences.

hipchatNotify :: Maybe Text

HipChat notify.

hipchatAPIToken :: Maybe Text

HipChat API token.

hipchatRoom :: Maybe Text

HipChat room name. IRC

ircServer :: Maybe Text

IRC server.

ircKeyword :: Maybe Text

IRC keyword.

ircChannel :: Maybe Text

IRC channel name.

ircUsername :: Maybe Text

IRC user name.

ircPassword :: Maybe Text

IRC password.

ircNotifyPreferenses :: Maybe Text

IRC notify preferences.

data BuildInfo Source

Info about single build.