freme-project / e-services

Apache License 2.0
1 stars 1 forks source link

e-Terminology: request possible source-lang and target-lang pairs #18

Open pheyvaer opened 8 years ago

pheyvaer commented 8 years ago

This allows to automatically provide users with the correct options, instead of hard-coding it.

andish commented 7 years ago

Tilde endpoint now returns list of available languages and domains in json format.

Languages

Curl:

curl -X GET -H "Authorization: Basic RlJFTUU6dXxGcjNtM19zJGN1ciQ="  "https://services.tilde.com/languages/terminology"

Optional query parameter (in order to retrieve languages from private collections):

Example of response:

{
  "languages": [
    {
      "id": "bg",
      "name": "Bulgarian"
    },
    {
      "id": "hr",
      "name": "Croatian"
    },
    {
      "id": "cs",
      "name": "Czech"
    },
    {
      "id": "da",
      "name": "Danish"
    } ]
}

Domains

Curl:

curl -X GET -H "Authorization: Basic RlJFTUU6dXxGcjNtM19zJGN1ciQ="  "https://services.tilde.com/domains/terminology"

Optional query parameter (in order to retrieve also domains for private collections):

Example of response:

{
  "domains": [
    {
      "id": "TaaS-0100",
      "parent_id": null,
      "name": "Politics and Administration"
    },
    {
      "id": "TaaS-0101",
      "parent_id": "TaaS-0100",
      "name": "Administration"
    },
    {
      "id": "TaaS-0102",
      "parent_id": "TaaS-0100",
      "name": "Politics"
    },
    {
      "id": "TaaS-0106",
      "parent_id": "TaaS-0100",
      "name": "International relations and defence"
    }]}

TO DO: include in FREME server

jnehring commented 7 years ago

We can include this in the FREME endpoints. @pheyvaer is this still a requirement?

pheyvaer commented 7 years ago

This would make the CKEditor plugin more dynamic, instead of hardcoding all the language pairs.

jnehring commented 7 years ago

Ok. @bgrusdt please add a new API endpoint for this.

pheyvaer commented 7 years ago

Aah sorry I thought this was about e-Translation. We don't use e-Terminology, so you can skip it for this service.

jnehring commented 7 years ago

Ok lets not implement this now but I will leave the issue open to document the new Tilde endpoint.