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.
Ім'я | Значення | Опис |
---|---|---|
xml необов'язково | рядок | Може не містити значення. Визначає те, що відповідь повинна бути в форматі XML. |
json необов'язковий | рядок | Може не містити значення. Визначає, що відповідь має бути в форматі JSON. |
jsonp необов'язковий | рядок | Назва функції зворотного виклику. Визначає, що відповідь має бути в форматі JSONP. |
Variables | ||
project-identifier | рядок | Ідентифікатор проекту. |
login | рядок | Ваше ім'я користувача в Crowdin. |
account-key | рядок | API ключ вашого облікового запису. |
<?xml version="1.0" encoding="UTF-8"?>
<info>
<languages> <!-- all project languages -->
<item>
<name>French</name>
<code>fr</code>
</item>
<item>
<name>Spanish</name>
<code>es-ES</code>
</item>
</languages>
<files> <!-- project files details -->
<item>
<node_type>каталог</node_type>
<id>1</id>
<name>test</name>
<files>
<item>
<node_type>файл</node_type>
<id>2</id>
<name>market-info.txt</name>
<created>2017-05-19T13:08:13+0000</created>
<last_updated>2017-05-20T18:02:13+0000</last_updated>
<last_accessed>2017-05-21T09:10:48+0000</last_accessed>
<last_revision>1</last_revision>
</item>
<item>
<node_type>файл</node_type>
<id>3</id>
<name>strings.xml</name>
<created>2017-05-19T13:38:15+0000</created>
<last_updated>2017-05-20T18:42:11+0000</last_updated>
<last_accessed>0000-00-00 00:00:00</last_accessed>
<last_revision>1</last_revision>
</item>
</files>
</item>
<item>
<node_type>файл</node_type>
<id>4</id>
<name>strings.xml</name>
<created>2017-05-19T13:40:09+0000</created>
<last_updated>2017-05-21T06:31:48+0000</last_updated>
<last_accessed>2017-05-21T07:21:01+0000</last_accessed>
<last_revision>1</last_revision>
</item>
</files>
<details> <!-- project details -->
<source_language>
<name>English</name>
<code>en</code>
</source_language>
<name>test-project</name>
<identifier>test-project</identifier>
<created>2017-05-19T13:40:52+0000</created>
<description>project description</description>
<join_policy>відкрити</join_policy>
<last_build>2017-05-20T20:01:18+0000</last_build>
<last_activity>2017-05-21T09:10:48+0000</last_activity>
<total_strings_count>438</total_strings_count>
<total_words_count>4238</total_words_count>
<duplicate_strings_count>228</duplicate_strings_count>
<duplicate_words_count>2249</duplicate_words_count>
<participants_count>4</participants_count>
<logo_url>https://dvsyjmyregmxp.cloudfront.net/images/project-logo/14d5d32996cfcc6473ebe7fe2c9f3152105.png</logo_url>
<invite_url>
<item>
<language>Українська</language>
<translator>
https://crowdin.com/project/test-project/invite?d=d5l6k4h685v6p483v6q4r44303
</translator>
<proofreader>
https://crowdin.com/project/test-project/invite?d=95l625i6r4v6p483v6q4r44303
</proofreader>
</item>
</invite_url>
</details>
</info>
<?xml version="1.0" encoding="UTF-8"?>
<invite_url>
<translator>
https://crowdin.com/project/test-project/invite
</translator>
<proofreader>
https://crowdin.com/project/test-project/invite?d=95l625i6r4v6p483v6q4r44303
</proofreader>
</invite_url>
<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>3</code>
<message>Ключ API недійсний</message>
</error>
curl https://api.crowdin.com/api/project/{project-identifier}/info?login={username}&account-key={account-key}&jsonp=mycallback
<?php
$request_url = 'https://api.crowdin.com/api/project/{project-identifier}/info?login={username}&account-key={account-key}&xml';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
$result = curl_exec($ch);
curl_close($ch);
echo $result;