tesla-0.1.0.0: Tesla API client.

Safe HaskellNone
LanguageHaskell2010

Tesla.Command

Contents

Description

Executing commands within the Car Monad.

Synopsis

Documentation

runCmd :: (MonadIO m, Postable p) => String -> p -> Car m CommandResponse Source #

Run a command with a payload.

runCmd' :: MonadIO m => String -> Car m CommandResponse Source #

Run command without a payload

type CommandResponse = Either Text () Source #

A CommandResponse wraps an Either such that Left represents a failure message and Right suggests the command was successful.

type Car = ReaderT CarEnv Source #

Car Monad for accessing car-specific things.

TH support for generating commands.

mkCommand :: String -> String -> Q [Dec] Source #

Build a simple named command car that posts to the given named endpoint.

mkCommands :: [String] -> Q [Dec] Source #

Build a bunch of commands from a list of named endpoints, defining functions by removing the common prefix.

Orphan instances

FormValue Bool Source # 
Instance details