More API improvements
By Edouard on January 9, 2010
I just updated the API with a few improvements and a new endpoint.
Improvements
The locale
endpoint, which allows you to fetch a list of locales accepted by your project is now capable of returning xml
, json
or yaml
by simply appending the format you want at the end of the URL.
For example, if you want your list of locales in YAML, you would call /api/projects/04b254da22a6eb301b103f848e469ad494eea47d/locales.yaml and it would return something like so:
---
locales:
- name: French, France
code: fr_FR
New Endpoint: Project information
This new endpoint can be very useful to develop an advanced integration between Web Translate It and your application.
It returns 5 things:
- the project name,
- a list of locales accepted by the project,
- the project source locale,
- the language file ids and names.
The data is available in xml
, json
or yaml
.
An example of the data structure in YAML would be:
---
project:
name: Web Translate It
source_locale:
name: English, United Kingdom
code: en_GB
target_locales:
- name: French, France
code: fr_FR
type: Locale
project_files:
- name: fr.yml
id: 1175
- name: en.yml
id: 1174
I hope these improvements will make easier for everyone to integrate Web Translate It with their application and develop awesome extensions.
For detailed API specifications, check API Information on Web Translate It.