跳至主要内容

Article sort on the news list

What's new

get_news_list no longer accepts the sort_field and sort_order query parameters. They are replaced by a single optional article_sort parameter that takes an ArticleSort value:

  • newest_first (default): by date, the most recent first
  • oldest_first: by date, the earliest first
  • manual: in the order set by hand

The NewsSortField enum behind sort_field is gone from the spec.

Impact

The list is now ordered the same way a collection with that article sort orders its articles. Sorting by slug, title, description, tags, or category is no longer available.

Changes

ResourceChange
get_news_listRemoved sort_field and sort_order, added optional article_sort
ComponentsRemoved the NewsSortField schema and added ArticleSort

Upgrade

  • Stop sending sort_field and sort_order.
  • Send article_sort instead. Use oldest_first where you sorted by date ascending and newest_first where you sorted by date descending.
  • If you generate clients from the spec, regenerate them. The NewsSortField type no longer exists.

需要技术支持?
联系我们的集成技术团队: [email protected]