Glossary methods

This describes the endpoints that deal with Glossaries on the Gengo API.

Glossaries (GET)

Summary :
Retrieves a list of glossaries that belongs to the authenticated user.
URL :
http://api.gengo.com/v2/translate/glossary
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getGlossaryList())

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "opstat": "ok",
  "response": [
    {
      "customer_user_id": 50110,
      "source_language_id": 8,
      "target_languages": [
        [
          14,
          "ja"
        ]
      ],
      "id": 115,
      "is_public": false,
      "unit_count": 2,
      "description": null,
      "source_language_code": "en-US",
      "ctime": "2012-07-19 02:57:10.526565",
      "title": "1342666627_50110_en_ja_glossary.csv",
      "status": 1
    }
  ]
}

Glossary (GET)

Summary :
Retrieves a glossary by ID.
URL :
http://api.gengo.com/v2/translate/glossary/{glossary_id}
Authentication :
Required
Parameters :
  • api_key (required) - Your API key
  • api_sig (required) - Your API signature
  • ts (required) - Current Unix epoch time as an integer

Example call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-

from gengo import Gengo


gengo = Gengo(
    public_key='your_public_key',
    private_key='your_private_key',
    sandbox=False,
    debug=False)

print(gengo.getGlossary(id=115))

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "opstat": "ok",
  "response": {
    "customer_user_id": 50110,
    "source_language_id": 8,
    "target_languages": [
      [
        14,
        "ja"
      ]
    ],
    "id": 115,
    "is_public": false,
    "unit_count": 2,
    "description": null,
    "source_language_code": "en-US",
    "ctime": "2012-07-19 02:57:10.526565",
    "title": "1342666627_50110_en_ja_glossary.csv",
    "status": 1
  }
}