如何根据文章发布时间获取最新的文章列表
#6796
-
在使用/apis/api.content.halo.run/v1alpha1/posts时,发现默认获取到的文章列表是根据创建时间来的,我想要根据发布时间来获取文章,但是不知道如何传递字段,希望日后文档中可以提供一些更详细的参数示例或者说明,感谢~ |
Beta Was this translation helpful? Give feedback.
Answered by
ruibaby
Oct 8, 2024
Replies: 1 comment 2 replies
-
try 其中 sort 为数组,可以传入多个,比如 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
WAGFS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try
/apis/api.content.halo.run/v1alpha1/posts?sort=spec.publishTime,desc
其中 sort 为数组,可以传入多个,比如
/apis/api.content.halo.run/v1alpha1/posts?sort=spec.publishTime,desc&sort=spec.priority,desc