Обновление темы.

URL ресурса

https://yourproject.userecho.ru/api/v2/forums/[forum_id]/topics.json

Параметры

Параметр Значение Обязательный? Опции Описание
id Integer yes ID темы
header String no Заголовок топика
description String no Описание темы
type Integer no Get available types with GET forums/[forum_id]/types Тип темы
category Integer no Get available categories with GET forums/[forum_id]/categories Категория темы
tags List of integer no Get available tags with GET forums/[forum_id]/tags Теги темы
show_voter Boolean no Показывать голосование
custom_fields no Example: "custom_fields":{"cf_1":"test", "cf_2":5} Save custom fields value
assigned_to Integer no Pass Agent ID as param

If any parameter will not passed, it will be not changed. To clear value, just send null for Integer, "" for String, [] for list.

Пример запроса #1

    { "id" : 1, "header" : "Test topic - replaced" }
  

Пример запроса #2

    { "id" : 1, "header" : "Test topic - replaced", "description" : "Test topic description", "type":3, "category":1, "tags":[1, 2, 3], "show_voter": false }
  

Пример запроса #3

    { "id" : 1, "custom_fields":{"cf_1":"test", "cf_2":10} }
  

Пример запроса #4

    { "id" : 1, "header" : "Test topic - replaced", "description" : "Test topic description", "type":3, "category":null, "tags":[] }
  

Пример ответа

    { "status": "success", "data": { "status": { "color": "999999", "updated": "2014-03-17T03:38:35.696Z", "id": 1, "name": "" }, "updated": "2014-03-17T03:38:35.696Z", "description": "

Test topic description

", "tags": [], "created": "2014-03-17T03:38:35.696Z", "header": "Test topic", "comment_count": 0, "author": { "avatar_url": "https://secure.gravatar.com/avatar/f70e785b1cb1a52832e763df9ddf8e0c?default=https%3A%2F%2Fcdn.userecho.ru%2Fimages%2Fno_avatar_48.jpg&s=48", "id": 1, "name": "Vladimir Mullagaliyev", "title": "" }, "vote": { "diff": 0, "positive": 0, "total": 0, "negative": 0, "current_user": 0 }, "type": { "id": 1, "name": "Ideas" }, "id": 7874, "custom_fields": [ { "code_name": "cf_1", "id": 1, "value": "", "name": "test" }, { "code_name": "cf_9", "id": 9, "value": "", "name": "test date" } ] } }