pixela-0.3.1.0: Pixela client.

Safe HaskellNone
LanguageHaskell2010

Web.Pixela

Contents

Synopsis

Types

data Client Source #

Pixela client.

import Web.Pixela
import Data.Default (def)

main :: IO
main = do
  _client <- newClient def
  pure ()

newClient :: Config -> IO Client Source #

Create new client.

data Config Source #

Client configuration.

Instances
Default Config Source # 
Instance details

Defined in Web.Pixela

Methods

def :: Config #

newtype Exception Source #

Constructors

JsonException String 
Instances
Eq Exception Source # 
Instance details

Defined in Web.Pixela

Show Exception Source # 
Instance details

Defined in Web.Pixela

Exception Exception Source # 
Instance details

Defined in Web.Pixela

class FromParameter a where Source #

A type class to create a value from String.

Methods

fromParameter :: String -> Maybe a Source #

If you know this does not fail, you can use fromParameter'.

fromParameter' :: FromParameter a => String -> a Source #

Create value from String. This function is unsafe, applys error if fails. fromParameter is safe.

class ToParameter a where Source #

A type class to convert a value to String.

Methods

toParameter :: a -> String Source #

Instances
ToParameter WebhookType Source # 
Instance details

Defined in Web.Pixela

ToParameter DisplayMode Source # 
Instance details

Defined in Web.Pixela

ToParameter GraphColor Source # 
Instance details

Defined in Web.Pixela

ToParameter GraphType Source # 
Instance details

Defined in Web.Pixela

data Agreement Source #

Which to agree terms of service or not.

Constructors

Agree 
Disagree 
Instances
Eq Agreement Source # 
Instance details

Defined in Web.Pixela

Read Agreement Source # 
Instance details

Defined in Web.Pixela

Show Agreement Source # 
Instance details

Defined in Web.Pixela

data Majority Source #

Major (adult) or minor (child).

Constructors

Major 
Minor 
Instances
Eq Majority Source # 
Instance details

Defined in Web.Pixela

Read Majority Source # 
Instance details

Defined in Web.Pixela

Show Majority Source # 
Instance details

Defined in Web.Pixela

data GraphType Source #

Instances
Eq GraphType Source # 
Instance details

Defined in Web.Pixela

Read GraphType Source # 
Instance details

Defined in Web.Pixela

Show GraphType Source # 
Instance details

Defined in Web.Pixela

ToParameter GraphType Source # 
Instance details

Defined in Web.Pixela

FromParameter GraphType Source # 
Instance details

Defined in Web.Pixela

data GraphColor Source #

Constructors

Shibafu

Green

Momiji

Red

Sora

Blue

Ichou

Yellow

Ajisai

Purple

Kuro

Black

Instances
Eq GraphColor Source # 
Instance details

Defined in Web.Pixela

Read GraphColor Source # 
Instance details

Defined in Web.Pixela

Show GraphColor Source # 
Instance details

Defined in Web.Pixela

ToParameter GraphColor Source # 
Instance details

Defined in Web.Pixela

FromParameter GraphColor Source # 
Instance details

Defined in Web.Pixela

type Date = Day Source #

User functions

Graph functions

getGraphs :: Client -> IO Value Source #

Get the list of infomation of graphs. https://pixe.la/#api-detail-get-graphs

Quantity funcitons

Webhook functions