Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

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




Projects

Fetch projects

Doc

{:ok, projects} = ElixirLokaliseApi.Projects.all(page: 3, limit: 2)
project = projects.items |> hd
project.name

Fetch a single project

Doc

{:ok, project} = ElixirLokaliseApi.Projects.find(project_id)

project.project_id

Create a project

Doc

project_data = %{name: "Elixir SDK", description: "Created via API"}
{:ok, project} = ElixirLokaliseApi.Projects.create(project_data)
project.name

Update a project

Doc

project_data = %{name: "Updated SDK", description: "Updated via API"}

{:ok, project} = ElixirLokaliseApi.Projects.update(project_id, project_data)
project.project_id

Empty a project

Doc

Deletes all keys and translations from the project.

{:ok, resp} = ElixirLokaliseApi.Projects.empty(project_id)
resp.keys_deleted

Delete a project

Doc

{:ok, resp} = ElixirLokaliseApi.Projects.delete(project_id)
resp.project_deleted