zen_ex v0.3.2 ZenEx.HelpCenter.Model.Translation
Provides functions to operate Zendesk HelpCenter Translation.
Summary
Functions
Create translation specified by category or section or article id
Delete translation specified by id
List translations by category or section or article id
List missing locales by category or section or article id
Show translation specified by bcp-47 code of locale (es-419, en-us, pr-br) and article id
Update translation specified by category or section or article id
Functions
create([{:category_id, integer}], %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
create([{:section_id, integer}], %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
create([{:article_id, integer}], %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
Create translation specified by category or section or article id.
Examples
iex> ZenEx.HelpCenter.Model.Translation.create([article_id: 1], %ZenEx.HelpCenter.Entity.Translation{title: xxx, locale: xxx, ...})
%ZenEx.HelpCenter.Entity.Translation{title: xxx, locale: xxx, ...}
List translations by category or section or article id.
Examples
iex> ZenEx.HelpCenter.Model.Translation.list(article_id: 1)
%ZenEx.Collection{}
List missing locales by category or section or article id.
Examples
iex> ZenEx.HelpCenter.Model.Translation.list_missing(article_id: 1)
["en-us", "da-dk"]
show(String.t, integer) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
Show translation specified by bcp-47 code of locale (es-419, en-us, pr-br) and article id.
Examples
iex> ZenEx.HelpCenter.Model.Translation.show("en-us", 1)
%ZenEx.HelpCenter.Entity.Translation{id: 1, title: xxx, locale: "en-us", ...}
update([{:category_id, integer}], %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
update([{:section_id, integer}], %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
update([{:article_id, integer}], %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}) :: %ZenEx.HelpCenter.Entity.Translation{body: term, created_at: term, created_by_id: term, draft: term, html_url: term, id: term, locale: term, outdated: term, source_id: term, source_type: term, title: term, updated_at: term, updated_by_id: term, url: term}
Update translation specified by category or section or article id.
Examples
iex> ZenEx.HelpCenter.Model.Translation.update([article_id: 1], %ZenEx.HelpCenter.Entity.Translation{id: 1, title: xxx, locale: xxx, ...})
%ZenEx.HelpCenter.Entity.Translation{id: 1, title: xxx, locale: xxx, ...}