zen_ex v0.4.2 ZenEx.HelpCenter.Model.Article
Provides functions to operate Zendesk HelpCenter Article.
Link to this section Summary
Functions
Create article.
Delete article specified by id.
List articles specified by bcp-47 code of locale (es-419, en-us, pr-br) or locale and section_id.
Search articles by using query.
Show article specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.
Update article specified by id.
Link to this section Functions
Link to this function
create(article)
Specs
create(%ZenEx.HelpCenter.Entity.Article{ author_id: term(), body: term(), comments_disabled: term(), created_at: term(), draft: term(), html_url: term(), id: term(), label_names: term(), locale: term(), outdated: term(), outdated_locales: term(), position: term(), promoted: term(), section_id: term(), source_locale: term(), title: term(), updated_at: term(), url: term(), vote_count: term(), vote_sum: term() }) :: %ZenEx.HelpCenter.Entity.Article{ author_id: term(), body: term(), comments_disabled: term(), created_at: term(), draft: term(), html_url: term(), id: term(), label_names: term(), locale: term(), outdated: term(), outdated_locales: term(), position: term(), promoted: term(), section_id: term(), source_locale: term(), title: term(), updated_at: term(), url: term(), vote_count: term(), vote_sum: term() }
Create article.
Examples
iex> ZenEx.HelpCenter.Model.Article.create(%ZenEx.HelpCenter.Entity.Article{name: xxx, locale: xxx, ...})
%ZenEx.HelpCenter.Entity.Article{name: xxx, locale: xxx, ...}
Link to this function
destroy(id)
Specs
destroy(integer()) :: :ok | :error
Delete article specified by id.
Examples
iex> ZenEx.HelpCenter.Model.Article.destroy(1)
:ok
Link to this function
list(locale, section_id_or_opts \\ [], opts \\ [])
List articles specified by bcp-47 code of locale (es-419, en-us, pr-br) or locale and section_id.
Examples
iex> ZenEx.HelpCenter.Model.Article.list("en-us")
%ZenEx.Collection{}
iex> ZenEx.HelpCenter.Model.Article.list("en-us", 1)
%ZenEx.Collection{}
Link to this function
search(query)
Specs
search(String.t()) :: %ZenEx.Collection{ count: term(), decode_as: term(), entities: term(), next_page: term(), previous_page: term() }
Search articles by using query.
Examples
iex> ZenEx.HelpCenter.Model.Article.search("query={search_string}&updated_after=2017-01-01")
%ZenEx.Collection{}
Link to this function
show(locale, id)
Specs
show(String.t(), integer()) :: %ZenEx.HelpCenter.Entity.Article{ author_id: term(), body: term(), comments_disabled: term(), created_at: term(), draft: term(), html_url: term(), id: term(), label_names: term(), locale: term(), outdated: term(), outdated_locales: term(), position: term(), promoted: term(), section_id: term(), source_locale: term(), title: term(), updated_at: term(), url: term(), vote_count: term(), vote_sum: term() }
Show article specified by bcp-47 code of locale (es-419, en-us, pr-br) and id.
Examples
iex> ZenEx.HelpCenter.Model.Article.show("en-us", 1)
%ZenEx.HelpCenter.Entity.Article{id: 1, name: xxx, locale: "en-us", ...}
Link to this function
update(article)
Specs
update(%ZenEx.HelpCenter.Entity.Article{ author_id: term(), body: term(), comments_disabled: term(), created_at: term(), draft: term(), html_url: term(), id: term(), label_names: term(), locale: term(), outdated: term(), outdated_locales: term(), position: term(), promoted: term(), section_id: term(), source_locale: term(), title: term(), updated_at: term(), url: term(), vote_count: term(), vote_sum: term() }) :: %ZenEx.HelpCenter.Entity.Article{ author_id: term(), body: term(), comments_disabled: term(), created_at: term(), draft: term(), html_url: term(), id: term(), label_names: term(), locale: term(), outdated: term(), outdated_locales: term(), position: term(), promoted: term(), section_id: term(), source_locale: term(), title: term(), updated_at: term(), url: term(), vote_count: term(), vote_sum: term() }
Update article specified by id.
Examples
iex> ZenEx.HelpCenter.Model.Article.update(%ZenEx.HelpCenter.Entity.Article{id: 1, name: xxx, locale: xxx, ...})
%ZenEx.HelpCenter.Entity.Article{id: 1, name: xxx, locale: xxx, ...}