Class: RubyLokaliseApi::Resources::Snapshot
- Defined in:
- lib/ruby_lokalise_api/resources/snapshot.rb
Constant Summary collapse
- ID_KEY =
'snapshot_id'
Constants included from RubyLokaliseApi::Request
RubyLokaliseApi::Request::PAGINATION_HEADERS
Constants included from Utils::AttributeHelpers
Utils::AttributeHelpers::UNIFIED_RESOURCES
Instance Attribute Summary
Attributes inherited from Base
#branch, #client, #key_id, #path, #project_id, #raw_data, #team_id, #user_id
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#[], create, destroy, #extract_common_attributes_for, find, #id_from, #infer_path_from, inherited, #initialize, #path_with_id, #populate_attributes_for, supports, update
Methods included from BaseRequest
#delete, #get, #patch, #post, #put
Methods included from Connection
Methods included from JsonHandler
Methods included from Utils::AttributeHelpers
#attributes_for, #data_key_for, #id_key_for
Methods included from Utils::EndpointHelpers
Constructor Details
This class inherits a constructor from RubyLokaliseApi::Resources::Base
Class Method Details
.endpoint(project_id, snapshot_id = nil) ⇒ Object
20 21 22 23 |
# File 'lib/ruby_lokalise_api/resources/snapshot.rb', line 20 def endpoint(project_id, snapshot_id = nil) path_from projects: project_id, snapshots: snapshot_id end |
.restore(client, path, *_args) ⇒ Object
14 15 16 17 18 |
# File 'lib/ruby_lokalise_api/resources/snapshot.rb', line 14 def restore(client, path, *_args) klass = RubyLokaliseApi::Resources::Project klass.new post(path, client), ->(project_id, *_ids) { klass.endpoint(project_id) } end |
Instance Method Details
#restore ⇒ Object
9 10 11 |
# File 'lib/ruby_lokalise_api/resources/snapshot.rb', line 9 def restore self.class.restore @client, @path end |