{ "namespace": "wp/v2", "methods": [ "GET", "POST", "PUT", "PATCH", "DELETE" ], "endpoints": [ { "methods": [ "GET" ], "args": { "id": { "required": false, "description": "Уникальный идентификатор для объекта.", "type": "integer" }, "context": { "required": false, "default": "view", "enum": [ "view", "embed", "edit" ], "description": "Рамки в которых сделан запрос, определяют поля в ответе.", "type": "string" }, "password": { "required": false, "description": "Пароль для родительской записи комментария (если запись защищена паролем).", "type": "string" } } }, { "methods": [ "POST", "PUT", "PATCH" ], "args": { "id": { "required": false, "description": "Уникальный идентификатор для объекта.", "type": "integer" }, "author": { "required": false, "description": "ID объекта пользователя, если автор - пользователь.", "type": "integer" }, "author_email": { "required": false, "description": "Адрес e-mail автора объекта.", "type": "string" }, "author_ip": { "required": false, "description": "IP адрес автора объекта.", "type": "string" }, "author_name": { "required": false, "description": "Отображаемое имя для автора объекта.", "type": "string" }, "author_url": { "required": false, "description": "URL для автора объекта.", "type": "string" }, "author_user_agent": { "required": false, "description": "Клиентское приложение для автора объекта.", "type": "string" }, "content": { "required": false, "description": "Содержимое объекта.", "type": "object" }, "date": { "required": false, "description": "Дата публикации объекта, по временной зоне сайта.", "type": "string" }, "date_gmt": { "required": false, "description": "Время публикации объекта, по GMT.", "type": "string" }, "parent": { "required": false, "description": "ID родителя объекта.", "type": "integer" }, "post": { "required": false, "description": "ID ассоциированного объекта записи.", "type": "integer" }, "status": { "required": false, "description": "Состояние объекта.", "type": "string" }, "meta": { "required": false, "description": "Мета поля.", "type": "object" } } }, { "methods": [ "DELETE" ], "args": { "id": { "required": false, "description": "Уникальный идентификатор для объекта.", "type": "integer" }, "force": { "required": false, "default": false, "description": "Игнорировать ли перемещение в корзину и принудительно удалять.", "type": "boolean" }, "password": { "required": false, "description": "Пароль для родительской записи комментария (если запись защищена паролем).", "type": "string" } } } ], "schema": { "$schema": "http://json-schema.org/draft-04/schema#", "title": "comment", "type": "object", "properties": { "id": { "description": "Уникальный идентификатор для объекта.", "type": "integer", "context": [ "view", "edit", "embed" ], "readonly": true }, "author": { "description": "ID объекта пользователя, если автор - пользователь.", "type": "integer", "context": [ "view", "edit", "embed" ] }, "author_email": { "description": "Адрес e-mail автора объекта.", "type": "string", "format": "email", "context": [ "edit" ] }, "author_ip": { "description": "IP адрес автора объекта.", "type": "string", "format": "ip", "context": [ "edit" ] }, "author_name": { "description": "Отображаемое имя для автора объекта.", "type": "string", "context": [ "view", "edit", "embed" ] }, "author_url": { "description": "URL для автора объекта.", "type": "string", "format": "uri", "context": [ "view", "edit", "embed" ] }, "author_user_agent": { "description": "Клиентское приложение для автора объекта.", "type": "string", "context": [ "edit" ] }, "content": { "description": "Содержимое объекта.", "type": "object", "context": [ "view", "edit", "embed" ], "properties": { "raw": { "description": "Содержимое объекта как оно существует в базе данных.", "type": "string", "context": [ "edit" ] }, "rendered": { "description": "HTML содержимое объекта преобразованное для показа.", "type": "string", "context": [ "view", "edit", "embed" ], "readonly": true } } }, "date": { "description": "Дата публикации объекта, по временной зоне сайта.", "type": "string", "format": "date-time", "context": [ "view", "edit", "embed" ] }, "date_gmt": { "description": "Время публикации объекта, по GMT.", "type": "string", "format": "date-time", "context": [ "view", "edit" ] }, "link": { "description": "URL объекта.", "type": "string", "format": "uri", "context": [ "view", "edit", "embed" ], "readonly": true }, "parent": { "description": "ID родителя объекта.", "type": "integer", "context": [ "view", "edit", "embed" ], "default": 0 }, "post": { "description": "ID ассоциированного объекта записи.", "type": "integer", "context": [ "view", "edit" ], "default": 0 }, "status": { "description": "Состояние объекта.", "type": "string", "context": [ "view", "edit" ] }, "type": { "description": "Тип комментария для объекта.", "type": "string", "context": [ "view", "edit", "embed" ], "readonly": true }, "author_avatar_urls": { "description": "URL аватары автора объекта.", "type": "object", "context": [ "view", "edit", "embed" ], "readonly": true, "properties": { "24": { "description": "URL аватары с размером изображения в 24 пикселей.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] }, "48": { "description": "URL аватары с размером изображения в 48 пикселей.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] }, "96": { "description": "URL аватары с размером изображения в 96 пикселей.", "type": "string", "format": "uri", "context": [ "embed", "view", "edit" ] } } }, "meta": { "description": "Мета поля.", "type": "object", "context": [ "view", "edit" ], "properties": [] } } } }