3.0.0 • Published 5 years ago
@datafire/ebay_commerce_translation v3.0.0
@datafire/ebay_commerce_translation
Client library for Translation API
Installation and Usage
npm install --save @datafire/ebay_commerce_translationlet ebay_commerce_translation = require('@datafire/ebay_commerce_translation').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});Description
This API allows 3rd party developers to translate item title, description, search query.
Actions
oauthCallback
Exchange the code passed to your redirect URI for an access_token
ebay_commerce_translation.oauthCallback({
"code": ""
}, context)Input
- input
object- code required
string
- code required
Output
- output
object- access_token
string - refresh_token
string - token_type
string - scope
string - expiration
string
- access_token
oauthRefresh
Exchange a refresh_token for an access_token
ebay_commerce_translation.oauthRefresh(null, context)Input
This action has no parameters
Output
- output
object- access_token
string - refresh_token
string - token_type
string - scope
string - expiration
string
- access_token
translate
Translates input text inot a given language.
ebay_commerce_translation.translate({
"body": {}
}, context)Input
- input
object- body required TranslateRequest
Output
- output TranslateResponse
Definitions
Error
- Error
object: This type defines the fields that can be returned in an error.- parameters
array: An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.- items ErrorParameter
- category
string: Identifies the type of erro. - domain
string: Name for the primary system where the error occurred. This is relevant for application errors. - errorId
integer: A unique number to identify the error. - inputRefIds
array: An array of request elements most closely associated to the error.- items
string
- items
- longMessage
string: A more detailed explanation of the error. - message
string: Information on how to correct the problem, in the end user's terms and language where applicable. - outputRefIds
array: An array of request elements most closely associated to the error.- items
string
- items
- subdomain
string: Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.
- parameters
ErrorParameter
- ErrorParameter
object- name
string: The object of the error. - value
string: The value of the object.
- name
TranslateRequest
- TranslateRequest
object- from
string: The language of the input text. For implementation help, refer to eBay API documentation - text
array: The input text.- items
string
- items
- to
string: The language to use for the translation of th einput text. For implementation help, refer to eBay API documentation - translationContext
string: The context of the translation. For implementation help, refer to eBay API documentation
- from
TranslateResponse
- TranslateResponse
object- translations
array: The list of translations.- items Translation
- translations
Translation
- Translation
object- from
string: The language of the input text. For implementation help, refer to eBay API documentation - originalText
string: Original text. - to
string: The language to use for the translation of th einput text. For implementation help, refer to eBay API documentation - translatedText
string: Translated text.
- from
3.0.0
5 years ago