Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

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




Tasks

Fetch tasks

Doc

{:ok, tasks} = ElixirLokaliseApi.Tasks.all(project_id, page: 2, limit: 1, filter_statuses: "completed")

task = hd(tasks.items)
task.task_id

Fetch a single task

Doc

{:ok, task} = ElixirLokaliseApi.Tasks.find(project_id, task_id)
task.task_id

Create task

Doc

data = %{
  title: "Elixir",
  keys: [74_185, 74_187],
  languages: [
    %{
      language_iso: "sq",
      users: [2018]
    }
  ]
}

{:ok, task} = ElixirLokaliseApi.Tasks.create(project_id, data)

task.title

Update task

Doc

data = %{
  title: "Elixir updated",
  description: "sample"
}

{:ok, task} = ElixirLokaliseApi.Tasks.update(project_id, task_id, data)

task.task_id

Delete task

Doc

{:ok, resp} = ElixirLokaliseApi.Tasks.delete(project_id, task_id)

resp.task_deleted