ExShopify v0.2.0 ExShopify.Collect

Connects a product to a custom collection.

Summary

Functions

Get a count of all collects or only those for specific products or collections

Add a product to a collection

Remove a product from a collection

Get the collect with a certain id, or for a given product AND collection

List all collects or only those for specific products or collections

Types

collect_plural()
collect_plural() :: {:ok, [%ExShopify.Collect{collection_id: term, created_at: term, featured: term, id: term, position: term, product_id: term, sort_value: term, updated_at: term}], %ExShopify.Meta{api_call_limit: term}}
collect_singular()
collect_singular() :: {:ok, %ExShopify.Collect{collection_id: term, created_at: term, featured: term, id: term, position: term, product_id: term, sort_value: term, updated_at: term}, %ExShopify.Meta{api_call_limit: term}}

Functions

count(session)
count(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}) ::
  ExShopify.Resource.count |
  ExShopify.Resource.error
count(session, params)
count(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, map) ::
  ExShopify.Resource.count |
  ExShopify.Resource.error

Get a count of all collects or only those for specific products or collections.

Examples

Count all collects for your shop

iex> ExShopify.Collect.count(session)
{:ok, count, meta}

Count only collects for a certain collection

iex> ExShopify.Collect.count(session, %{collection_id: 841564295})
{:ok, count, meta}
create(session, params)
create(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, map) ::
  collect_singular |
  ExShopify.Resource.error

Add a product to a collection.

Examples

iex> params = %ExShopify.Collect{
...>   product_id: 921728736,
...>   collection_id: 841564295
...> }

iex> ExShopify.Collect.create(session, params)
{:ok, collect, meta}
delete(session, id)
delete(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t) ::
  ExShopify.Resource.only_meta |
  ExShopify.Resource.error

Remove a product from a collection.

Examples

iex> ExShopify.Collect.delete(session, 841564295)
{:ok, meta}
find(session, id)
find(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t) ::
  collect_singular |
  ExShopify.Resource.error

Get the collect with a certain id, or for a given product AND collection.

Examples

iex> ExShopify.Collect.find(session, 841564295)
{:ok, collect, meta}
list(session)
list(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}) ::
  collect_plural |
  ExShopify.Resource.error
list(session, params)
list(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, map) ::
  collect_plural |
  ExShopify.Resource.error

List all collects or only those for specific products or collections.

Examples

List all collects for your shop

iex> ExShopify.Collect.list(session)
{:ok, collects, meta}

List only collects for a certain product

iex> ExShopify.Collect.list(session, %{product_id: 632910392})
{:ok, collects, meta}