如何从shopify导入具有特定日期范围的客户,即使用日期过滤器导入客户?在
导入不带过滤器的客户请参照以下代码:
shop_url = "https://%s:%s@%s.myshopify.com/admin/" % (self.api_key_shopify,
self.password_shopify, self.name)
shopify.ShopifyResource.set_site(shop_url)
customer_list = shopify.Customer.find()
Tags:
As you can see from the documentation,为了获得在特定范围内创建的客户,您需要随请求一起传递的参数是}。除非您想手动键入时间戳,否则我们将需要来自^{} 模块的^{} 对象。在
created_at_min
和{我们与
strftime
方法一起使用的格式化字符串将以shoppify文档要求的格式提供时间,并硬编码UTC时区。如果您想使用不同的时区,您可以用不同的时间偏移量硬编码,或者使用pytz module。在现在,对于实际调用API。使用Shopify resources的
^{pr2}$find
方法时,将属性名/值对作为关键字参数传递,如下所示:瞧,这应该返回一个
Customer
资源的列表,如果没有匹配项,则返回一个空列表。在相关问题 更多 >
编程相关推荐