microsoft-translator-0.1.2: 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 # 
Instance details

Defined in Microsoft.Translator.API

Generic ArrayResponse Source # 
Instance details

Defined in Microsoft.Translator.API

Associated Types

type Rep ArrayResponse :: Type -> Type #

type Rep ArrayResponse Source # 
Instance details

Defined in Microsoft.Translator.API

type Rep ArrayResponse = D1 (MetaData "ArrayResponse" "Microsoft.Translator.API" "microsoft-translator-0.1.2-2WixOZLIJMQ2W9Ir6On7A3" True) (C1 (MetaCons "ArrayResponse" PrefixI True) (S1 (MetaSel (Just "getArrayResponse") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TransItem])))

data TransItem Source #

Constructors

TransItem 
Instances
Show TransItem Source # 
Instance details

Defined in Microsoft.Translator.API

Generic TransItem Source # 
Instance details

Defined in Microsoft.Translator.API

Associated Types

type Rep TransItem :: Type -> Type #

type Rep TransItem Source # 
Instance details

Defined in Microsoft.Translator.API

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