Please consider that API 2.0 is now the preferred version to be used. The old API will remain fully functional until the end of 2021.
Hent status for oversættelseseksport.
Navn | Parameter | Beskrivelse |
---|---|---|
branch valgfrit | string | Navnet på relateret versiongren (Versionshåndtering). |
json valgfri | string | Må ikke indeholde numerisk værdi. Definerer, at svaret skal være i JSON-formatet. |
jsonp valgfri | string | Returkaldsfunktionsnavn. Definerer, at svaret skal være i JSONP-formatet. |
Variabler | ||
project-identifier | string | Projektidentifikator. |
login | string | Dit brugernavn i Crowdin. |
account-key | string | Din konto API-nøgle. |
Den responsstatus ved gennemførsel kan være enten none
, in progress
eller finished
.
Hvis eksporten er fuldført, returnerer metoden flg. XML-struktur:
<?xml version="1.0" encoding="UTF-8"?>
<success>
<status>finished</status>
<progress>100</progress>
<last_build>2018-10-22T13:49:00+0000</last_build>
</success>
<?xml version=".0" encoding="ISO-8-1"?>
<success>
<status>in-progress</status>
<progress>29</progress>
<last_build>2018-10-18T16:08:00+0000</last_build>
<current_file>example.xml</current_file>
<current_language>Ukrainsk</current_language>
</success>
<?xml version=".0" encoding="ISO-8-1"?>
<success>
<status>none</status>
<progress>0</progress>
<last_build>never</last_build>
</success>
<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>3</code>
<message>API-nøgle er ugyldig</message>
</error>
curl \
https://api.crowdin.com/api/project/{project-identifier}/export-status?login={username}&account-key={account-key}
<?php
$request_url = 'https://api.crowdin.com/api/project/{project-identifier}/export-status?login={username}&account-key={account-key}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
echo $result;