Ruby interface for the Lokalise APIv2 that represents returned data as Ruby objects.
View the Project on GitHub lokalise/ruby-lokalise-api
@client.projects(params = {}) # Input:
## params (hash)
### :filter_team_id (string) - load projects only for the given team
### :page and :limit
# Output:
## Collection of projects under the `projects` attribute
For example:
@client.projects limit: 1, page: 2
@client.project(project_id) # Input:
## project_id (string, required)
# Output:
## A single project
@client.create_project(params) # Input:
## params (hash, required)
### name (string, required)
### description (string)
### team_id (integer) - you must be an admin of the chosen team. When omitted, defaults to the current team of the token's owner
# Output:
## A newly created project
For example:
@client.create_project name: 'Demo project', description: 'My first project'
@client.update_project(project_id, params) # Input:
## project_id (string, required)
## params (hash, required)
### name (string, required)
### description (string)
# Output:
## An updated project
Alternatively:
project = @client.project('project_id')
project.update(params)
For example:
@client.update_project new_project_id,
name: 'Updated project name',
description: 'Updated project desc'
Deletes all keys and translations from the project.
@client.empty_project(project_id) # Input:
## project_id (string, required)
# Output:
## A project containing its id and a `keys_deleted => true` attribute
Alternatively:
project = @client.project('project_id')
project.empty
@client.destroy_project(project_id) # Input:
## project_id (string, required)
# Output:
## A project containing its id and a `project_deleted => true` attribute
Alternatively:
project = @client.project('project_id')
project.destroy