在我的Node项目中,我从shopify应用程序中获取文章。代码:
await shopify.article.list(blockId, { limit: 2 });现在我得到的都是已发表或未发表的文章。我只想去取已发表的文章。你能给我建议一下,我需要通过哪些对词才能只获取已发表的文章?
提前谢谢。
发布于 2022-05-10 15:13:10
你知道你只要求发表的文章就能过滤吗?这是一件令人惊奇的事情。
published_status: "published"这样可以确保GET文章只返回已发表的文章。太棒了!
发布于 2022-05-11 05:13:59
这样做解决了我的问题:
await shopify.article.list(blogId, {
limit: 2,
published_status: 'published'
});github:https://github.com/MONEI/Shopify-api-node/issues/537
shopify:https://shopify.dev/api/admin-rest/2022-04/resources/article#get-blogs-blog-id-articles
https://stackoverflow.com/questions/72182056
复制相似问题