zen_ex v0.3.1 ZenEx.HelpCenter.Model.Article
Provides functions to operate Zendesk HelpCenter Article.
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
Functions
create(article)
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, ...}
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{}
search(query)
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{}
show(locale, id)
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", ...}
update(article)
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, ...}