Skip to content

Instantly share code, notes, and snippets.

@DrewMartin
Last active August 13, 2019 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DrewMartin/43c47abb611eeefd534baff1c2e70964 to your computer and use it in GitHub Desktop.
Save DrewMartin/43c47abb611eeefd534baff1c2e70964 to your computer and use it in GitHub Desktop.
products = ShopifyAPI::Product.find(:all, params: { order: 'inventory_total desc', limit: 250 })
process_products(products)
3.times do
break unless products.next_page?
products = products.fetch_next_page
process_products(products)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment