SDK for integrating with the Smartling API. The Smartling API allows developers to upload language specific resource files and download the translations of those files for easy integration within their application. http://docs.smartling.com
Currently the sdk integrates with Jobs API v2. Could you update to v3?
DoD:
Migrate\implement following endpoints:
Create Job
Update Job
List Jobs
Get Job
Authorize A Job
Add Locale To Job
Add File To Job
Check Asynchronous Processing Status For Job
Some endpoints may handle request async. As result you can receive status code 200 or 202. It's not easy to write multithreaded apps in PHP so i would like to make SDK simple for usage and do all operations synchronously for end-developer. Let me explain by pseudo code
public function addFileToJobSync($jobId, AddFileToJobParameters $parameters)
{
$result = sendRequest('/jobs-api/v3/projects/{projectId}/jobs/{translationJobUid}/file/add', $parameters);
if ($result == 202) {
$start_time = time();
do {
if ((time() - $start_time) > $tomeout) then
throw new SmartlingException();
sleep(5);
$result = sendRequest('/jobs-api/v3/projects/{projectId}/jobs/{translationJobUid}/processes/{processUid}');
}
while $result;
}
}
Of course we block execution of entire application but in general you cannot do anything with job until all async operations are completed.
Update implementation of following methods and add Sync suffix to method names
Currently the sdk integrates with Jobs API v2. Could you update to v3?
DoD:
Of course we block execution of entire application but in general you cannot do anything with job until all async operations are completed. Update implementation of following methods and add
Sync
suffix to method names