@datafire/ebay_commerce_translation

3.0.0 • Public • Published

@datafire/ebay_commerce_translation

Client library for Translation API

Installation and Usage

npm install --save @datafire/ebay_commerce_translation
let 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

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

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

translate

Translates input text inot a given language.

ebay_commerce_translation.translate({
  "body": {}
}, context)

Input

Output

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.
    • 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
    • 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
    • subdomain string: Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.

ErrorParameter

  • ErrorParameter object
    • name string: The object of the error.
    • value string: The value of the object.

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
    • 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

TranslateResponse

  • TranslateResponse object
    • translations array: The list of 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.

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/ebay_commerce_translation

Weekly Downloads

3

Version

3.0.0

License

MIT

Unpacked Size

12.9 kB

Total Files

4

Last publish

Collaborators

  • datafire