[英]Rails & Shopify API: Get the most recent 5 customers
I've read the Shopify API docs but I can't figure out how I would call this in my app 我已经阅读了Shopify API文档,但无法弄清楚如何在应用程序中调用它
I thought this would work: ShopifyAPI::Customer.limit(5)
but it throws an error: 我认为这可以工作:
ShopifyAPI::Customer.limit(5)
但是会引发错误:
NoMethodError: undefined method `limit' for ShopifyAPI::Customer:Class
NoMethodError:ShopifyAPI :: Customer:Class的未定义方法`limit'
Any ideas? 有任何想法吗? I can find all the endpoints in the docs, but can't find much about interacting in Rails.
我可以在文档中找到所有端点,但是在Rails中找不到太多交互。
不知道这是否是最好的方法,但是:
ShopifyAPI::Customer.find(:all, :params => {:limit => 5})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.