microsoft-translator-0.1.1: Bindings to the Microsoft Translator API

Safe HaskellNone
LanguageHaskell2010

Microsoft.Translator.API

Description

Servant types and client for the API

Synopsis

Documentation

basicTranslate :: Manager -> AuthToken -> Maybe Language -> Language -> Text -> IO (Either TranslatorException Text) Source #

Most basic possible text translation function. For typical use-cases it will be much more convenient to use functions from the Microsoft.Translator module, namely translateIO. See the README example.

basicTranslateArray :: Manager -> AuthToken -> Language -> Language -> [Text] -> IO (Either TranslatorException ArrayResponse) Source #

Most basic possible text list translation function. For typical use-cases it will be much more convenient to use functions from the Microsoft.Translator module, namely translateArrayIO. See the README example.

data ArrayRequest Source #

Constructors

ArrayRequest 

Fields

newtype ArrayResponse Source #

Constructors

ArrayResponse 

Instances

Show ArrayResponse Source # 
Generic ArrayResponse Source # 

Associated Types

type Rep ArrayResponse :: * -> * #

type Rep ArrayResponse Source # 
type Rep ArrayResponse = D1 * (MetaData "ArrayResponse" "Microsoft.Translator.API" "microsoft-translator-0.1.1-SJQ3sfTzucJoM4Lfl3DNf" True) (C1 * (MetaCons "ArrayResponse" PrefixI True) (S1 * (MetaSel (Just Symbol "getArrayResponse") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [TransItem])))

data TransItem Source #

Constructors

TransItem 

Instances

Show TransItem Source # 
Generic TransItem Source # 

Associated Types

type Rep TransItem :: * -> * #

type Rep TransItem Source # 
type Rep TransItem = D1 * (MetaData "TransItem" "Microsoft.Translator.API" "microsoft-translator-0.1.1-SJQ3sfTzucJoM4Lfl3DNf" False) (C1 * (MetaCons "TransItem" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "transText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "originalBreaks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Int])) (S1 * (MetaSel (Just Symbol "translatedBreaks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Int])))))