Lokalise APIv2 Elixir SDK

Elixir interface for the Lokalise APIv2.

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




Screenshots

Fetch screenshots

Doc

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

screenshot = hd(screenshots.items)
screenshot.screenshot_id

Fetch a single screenshot

Doc

{:ok, screenshot} = ElixirLokaliseApi.Screenshots.find(project_id, screenshot_id)

screenshot.screenshot_id

Create screenshots

Doc

data = %{
  screenshots: [
    %{
      data: base64_data,
      title: "Elixir screen"
    }
  ]
}

{:ok, screenshots} = ElixirLokaliseApi.Screenshots.create(project_id, data)

screenshot = hd(screenshots.items)
screenshot.title

Update screenshot

Doc

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

{:ok, screenshot} = ElixirLokaliseApi.Screenshots.update(project_id, screenshot_id, data)

screenshot.title

Delete screenshot

Doc

{:ok, resp} = ElixirLokaliseApi.Screenshots.delete(project_id, screenshot_id)

resp.screenshot_deleted