-
Notifications
You must be signed in to change notification settings - Fork 1
API Country
Nastya Birillo edited this page Dec 7, 2020
·
5 revisions
Countries for UI panels in different languages for the TaskTracker plugin.
Field | Type | Description |
---|---|---|
key | String | the country key. It must be unique |
en | String | country in English |
... | String | country in the different languages |
The public fields of settings:
Field | Type | Description |
---|---|---|
key | String | the country key. It must be unique |
translation | List of objects | country in different languages. Seen an example of the response bellow |
Available languages:
- en - English
- ru - Russian
{
"key": "russia",
"translation":
[
{ "key":"en" },
"Russia",
{ "key":"ru" },
"Россия"
]
}
URL | Type | Description |
---|---|---|
/api/country |
POST |
create a new country in the database |
Parameter | Type | Description |
---|---|---|
key | String | key of the country. It must be unique in the database |
descriptions | List of objects | description of the country in the different languages |
{
"key": "russia",
"descriptions":
[
{
"language": "en",
"value": "Russia"
},
{
"language": "ru",
"value": "Россия"
}
]
}
The public fields of the country.
URL | Type | Description |
---|---|---|
/api/country/all |
GET |
get all countries |
Empty body.
List of the countries. Each country has the public fields of the country model.
URL | Type | Description |
---|---|---|
/api/country/:key |
GET |
get country by key |
Empty body.
The public fields of the country.
URL | Type | Description |
---|---|---|
/api/country/:key |
DELETE |
delete country by key |
Empty body.
The public fields of the country.