ExShopify v0.2.0 ExShopify.ScriptTag
Represents remote javascripts which are loaded into the pages of a shop’s storefront and in the order status page of checkout.
Summary
Functions
Receive a count of all script tags
Create a new script tag
Remove a script tag from the database
Receive a single script tag
Receive a list of all script tags
Modify an existing script tag
Types
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(%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
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) :: script_tag_singular | ExShopify.Resource.error
Create a new script tag.
Examples
iex> params = %{
...> event: "onload",
...> src: "https://djavaskripped.org/fancy.js"
...> }
iex> ExShopify.ScriptTag.create(session, params)
{:ok, script_tag, 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.meta_only | ExShopify.Resource.error
Remove a script tag from the database.
Examples
iex> ExShopify.ScriptTag.delete(session, 596726825)
{: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) :: script_tag_singular | ExShopify.Resource.error
find(session, id, params)
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, map) :: script_tag_singular | ExShopify.Resource.error
Receive a single script tag.
Examples
iex> ExShopify.ScriptTag.find(session, 596726825)
{:ok, script_tag, 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}) :: script_tag_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) :: script_tag_plural | ExShopify.Resource.error
Receive a list of all script tags.
Examples
iex> ExShopify.ScriptTag.list(session)
{:ok, script_tags, meta}
update(session, id, params)
update(%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, map) :: script_tag_singular | ExShopify.Resource.error
Modify an existing script tag.
Examples
iex> params = %{
...> src: "https://somewhere-else.com/another.js"
...> }
iex> ExShopify.ScriptTag.update(session, 596726825, params)
{:ok, script_tag, meta}