Class: Lokalise::Resources::Branch
- Defined in:
- lib/ruby-lokalise-api/resources/branch.rb
Constant Summary
Constants included from Lokalise::Request
Lokalise::Request::PAGINATION_HEADERS
Constants included from Connection
Constants included from Utils::AttributeHelpers
Utils::AttributeHelpers::UNIFIED_RESOURCES
Instance Attribute Summary
Attributes inherited from Base
#branch, #client, #path, #project_id, #raw_data, #team_id, #user_id
Class Method Summary collapse
- .endpoint(project_id, branch_id = nil, action = nil) ⇒ Object
- .merge(client, path, params, *_args) ⇒ Object
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 Lokalise::Request
#delete, #get, #patch, #post, #put
Methods included from JsonHandler
Methods included from Connection
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 Lokalise::Resources::Base
Class Method Details
.endpoint(project_id, branch_id = nil, action = nil) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/ruby-lokalise-api/resources/branch.rb', line 17 def endpoint(project_id, branch_id = nil, action = nil) params = {projects: project_id, branches: branch_id} params[:merge] = '' if action == :merge path_from params end |
.merge(client, path, params, *_args) ⇒ Object
13 14 15 |
# File 'lib/ruby-lokalise-api/resources/branch.rb', line 13 def merge(client, path, params, *_args) post(path, client, params)['content'] end |
Instance Method Details
#merge(params = {}) ⇒ Object
8 9 10 |
# File 'lib/ruby-lokalise-api/resources/branch.rb', line 8 def merge(params = {}) self.class.merge @client, self.class.endpoint(project_id, branch_id, :merge), params end |