shopify v0.4.0 Shopify.Comment
Link to this section Summary
Functions
Requests all resources
Requests to approve a comment that is currently pending unapproved so that it will be published on the site
Requests the resource count
Requests to create a new resource
Requests a resource by id
Requests to mark a comment as not spam
Requests to remove a comment
Requests to restore a comment
Requests to mark a comment as spam
Requests to update a resource by id
Link to this section Functions
Requests all resources.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.all
{:ok, %Shopify.Response{}}
approve(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer()
) ::
{:ok,
%Shopify.Comment{
article_id: term(),
author: term(),
blog_id: term(),
body: term(),
body_html: term(),
created_at: term(),
email: term(),
id: term(),
ip: term(),
published_at: term(),
status: term(),
updated_at: term(),
user_agent: term()
}}
| {:error, map()}
Requests to approve a comment that is currently pending unapproved so that it will be published on the site.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Comment.approve(1)
{:ok, %Shopify.Response{}}
Requests the resource count.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.count
{:ok, %Shopify.Response{}}
Requests to create a new resource.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - new_resource: A struct of the resource being created.
Examples
iex> Shopify.session |> Shopify.Product.create(%Shopify.Product{})
{:ok, %Shopify.Response{}}
Requests a resource by id.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
- params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.find(id)
{:ok, %Shopify.Response{}}
not_spam(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer()
) ::
{:ok,
%Shopify.Comment{
article_id: term(),
author: term(),
blog_id: term(),
body: term(),
body_html: term(),
created_at: term(),
email: term(),
id: term(),
ip: term(),
published_at: term(),
status: term(),
updated_at: term(),
user_agent: term()
}}
| {:error, map()}
Requests to mark a comment as not spam.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Comment.not_spam(1)
{:ok, %Shopify.Response{}}
remove(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer()
) ::
{:ok,
%Shopify.Comment{
article_id: term(),
author: term(),
blog_id: term(),
body: term(),
body_html: term(),
created_at: term(),
email: term(),
id: term(),
ip: term(),
published_at: term(),
status: term(),
updated_at: term(),
user_agent: term()
}}
| {:error, map()}
Requests to remove a comment.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Comment.remove(1)
{:ok, %Shopify.Response{}}
restore(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer()
) ::
{:ok,
%Shopify.Comment{
article_id: term(),
author: term(),
blog_id: term(),
body: term(),
body_html: term(),
created_at: term(),
email: term(),
id: term(),
ip: term(),
published_at: term(),
status: term(),
updated_at: term(),
user_agent: term()
}}
| {:error, map()}
Requests to restore a comment.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Comment.restore(1)
{:ok, %Shopify.Response{}}
spam(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer()
) ::
{:ok,
%Shopify.Comment{
article_id: term(),
author: term(),
blog_id: term(),
body: term(),
body_html: term(),
created_at: term(),
email: term(),
id: term(),
ip: term(),
published_at: term(),
status: term(),
updated_at: term(),
user_agent: term()
}}
| {:error, map()}
Requests to mark a comment as spam.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Comment.spam(1)
{:ok, %Shopify.Response{}}
Requests to update a resource by id.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}struct. - id: The id of the resource.
- updated_resource: A struct of the resource being updated.
Examples
iex> Shopify.session |> Shopify.Product.update(id, %Shopify.Product{})
{:ok, %Shopify.Response{}}