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 keyapi_sig
(required) - Your API signaturets
(required) - Current Unix epoch time as an integer
Example call
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4from gengo import Gengo
5
6
7gengo = Gengo(
8 public_key='your_public_key',
9 private_key='your_private_key',
10 sandbox=False,
11 debug=False)
12
13print(gengo.getGlossaryList())
Response
1{
2 "opstat": "ok",
3 "response": [
4 {
5 "customer_user_id": 50110,
6 "source_language_id": 8,
7 "target_languages": [
8 [
9 14,
10 "ja"
11 ]
12 ],
13 "id": 115,
14 "is_public": false,
15 "unit_count": 2,
16 "description": null,
17 "source_language_code": "en-US",
18 "ctime": "2012-07-19 02:57:10.526565",
19 "title": "1342666627_50110_en_ja_glossary.csv",
20 "status": 1
21 }
22 ]
23}
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 keyapi_sig
(required) - Your API signaturets
(required) - Current Unix epoch time as an integer
Example call
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4from gengo import Gengo
5
6
7gengo = Gengo(
8 public_key='your_public_key',
9 private_key='your_private_key',
10 sandbox=False,
11 debug=False)
12
13print(gengo.getGlossary(id=115))
Response
1{
2 "opstat": "ok",
3 "response": {
4 "customer_user_id": 50110,
5 "source_language_id": 8,
6 "target_languages": [
7 [
8 14,
9 "ja"
10 ]
11 ],
12 "id": 115,
13 "is_public": false,
14 "unit_count": 2,
15 "description": null,
16 "source_language_code": "en-US",
17 "ctime": "2012-07-19 02:57:10.526565",
18 "title": "1342666627_50110_en_ja_glossary.csv",
19 "status": 1
20 }
21}