Node interface for the Lokalise APIv2.
View the Project on GitHub lokalise/node-lokalise-api
const user_groups = await lokaliseApi.userGroups().list({
team_id: team_id,
page: 2,
limit: 1,
});
user_groups.items[0].group_id;
const user_group = await lokaliseApi.userGroups().get(group_id, {team_id: team_id});
user_group.group_id;
const user_group = await lokaliseApi.userGroups().create(
{
name: 'Node',
is_reviewer: false,
is_admin: true,
admin_rights: ['upload']
},
{team_id: team_id}
);
user_group.name;
const user_group = await lokaliseApi.userGroups().update(
group_id,
{
name: 'Node updated',
is_reviewer: false,
is_admin: true,
admin_rights: ['upload']
},
{team_id: team_id}
);
user_group.permissions.is_admin;
const user_group = await lokaliseApi.userGroups().add_projects_to_group(
team_id,
group_id,
[project_id]
);
user_group.projects;
const user_group = await lokaliseApi.userGroups().remove_projects_from_group(
team_id,
group_id,
[project_id]
);
user_group.group_id;
const user_group = await lokaliseApi.userGroups().add_members_to_group(
team_id,
group_id,
[user_id]
);
user_group.members;
const user_group = await lokaliseApi.userGroups().remove_members_from_group(
team_id,
group_id,
[user_id]
);
user_group.members;
const response = await lokaliseApi.userGroups().delete(new_group_id, {team_id: team_id});
response.group_deleted;