ShopSearch
Elixir library to easily fetch and transform product data from Shopify stores.
Features
- Fetch all products from a Shopify store
- Fetch products with pagination
- Find a specific product by its handle
- Fetch collections and their products
- Transform Shopify product data into a consistent format
Installation
Add shop_search to your list of dependencies in mix.exs:
def deps do
[
{:shop_search, "~> 0.1.0"}
]
endUsage
Create a store client
store = ShopSearch.new("your-store.myshopify.com")Fetch all products
{:ok, products} = ShopSearch.get_all_products(store)Fetch products with pagination
{:ok, products} = ShopSearch.get_products(store, %{limit: 25, page: 1})Find a specific product
{:ok, product} = ShopSearch.get_product(store, "awesome-product")Fetch all collections
{:ok, collections} = ShopSearch.get_all_collections(store)Get products from a collection
{:ok, products} = ShopSearch.get_collection_products(store, "featured")