Safe Haskell | None |
---|---|
Language | Haskell2010 |
Tesla
is intended to provide access to all known Tesla APIs as
documented at https://tesla-api.timdorr.com/
Synopsis
- authenticate :: AuthInfo -> IO AuthResponse
- refreshAuth :: AuthInfo -> AuthResponse -> IO AuthResponse
- data AuthResponse = AuthResponse {}
- data AuthInfo = AuthInfo {
- _clientID :: String
- _clientSecret :: String
- _email :: String
- _password :: String
- _bearerToken :: String
- vehicles :: MonadIO m => AuthInfo -> m (Map Text Text)
- fromToken :: String -> AuthInfo
- authOpts :: AuthInfo -> Options
- baseURL :: String
Documentation
authenticate :: AuthInfo -> IO AuthResponse Source #
Authenticate to the Tesla service.
refreshAuth :: AuthInfo -> AuthResponse -> IO AuthResponse Source #
Refresh authentication credentials using a refresh token.
data AuthResponse Source #
An Authentication response.
Instances
Show AuthResponse Source # | |
Defined in Tesla showsPrec :: Int -> AuthResponse -> ShowS # show :: AuthResponse -> String # showList :: [AuthResponse] -> ShowS # | |
Generic AuthResponse Source # | |
Defined in Tesla type Rep AuthResponse :: Type -> Type # from :: AuthResponse -> Rep AuthResponse x # to :: Rep AuthResponse x -> AuthResponse # | |
FromJSON AuthResponse Source # | |
Defined in Tesla parseJSON :: Value -> Parser AuthResponse # parseJSONList :: Value -> Parser [AuthResponse] # | |
type Rep AuthResponse Source # | |
Defined in Tesla type Rep AuthResponse = D1 (MetaData "AuthResponse" "Tesla" "tesla-0.1.0.0-JB5wsXtyQxgGsyRjC0YcSi" False) (C1 (MetaCons "AuthResponse" PrefixI True) (S1 (MetaSel (Just "_access_token") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: (S1 (MetaSel (Just "_expires_in") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "_refresh_token") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) |
An Authentication request.