API › Чужие блоги

Чужие блоги blog

5 actions · URL: /api.php?act=<name> или /api/v1/blog/<action>

blog_list GET /api.php?act=blog_list auth read

Записи блога пользователя, видимые текущему зрителю (приватность учитывается). Закреплённые — первыми.

Параметры

имятипreqописание
user_id int id или username
username string id или username
cat_id int нет фильтр по категории
q string нет FULLTEXT поиск (как blog_search на вебе)
start int нет
limit int нет
rate-limit: 120 / 1 мин на user
blog_cats GET /api.php?act=blog_cats auth read

Категории блога. manage=1 — global (user_id=0) + свои (is_global в каждом item).

Параметры

имятипreqописание
user_id int id или username
username string id или username
manage int нет 1 — полный список для CRUD (общие read-only)

Ответ result

items
[{cat_id, title, is_global, count?}]
rate-limit: 120 / 1 мин на user
blog_cat_create POST /api.php?act=blog_cat_create auth write csrf

Создать категорию блога (как user_edit_categories.php).

Параметры

имятипreqописание
title string да или category

Ответ result

cat_id
int
title
string
rate-limit: 20 / 1 ч на user
blog_cat_rename POST /api.php?act=blog_cat_rename auth write csrf

Переименовать свою категорию блога.

Параметры

имятипreqописание
cat_id int да
title string да

Ответ result

cat_id
int
title
string
rate-limit: 30 / 1 ч на user
blog_cat_delete POST /api.php?act=blog_cat_delete auth write csrf

Удалить свою категорию блога.

Параметры

имятипreqописание
cat_id int да
rate-limit: 30 / 1 ч на user