-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
155 changed files
with
384 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Permission templates | ||
|
||
[Permission template attributes](https://developers.lokalise.com/reference/permission-template-object) | ||
|
||
## Fetch permission templates | ||
|
||
[API doc](https://developers.lokalise.com/reference/list-all-permission-templates) | ||
|
||
```elixir | ||
{:ok, %PermissionTemplatesCollection{} = templates} = PermissionTemplates.all(team_id) | ||
|
||
template = hd(templates) | ||
|
||
template.id # => 1 | ||
template.role # => "Manager" | ||
template.permissions # => ['branches_main_modify', ...] | ||
template.description # => 'Manage project settings ...' | ||
template.tag # => 'Full access' | ||
template.tagColor # => 'green' | ||
template.tagInfo # => '' | ||
template.doesEnableAllReadOnlyLanguages # => true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defmodule ElixirLokaliseApi.Collection.PermissionTemplates do | ||
@moduledoc false | ||
defstruct items: [] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
defmodule ElixirLokaliseApi.PermissionTemplates do | ||
@moduledoc """ | ||
Permission templates endpoint. | ||
""" | ||
@model ElixirLokaliseApi.Model.PermissionTemplate | ||
@collection ElixirLokaliseApi.Collection.PermissionTemplates | ||
@endpoint "teams/{!:team_id}/roles" | ||
@data_key :roles | ||
@singular_data_key nil | ||
@parent_key :team_id | ||
|
||
use ElixirLokaliseApi.DynamicResource, import: [:all2] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule ElixirLokaliseApi.Model.PermissionTemplate do | ||
@moduledoc false | ||
defstruct id: nil, | ||
role: nil, | ||
permissions: [], | ||
description: nil, | ||
tag: nil, | ||
tagColor: nil, | ||
tagInfo: nil, | ||
doesEnableAllReadOnlyLanguages: nil | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.