API Tugasan Terjemahan
Semak Semula Terjemahan
Hantar semakan untuk teks yang diterjemahkan dalam tugasan, dengan pilihan untuk menjana semula terjemahan.
- Alamat lengkap
- https://otranslator.com/api/v1/translation/updateTexts
- Pengesahan
- Perlu memasukkan API Key dalam pengepala permintaan Authorization
- Content-Type
- application/json
- Format salah
- { "error": "Invalid API key." }
Perkara Perhatian
revisedTexts akan ditulis ke dalam cache terjemahan tugasan, digunakan untuk menyimpan terjemahan yang telah diperbaiki secara manual.
Apabila startTranslation bernilai true, ia akan mencetuskan semula pemprosesan tugas selepas menyimpan revisi.
Contoh
1curl -X POST 'https://otranslator.com/api/v1/translation/updateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "taskId": "[string]",
6 "revisedTexts": {
7 "key": "value"
8 }
9}'Parameter Permintaan
| Parameter | Jenis | Lalai | Keterangan | Contoh |
|---|---|---|---|---|
| *taskId | String | - | ID tugas penterjemahan | - |
| *revisedTexts | JSON | - | Terjemahan yang telah disemak semula | - |
| startTranslation | Boolean | false | Sama ada menjana semula terjemahan | - |
Respons
| Parameter | Jenis | Lalai | Keterangan | Contoh |
|---|---|---|---|---|
| success | Boolean | - | Adakah pengemaskinian berjaya | - |
Ralat Biasa
401 Missing API key.
The Authorization request header is required.
401 Invalid API key.
The API key does not exist, has been deleted, or is no longer valid.
400 Missing required parameter: taskId.
Provide the taskId returned by the create translation task API.
404 Task not found.
The task does not exist, has been deleted, does not belong to the current API account, or was not created through the API.
409 Task is processing. Try again after it finishes.
revisedTexts cannot be updated while the task is processing.