You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
publicfunctionaddFileToJobSync($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
thrownewSmartlingException();
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
Add Locale To Job
Add File To Job
The text was updated successfully, but these errors were encountered:
Currently the sdk integrates with Jobs API v2. Could you update to v3?
DoD:
Update implementation of following methods and add
Sync
suffix to method namesThe text was updated successfully, but these errors were encountered: