Module: RubyLokaliseApi::Rest::Screenshots
- Included in:
- RubyLokaliseApi::Rest
- Defined in:
- lib/ruby_lokalise_api/rest/screenshots.rb
Instance Method Summary collapse
-
#create_screenshots(project_id, req_params) ⇒ RubyLokaliseApi::Collections::Screenshots
Creates a new order.
-
#destroy_screenshot(project_id, screenshot_id) ⇒ RubyLokaliseApi::Generics::DeletedResource
Deletes a screenshot.
-
#screenshot(project_id, screenshot_id, req_params = {}) ⇒ RubyLokaliseApi::Resources::Screenshot
Returns a single screenshot.
-
#screenshots(project_id, req_params = {}) ⇒ RubyLokaliseApi::Collections::Screenshots
Returns project screenshots.
-
#update_screenshot(project_id, screenshot_id, req_params = {}) ⇒ RubyLokaliseApi::Resources::Screenshot
Updates a screenshot.
Instance Method Details
#create_screenshots(project_id, req_params) ⇒ RubyLokaliseApi::Collections::Screenshots
Creates a new order
44 45 46 47 48 49 50 51 |
# File 'lib/ruby_lokalise_api/rest/screenshots.rb', line 44 def create_screenshots(project_id, req_params) name = 'Screenshots' params = { query: project_id, req: req_params.to_array_obj(:screenshots) } data = endpoint(name: name, params: params).do_post collection name, data end |
#destroy_screenshot(project_id, screenshot_id) ⇒ RubyLokaliseApi::Generics::DeletedResource
Deletes a screenshot
74 75 76 77 78 79 80 |
# File 'lib/ruby_lokalise_api/rest/screenshots.rb', line 74 def destroy_screenshot(project_id, screenshot_id) params = { query: [project_id, screenshot_id] } data = endpoint(name: 'Screenshots', params: params).do_delete RubyLokaliseApi::Generics::DeletedResource.new data.content end |
#screenshot(project_id, screenshot_id, req_params = {}) ⇒ RubyLokaliseApi::Resources::Screenshot
Returns a single screenshot
30 31 32 33 34 35 36 |
# File 'lib/ruby_lokalise_api/rest/screenshots.rb', line 30 def screenshot(project_id, screenshot_id, req_params = {}) params = { query: [project_id, screenshot_id], req: req_params } data = endpoint(name: 'Screenshots', params: params).do_get resource 'Screenshot', data end |
#screenshots(project_id, req_params = {}) ⇒ RubyLokaliseApi::Collections::Screenshots
Returns project screenshots
14 15 16 17 18 19 20 21 |
# File 'lib/ruby_lokalise_api/rest/screenshots.rb', line 14 def screenshots(project_id, req_params = {}) name = 'Screenshots' params = { query: project_id, req: req_params } data = endpoint(name: name, params: params).do_get collection name, data end |
#update_screenshot(project_id, screenshot_id, req_params = {}) ⇒ RubyLokaliseApi::Resources::Screenshot
Updates a screenshot
60 61 62 63 64 65 66 |
# File 'lib/ruby_lokalise_api/rest/screenshots.rb', line 60 def update_screenshot(project_id, screenshot_id, req_params = {}) params = { query: [project_id, screenshot_id], req: req_params } data = endpoint(name: 'Screenshots', params: params).do_put resource 'Screenshot', data end |