Public | Automated Build

Last pushed: a year ago
Short Description
Translation API
Full Description

Translation API

Stockflare API to facilitate the use of Google Translation API to translation various data items.

GET/PUT: /instrument

Returns translated versions of various various selected fields from https://github.com/Stockflare/api-instrument. The translations will be cached for 12 hours in order to save calls to Google Translation

Parameter Type Values Default
sics Array[string] ["c84d1bda-6850-11e4-a4ff-5b8fc4d3905e"] required
language string en,fr, zh etc zh

The response will be in the following format with the attribute values translationd to locale:

{
  "sic": "913e9744-fdcb-11e3-bcf5-19f564729b9a",
  "description": "Infosys Limited is engaged in consulting, technology, outsourcing and next-generation services. The Company's solutions include application development and maintenance, independent validation services, infrastructure management, engineering services comprising product engineering and life cycle solutions and business process management; Management Consulting, enterprise solutions and package implementation, systems integration and business intelligence; Products, business platforms and solutions, and technologies, such as cloud computing, enterprise mobility, digital, big data and analytics. Its segments are Financial Services and Insurance, Manufacturing, Energy and utilities, Communication and Services, Retail, Consumer packaged goods and Logistics, Life Sciences and Healthcare, and Growth Markets.",
  "exchange_code": "145",
  "financial_summary": "BRIEF: For the three months ended 30 June 2015, Infosys Ltd ADR revenues increased 6% to $2.26B. Net income decreased 1% to $476M. Revenues reflect an increase in demand for the Company's products and services due to favorable market conditions. Net income was offset by Other Income, Net decrease of 14% to $119M (income), Selling and marketing expenses increase of 16% to $129M (expense).",
  "long_name": "Infosys Ltd",
  "short_name": "Infosys Ltd ADR"
}

POST: /text

Returns translated version of the text provided. Caches / saves the translated result in the DynamoDB table so that anyone else that asks for the same text will get the cached result. The result will be cached for 30 days to account for the continual improvements that are fed into the Google Translation system.

Parameter Type Values Default
text string "Mary had a little lamb" required
language string en,fr, zh etc zh

The response will be in the following format

{
  text: "Mary hatte ein kleines Lamm"
}

GET: /languages

Returns a list of supported language codes

The response will be in the following format:

[
  'en',
  'fr',
  'zh',
  ...
]

Caching

This api uses a DynamoDB table as a short term cache for translations.

Docker Pull Command
Owner
stockflare
Source Repository

Comments (0)