Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

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




Branches

Fetch branches

Doc

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

branch = hd branches.items
branch.name

Fetch branch

Doc

{:ok, branch} = ElixirLokaliseApi.Branches.find(project_id, branch_id)

branch.branch_id
branch.name

Create branch

Doc

data = %{name: "Elixir"}

{:ok, branch} = ElixirLokaliseApi.Branches.create(project_id, data)

branch.name

Update branch

Doc

data = %{name: "Elixir-update"}

{:ok, branch} = ElixirLokaliseApi.Branches.update(project_id, branch_id, data)

branch.name

Delete branch

Doc

{:ok, resp} = ElixirLokaliseApi.Branches.delete(project_id, branch_id)

resp.branch_deleted

Merge branch

Doc

data = %{force_conflict_resolve_using: "target", target_branch_id: target_branch_id}

{:ok, resp} = ElixirLokaliseApi.Branches.merge(project_id, branch_id, data)

resp.branch_merged