Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

View the Project on GitHub lokalise/elixir-lokalise-api




Comments

Fetch project comments

Doc

{:ok, comments} = ElixirLokaliseApi.ProjectComments.all(project_id, page: 2, limit: 1)

single_comment = hd comments.items
single_comment.comment

Fetch key comments

Doc

{:ok, comments} = ElixirLokaliseApi.KeyComments.all(project_id, key_id, limit: 1, page: 2)

Create key comments

Doc

data = %{
  comments: [
    %{comment: "Elixir comment"}
  ]
}

{:ok, comments} = ElixirLokaliseApi.KeyComments.create(project_id, key_id, data)
comment = hd comments.items
comment.comment

Fetch key comment

Doc

{:ok, comment} = ElixirLokaliseApi.KeyComments.find(project_id, key_id, comment_id)

comment.comment
comment.comment_id

Delete key comment

Doc

{:ok, resp} = ElixirLokaliseApi.KeyComments.delete(project_id, key_id, comment_id)

assert resp.comment_deleted