lib/phrase/api/screenshots_api.rb in phrase-2.7.0 vs lib/phrase/api/screenshots_api.rb in phrase-2.7.1
- old
+ new
@@ -8,38 +8,40 @@
@api_client = api_client
end
# Create a screenshot
# Create a new screenshot.
# @param project_id [String] Project ID
- # @param screenshot_create_parameters [ScreenshotCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
+ # @option opts [String] :branch specify the branch to use
+ # @option opts [String] :name Name of the screenshot
+ # @option opts [String] :description Description of the screenshot
+ # @option opts [File] :filename Screenshot file
# @return [Screenshot]
- def screenshot_create(project_id, screenshot_create_parameters, opts = {})
- data, _status_code, _headers = screenshot_create_with_http_info(project_id, screenshot_create_parameters, opts)
+ def screenshot_create(project_id, opts = {})
+ data, _status_code, _headers = screenshot_create_with_http_info(project_id, opts)
data
end
# Create a screenshot
# Create a new screenshot.
# @param project_id [String] Project ID
- # @param screenshot_create_parameters [ScreenshotCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
+ # @option opts [String] :branch specify the branch to use
+ # @option opts [String] :name Name of the screenshot
+ # @option opts [String] :description Description of the screenshot
+ # @option opts [File] :filename Screenshot file
# @return [Array<(Response<(Screenshot)>, Integer, Hash)>] Response<(Screenshot)> data, response status code and response headers
- def screenshot_create_with_http_info(project_id, screenshot_create_parameters, opts = {})
+ def screenshot_create_with_http_info(project_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshot_create ...'
end
# verify the required parameter 'project_id' is set
if @api_client.config.client_side_validation && project_id.nil?
fail ArgumentError, "Missing the required parameter 'project_id' when calling ScreenshotsApi.screenshot_create"
end
- # verify the required parameter 'screenshot_create_parameters' is set
- if @api_client.config.client_side_validation && screenshot_create_parameters.nil?
- fail ArgumentError, "Missing the required parameter 'screenshot_create_parameters' when calling ScreenshotsApi.screenshot_create"
- end
# resource path
local_var_path = '/projects/{project_id}/screenshots'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -47,17 +49,21 @@
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
# form parameters
form_params = opts[:form_params] || {}
+ form_params['branch'] = opts[:'branch'] if !opts[:'branch'].nil?
+ form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
+ form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
+ form_params['filename'] = opts[:'filename'] if !opts[:'filename'].nil?
# http body (model)
- post_body = opts[:body] || @api_client.object_to_http_body(screenshot_create_parameters)
+ post_body = opts[:body]
# return_type
return_type = opts[:return_type] || 'Screenshot'
# auth_names