Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

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




Snapshots

Fetch snapshots

Doc

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

snapshot = hd(snapshots.items)
snapshot.snapshot_id

Create snapshot

Doc

data = %{
  title: "Elixir snap"
}

{:ok, snapshot} = ElixirLokaliseApi.Snapshots.create(project_id, data)
snapshot.title

Restore snapshot

Doc

{:ok, project} = ElixirLokaliseApi.Snapshots.restore(project_id, snapshot_id)

project.project_id

Delete snapshot

Doc

{:ok, resp} = ElixirLokaliseApi.Snapshots.delete(project_id, snapshot_id)

resp.snapshot_deleted