|
# retoor <retoor@molodetz.nl>
|
|
|
|
from __future__ import annotations
|
|
|
|
from ..spec import Action
|
|
from ._shared import path, query
|
|
|
|
|
|
NEWS_ACTIONS: tuple[Action, ...] = (
|
|
Action(
|
|
name="list_news",
|
|
method="GET",
|
|
path="/news",
|
|
summary="List news articles",
|
|
requires_auth=False,
|
|
params=(query("before", "Pagination cursor."),),
|
|
),
|
|
Action(
|
|
name="view_news",
|
|
method="GET",
|
|
path="/news/{news_slug}",
|
|
summary="View a news article by slug",
|
|
requires_auth=False,
|
|
params=(
|
|
path(
|
|
"news_slug",
|
|
"Exact news slug copied from a /news/... link in a listing response; do not build it from the title.",
|
|
),
|
|
),
|
|
),
|
|
)
|