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.
Nome | Valor | Descrição |
---|---|---|
login obrigatório | string | O teu nome de login da Conta do Crowdin. |
json opcional | string | Pode não conter valor. Define que a resposta deve estar no formato JSON. |
jsonp opcional | string | Nome da função de retorno de chamada. Define que a resposta deve estar no formato JSONP. |
Variáveis | ||
account-key | string | Account API key (Account Settings -> API tab). |
<?xml version="1.0" encoding="UTF-8"?>
<success>
<project>
<name>O Meu Projeto</name>
<identifier>meu-projeto</identifier>
<key>d8e8fca2dc0f896fd7cb4cb0031ba249</key>
</project>
</success>
<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>12</code>
<message>Account key is invalid</message>
</error>
curl -F "login={crowdin-login-name}" https://api.crowdin.com/api/account/get-projects?account-key={account-key}
<?php
$request_url = 'https://api.crowdin.com/api/account/get-projects?account-key={account-key}';
$post_params['login'] = '{crowdin-login-name}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);
$result = curl_exec($ch);
curl_close($ch);
echo $result;