-
Notifications
You must be signed in to change notification settings - Fork 1
API Gender
Elena edited this page Apr 5, 2021
·
6 revisions
Genders for UI panels in different languages for the TaskTracker plugin. male
and female
are already added, with labels (denotation) in English and Russian.
You can add genders and change gender denotations in existing languages via API. Alternatively, you can change genders by editing your genders config file directly and then regenerating the database.
Field | Type | Description |
---|---|---|
key |
String | Gender key. Must be unique. |
{lng_key} |
String | Gender label in the language specified by the interface language key (en , ru , de , and others). For example, en stands for a gender label in English. |
Field | Type | Description |
---|---|---|
key |
String | Gender key. Must be unique. |
translation |
Array | Gender labels in different languages. See a response example below. |
Available languages:
- en - English
- ru - Russian
{
"key": "male",
"translation":
[
{ "key":"en" },
"Male",
{ "key":"ru" },
"Мужской"
]
}
Endpoint | Method | Description |
---|---|---|
/api/gender |
POST |
Create a new gender for the user survey in the database. |
Parameter | Type | Description |
---|---|---|
key |
String | Key of the gender. Must be unique in the database. |
descriptions |
Array | Denotation for the gender in different languages. |
{
"key": "male",
"descriptions":
[
{
"language": "en",
"value": "Male"
},
{
"language": "ru",
"value": "Мужской"
}
]
}
Public fields of the gender.
Endpoint | Method | Description |
---|---|---|
/api/gender/all |
GET |
Get all genders. |
Empty body.
List of genders. Each gender has the public fields of the gender model.
Endpoint | Method | Description |
---|---|---|
/api/gender/:key |
GET |
Get gender denotations in different languages by the gender key. |
Empty body.
Public fields of the gender.
Endpoint | Method | Description |
---|---|---|
/api/gender/:key |
DELETE |
Delete a gender by its key. |
Empty body.
Public fields of the gender.