Translations:Stat API/44/ru: Difference between revisions

From Wiki Kaminari Click
(Created page with "==== API ==== {| class="wikitable" ! Ключ !! Тип !! Описание |- | success || Boolean || Был запрос успешным или нет |- | code || Number || Статус ответа |- |msg || [String] || Сообщение об ошибке |- | colspan="3" |data |- |data.rows |['''<row>'''] |Описание строк таблицы |- |data.totalRows |Number |Общее количество строк в таблице |- |data.total |'''<row>'''...")
 
(No difference)

Latest revision as of 17:49, 10 April 2024

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Stat API)
==== API ====
{| class="wikitable"
!Key
!Type
!Description
|-
| success || Boolean || Was the request successful or it failed
|-
| code || Number || Response status code
|-
|msg || [String] || Error message
|-
| colspan="3" |data
|-
|data.rows
|['''<row>''']
|Description of table rows
|-
|data.totalRows
|Number
|Total number of items in the table
|-
|data.total
|'''<row>'''
|Sum for each column considering invisible rows
|-
|data.page
|Number
|Current page
|-
|data.perPage
|Number
|Number of items per page
|-
|data.columns
|['''<column>''']
|Description of columns
|}
{| class="wikitable mw-collapsible"
|+
Description <row>
!Key
!Type
!Description
|-
|value
|String
|Human readable value
|-
|rawValue
|String
|Raw value
|-
|diff
|<nowiki>String | null</nowiki>
|
|-
|percent
|<nowiki>Number | null</nowiki>
|Is the value a percentage or not?
|-
|compare_value
|<nowiki>String | null</nowiki>
|Comparison value if compare is on in request
|}
{| class="wikitable mw-collapsible"
|+
Description <column>
!Key
!Type
!Description
|-
|field
|String
|ID of the metric or group
|-
|type
|<nowiki>String | Number | Float</nowiki>
|
|-
|sortable
|Boolean
|Sortable or not
|-
|unit
|<nowiki>String | null</nowiki>
|Unit of measurement
For example, % for percentage columns
|}

API

Ключ Тип Описание
success Boolean Был запрос успешным или нет
code Number Статус ответа
msg [String] Сообщение об ошибке
data
data.rows [<row>] Описание строк таблицы
data.totalRows Number Общее количество строк в таблице
data.total <row> Сумма по каждой колонке с учётом невидимых строк
data.page Number Текущая страница
data.perPage Number Количество элементов на странице
data.columns [<column>] Описание столбцов таблицы
Description <row>
Ключ Тип Описание
value String Значение в человеко-читаемом виде
rawValue String Сырое значение
diff String | null
percent Number | null Является значение процентом или нет
compare_value String | null Сравниваемое значение (в случае, если запрос отправлен в режиме compare)
Описание <column>
Ключ Тип Описание
field String ID метрики или группировки
type String | Number | Float
sortable Boolean Можно сортировать или нет
unit String | null Единица измерения.

Например, % у процентных столбцов