Ruby interface for the Lokalise APIv2 that represents returned data as Ruby objects.
View the Project on GitHub lokalise/ruby-lokalise-api
@client.branches(project_id, params = {}) # Input:
## project_id (string, required)
## params (hash)
### :page and :limit
# Output:
## Collection of comments available in the branches project
For example:
@client.branches project_id, limit: 1, page: 1
@client.branch(project_id, branch_id) # Input:
## project_id (string, required)
## branch_id (string or integer, required)
# Output:
## Branch inside the given project
@client.create_branch(project_id, params) # Input:
## project_id (string, required)
## params (hash, required):
### :name (string) - name of the branch
# Output:
## Created branch
For example:
@client.create_branch project_id, name: 'ruby-branch'
@client.update_branch(project_id, branch_id, params) # Input:
## project_id (string, required)
## branch_id (string or integer, required)
## params (hash, required):
### :name (string) - name of the branch
# Output:
## Updated branch
Alternatively:
branch = @client.branch('project_id', 'branch_id')
branch.update params
For example:
@client.update_branch project_id, branch_id, name: 'updated-ruby-branch'
@client.destroy_branch(project_id, branch_id) # Input:
## project_id (string, required)
## branch_id (string or integer, required)
# Output:
## Hash with the project's id and "branch_deleted"=>true
Alternatively:
branch = @client.branch('project_id', 'branch_id')
branch.destroy
@client.merge_branch(project_id, branch_id, params) # Input:
## project_id (string, required)
## branch_id (string or integer, required)
## params (hash)
# Output:
## Hash with the project's id, "branch_merged"=>true, and branch attributes
Alternatively:
branch = @client.branch('project_id', 'branch_id')
branch.merge params
For example:
@client.merge_branch project_id, branch_id, force_conflict_resolve_using: 'master'