This describes the endpoints that deal with singular Job tasks and information on Gengo API.
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)
gengo.getTranslationJob(id=42)
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | {
"opstat": "ok",
"response": {
"job": {
"job_id": 384985,
"credits": 0.05,
"auto_approve": 0,
"eta": 25056,
"file_download_ready": false,
"order_id": 54632,
"lc_tgt": "ja",
"unit_count": 1,
"lc_src": "en",
"slug": "APIJobtest",
"callback_url": "http://gengo.callback/",
"currency": "USD",
"tier": "standard",
"body_src": "This is text.",
"body_tgt": "これはテキストです。",
"ctime": 1313475693,
"status": "available"
}
}
}
|
Other parameters
Other parameters
Other parameters
“archive“ - Archive approved job.
Example call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/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)
gengo.updateTranslationJob(
id=42,
action={
'action': 'reject',
'reason': 'quality',
'comment': 'My grandmother does better.',
}
)
|
Response
1 2 3 4 5 6 | {
"opstat": "ok",
"response": {
}
}
|
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)
gengo.deleteTranslationJob(id=42)
|
Response
1 2 3 4 5 6 | {
"opstat": "ok",
"response": {
}
}
|
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.getTranslationJobRevisions(id=42))
|
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": {
"job_id": 42,
"revisions": [
{
"rev_id": 1234,
"ctime": "..."
},
{
"rev_id": 1235,
"ctime": "..."
},
{
"rev_id": 1236,
"ctime": "..."
},
"..."
]
}
}
|
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.getTranslationJobRevision(id=42, revision_id=1))
|
Response
1 2 3 4 5 6 7 8 9 | {
"opstat": "ok",
"response": {
"revision": {
"body_tgt": "...",
"ctime": "..."
}
}
}
|
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.getTranslationJobFeedback(id=42))
|
Response
1 2 3 4 5 6 7 8 9 | {
"opstat": "ok",
"response": {
"feedback": {
"for_translator": "...",
"rating": 8
}
}
}
|
Note : Possible values for “author” are “customer” or “translator”.
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.getTranslationJobComments(id=42))
|
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {
"opstat": "ok",
"response": {
"thread": [
{
"body": "....",
"author": "translator",
"ctime": 1266322028
},
{
"body": "....",
"author": "customer",
"ctime": 1266324432
}
]
}
}
|
Example call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/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)
gengo.postTranslationJobComment(
id=42,
comment={
'body': 'I love lamp!'
}
)
|
Response
1 2 3 4 5 6 | {
"opstat": "ok",
"response": {
}
}
|