Module: RubyLokaliseApi::Rest::Snapshots

Included in:
Client
Defined in:
lib/ruby_lokalise_api/rest/snapshots.rb

Instance Method Summary collapse

Instance Method Details

#create_snapshot(project_id, params = {}) ⇒ RubyLokaliseApi::Resources::Snapshot

Creates snapshot for the given project



22
23
24
# File 'lib/ruby_lokalise_api/rest/snapshots.rb', line 22

def create_snapshot(project_id, params = {})
  c_r RubyLokaliseApi::Resources::Snapshot, :create, project_id, params
end

#destroy_snapshot(project_id, snapshot_id) ⇒ Hash

Deletes snapshot



42
43
44
# File 'lib/ruby_lokalise_api/rest/snapshots.rb', line 42

def destroy_snapshot(project_id, snapshot_id)
  c_r RubyLokaliseApi::Resources::Snapshot, :destroy, [project_id, snapshot_id]
end

#restore_snapshot(project_id, snapshot_id) ⇒ RubyLokaliseApi::Resources::Project

Restore project from the given snapshot by producing project’s copy



32
33
34
# File 'lib/ruby_lokalise_api/rest/snapshots.rb', line 32

def restore_snapshot(project_id, snapshot_id)
  c_r RubyLokaliseApi::Resources::Snapshot, :restore, [project_id, snapshot_id]
end

#snapshots(project_id, params = {}) ⇒ RubyLokaliseApi::Collection::Snapshot<RubyLokaliseApi::Resources::Snapshot>

Returns all snapshots for the given project



12
13
14
# File 'lib/ruby_lokalise_api/rest/snapshots.rb', line 12

def snapshots(project_id, params = {})
  c_r RubyLokaliseApi::Collections::Snapshot, :all, project_id, params
end