-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Pixela client. -- -- Pixela (https://pixe.la/) client library. @package pixela @version 0.3.1.0 module Web.Pixela -- | Pixela client. -- --
--   import Web.Pixela
--   import Data.Default (def)
--   
--   main :: IO
--   main = do
--     _client <- newClient def
--     pure ()
--   
data Client -- | Create new client. newClient :: Config -> IO Client -- | Client configuration. data Config Config :: Url -> ManagerSettings -> UserName -> Token -> Config [endPoint] :: Config -> Url [httpManagerSettings] :: Config -> ManagerSettings [userName] :: Config -> UserName [token] :: Config -> Token newtype Exception JsonException :: String -> Exception -- | A type class to create a value from String. class FromParameter a -- | If you know this does not fail, you can use fromParameter'. fromParameter :: FromParameter a => String -> Maybe a -- | Create value from String. This function is unsafe, applys -- error if fails. fromParameter is safe. fromParameter' :: FromParameter a => String -> a -- | A type class to convert a value to String. class ToParameter a toParameter :: ToParameter a => a -> String type Token = String type UserName = String -- | Which to agree terms of service or not. data Agreement Agree :: Agreement Disagree :: Agreement -- | Major (adult) or minor (child). data Majority Major :: Majority Minor :: Majority type GraphId = String type GraphName = String type GraphUnit = String data GraphType GraphTypeInt :: GraphType GraphTypeFloat :: GraphType data GraphColor -- | Green Shibafu :: GraphColor -- | Red Momiji :: GraphColor -- | Blue Sora :: GraphColor -- | Yellow Ichou :: GraphColor -- | Purple Ajisai :: GraphColor -- | Black Kuro :: GraphColor type DateFormat = String data DisplayMode ShortMode :: DisplayMode DefaultMode :: DisplayMode type Url = String type Date = Day type Quantity = String data WebhookType type WebhookHash = String -- | Create a user. https://pixe.la/#api-detail-post-users createUser :: Agreement -> Majority -> Client -> IO () -- | Update user token. https://pixe.la/#api-detail-put-user updateToken :: Token -> Client -> IO () -- | Delete the user. https://pixe.la/#api-detail-delete-user deleteUser :: Client -> IO () -- | Create a graph. https://pixe.la/#api-detail-post-graphs createGraph :: GraphId -> GraphName -> GraphUnit -> GraphType -> GraphColor -> Client -> IO () -- | Get the list of infomation of graphs. -- https://pixe.la/#api-detail-get-graphs getGraphs :: Client -> IO Value -- | Get the list of infomation of graphs. -- https://pixe.la/#api-detail-get-graphs getGraphsBSL :: Client -> IO ByteString -- | Get the graph. https://pixe.la/#api-detail-get-graph getGraph :: GraphId -> Maybe DateFormat -> DisplayMode -> Client -> IO ByteString -- | Update the graph. https://pixe.la/#api-detail-put-graph updateGraph :: GraphId -> Maybe GraphName -> Maybe GraphUnit -> Maybe GraphColor -> [Url] -> Client -> IO () -- | Delete the graph. https://pixe.la/#api-detail-delete-graph deleteGraph :: GraphId -> Client -> IO () -- | Set quantity pixel. https://pixe.la/#api-detail-post-pixels setQuantity :: GraphId -> Date -> Quantity -> Client -> IO () -- | Get quantity pixel. https://pixe.la/#api-detail-get-pixel getQuantity :: GraphId -> Date -> Client -> IO Value -- | Get quantity pixel. https://pixe.la/#api-detail-get-pixel getQuantityBSL :: GraphId -> Date -> Client -> IO ByteString -- | Update quantity pixel. https://pixe.la/#api-detail-put-pixel updateQuantity :: GraphId -> Date -> Quantity -> Client -> IO () -- | Increment quantity pixel. -- https://pixe.la/#api-detail-pixel-increment incrementQuantity :: GraphId -> Client -> IO () -- | Decrement quantity pixel. -- https://pixe.la/#api-detail-pixel-decrement decrementQuantity :: GraphId -> Client -> IO () -- | Delete quantity pixel. https://pixe.la/#api-detail-delete-pixel deleteQuantity :: GraphId -> Date -> Client -> IO () -- | Create a webhook. https://pixe.la/#api-detail-post-webhooks createWebhook :: GraphId -> WebhookType -> Client -> IO Text -- | Get the webhook. https://pixe.la/#api-detail-get-webhooks getWebhooks :: Client -> IO Value -- | Get the webhook. https://pixe.la/#api-detail-get-webhooks getWebhooksBSL :: Client -> IO ByteString -- | Invoke the webhook. https://pixe.la/#api-detail-post-webhook invokeWebhook :: WebhookHash -> Client -> IO () -- | Delete the webhook. https://pixe.la/#api-detail-delete-webhook deleteWebhook :: WebhookHash -> Client -> IO () instance GHC.Classes.Eq Web.Pixela.WebhookType instance GHC.Read.Read Web.Pixela.WebhookType instance GHC.Show.Show Web.Pixela.WebhookType instance GHC.Classes.Eq Web.Pixela.DisplayMode instance GHC.Read.Read Web.Pixela.DisplayMode instance GHC.Show.Show Web.Pixela.DisplayMode instance GHC.Classes.Eq Web.Pixela.GraphColor instance GHC.Read.Read Web.Pixela.GraphColor instance GHC.Show.Show Web.Pixela.GraphColor instance GHC.Classes.Eq Web.Pixela.GraphType instance GHC.Read.Read Web.Pixela.GraphType instance GHC.Show.Show Web.Pixela.GraphType instance GHC.Classes.Eq Web.Pixela.Majority instance GHC.Read.Read Web.Pixela.Majority instance GHC.Show.Show Web.Pixela.Majority instance GHC.Classes.Eq Web.Pixela.Agreement instance GHC.Read.Read Web.Pixela.Agreement instance GHC.Show.Show Web.Pixela.Agreement instance GHC.Classes.Eq Web.Pixela.Exception instance GHC.Show.Show Web.Pixela.Exception instance Web.Pixela.FromParameter Web.Pixela.WebhookType instance Web.Pixela.ToParameter Web.Pixela.WebhookType instance Data.Default.Class.Default Web.Pixela.Config instance Web.Pixela.FromParameter Web.Pixela.DisplayMode instance Web.Pixela.ToParameter Web.Pixela.DisplayMode instance Web.Pixela.FromParameter Web.Pixela.GraphColor instance Web.Pixela.ToParameter Web.Pixela.GraphColor instance Web.Pixela.FromParameter Web.Pixela.GraphType instance Web.Pixela.ToParameter Web.Pixela.GraphType instance GHC.Exception.Type.Exception Web.Pixela.Exception