Class: Lokalise::Resources::File
- Defined in:
- lib/ruby-lokalise-api/resources/file.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
#client, #path, #project_id, #raw_data
Class Method Summary collapse
- .download(client, path, params) ⇒ Object
- .endpoint(project_id, action = '') ⇒ Object
- .upload(client, path, params) ⇒ Object
Methods inherited from Base
create, destroy, find, #id_from, #infer_path_from, inherited, #initialize, #path_with_id, #populate_attributes_for, supports, update
Methods included from Lokalise::Request
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
.download(client, path, params) ⇒ Object
5 6 7 |
# File 'lib/ruby-lokalise-api/resources/file.rb', line 5 def download(client, path, params) post(path, client, params)['content'] end |
.endpoint(project_id, action = '') ⇒ Object
13 14 15 16 |
# File 'lib/ruby-lokalise-api/resources/file.rb', line 13 def endpoint(project_id, action = '') path_from projects: project_id, files: action end |
.upload(client, path, params) ⇒ Object
9 10 11 |
# File 'lib/ruby-lokalise-api/resources/file.rb', line 9 def upload(client, path, params) post(path, client, params)['content'] end |