Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Translates input text, returning translated text.
See: Google Cloud Translation API Reference for language.translations.list
.
Synopsis
- type TranslationsListResource = "language" :> ("translate" :> ("v2" :> (QueryParams "q" Text :> (QueryParam "target" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "format" TranslationsListFormat :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "model" Text :> (QueryParam "source" Text :> (QueryParams "cid" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] TranslationsListResponse))))))))))))))))
- translationsList :: [Text] -> Text -> TranslationsList
- data TranslationsList
- tlXgafv :: Lens' TranslationsList (Maybe Xgafv)
- tlUploadProtocol :: Lens' TranslationsList (Maybe Text)
- tlPp :: Lens' TranslationsList Bool
- tlAccessToken :: Lens' TranslationsList (Maybe Text)
- tlFormat :: Lens' TranslationsList (Maybe TranslationsListFormat)
- tlUploadType :: Lens' TranslationsList (Maybe Text)
- tlQ :: Lens' TranslationsList [Text]
- tlBearerToken :: Lens' TranslationsList (Maybe Text)
- tlModel :: Lens' TranslationsList (Maybe Text)
- tlSource :: Lens' TranslationsList (Maybe Text)
- tlCid :: Lens' TranslationsList [Text]
- tlTarget :: Lens' TranslationsList Text
- tlCallback :: Lens' TranslationsList (Maybe Text)
REST Resource
type TranslationsListResource = "language" :> ("translate" :> ("v2" :> (QueryParams "q" Text :> (QueryParam "target" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "format" TranslationsListFormat :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "model" Text :> (QueryParam "source" Text :> (QueryParams "cid" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] TranslationsListResponse)))))))))))))))) Source #
A resource alias for language.translations.list
method which the
TranslationsList
request conforms to.
Creating a Request
:: [Text] | |
-> Text | |
-> TranslationsList |
Creates a value of TranslationsList
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data TranslationsList Source #
Translates input text, returning translated text.
See: translationsList
smart constructor.
Instances
Request Lenses
tlUploadProtocol :: Lens' TranslationsList (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
tlAccessToken :: Lens' TranslationsList (Maybe Text) Source #
OAuth access token.
tlFormat :: Lens' TranslationsList (Maybe TranslationsListFormat) Source #
The format of the source text, in either HTML (default) or plain-text. A value of "html" indicates HTML and a value of "text" indicates plain-text.
tlUploadType :: Lens' TranslationsList (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
tlQ :: Lens' TranslationsList [Text] Source #
The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs.
tlBearerToken :: Lens' TranslationsList (Maybe Text) Source #
OAuth bearer token.
tlModel :: Lens' TranslationsList (Maybe Text) Source #
The `model` type requested for this translation. Valid values are listed in public documentation.
tlSource :: Lens' TranslationsList (Maybe Text) Source #
The language of the source text, set to one of the language codes listed in Language Support. If the source language is not specified, the API will attempt to identify the source language automatically and return it within the response.
tlTarget :: Lens' TranslationsList Text Source #
The language to use for translation of the input text, set to one of the language codes listed in Language Support.
tlCallback :: Lens' TranslationsList (Maybe Text) Source #
JSONP