Ruby interface for the Lokalise APIv2 that represents returned data as Ruby objects.
View the Project on GitHub lokalise/ruby-lokalise-api
@client.snapshots(project_id, params = {}) # Input:
## project_id (string, required)
## params (hash)
### :filter_title (string) - set title filter for the list
### :page and :limit
# Output:
## Collection of project snapshots
For example:
@client.snapshots project_id, limit: 1, page: 2
@client.create_snapshot(project_id, params = {}) # Input:
## project_id (string, required)
## params (hash)
### :title (string)
# Output:
## Created snapshot
For example:
@client.create_snapshot project_id, title: 'My snapshot'
@client.restore_snapshot(project_id, snapshot_id) # Input:
## project_id (string, required)
## snapshot_id (string, required)
# Output:
## Information about the restored project from the specified snapshot
Alternatively:
snapshot = @client.snapshots('project_id').first # you can't fetch a single snapshot
snapshot.restore
@client.destroy_snapshot(project_id, snapshot_id) # Input:
## project_id (string, required)
## snapshot_id (string, required)
# Output:
## Hash with the project id and "snapshot_deleted" set to "true"
Alternatively:
snapshot = @client.snapshots('project_id').first # you can't fetch a single snapshot
snapshot.destroy