lib/phrase/api/projects_api.rb in phrase-1.0.1 vs lib/phrase/api/projects_api.rb in phrase-1.0.2
- old
+ new
@@ -10,22 +10,22 @@
# Create a project
# Create a new project.
# @param project_create_parameters [ProjectCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [nil]
+ # @return [ProjectDetails]
def project_create(project_create_parameters, opts = {})
- project_create_with_http_info(project_create_parameters, opts)
- nil
+ data, _status_code, _headers = project_create_with_http_info(project_create_parameters, opts)
+ data
end
# Create a project
# Create a new project.
# @param project_create_parameters [ProjectCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
+ # @return [Array<(Response<(ProjectDetails)>, Integer, Hash)>] Response<(ProjectDetails)> data, response status code and response headers
def project_create_with_http_info(project_create_parameters, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ProjectsApi.project_create ...'
end
# verify the required parameter 'project_create_parameters' is set
@@ -38,10 +38,12 @@
# query parameters
query_params = opts[:query_params] || {}
# 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[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
# form parameters
@@ -49,11 +51,11 @@
# http body (model)
post_body = opts[:body] || @api_client.object_to_http_body(project_create_parameters)
# return_type
- return_type = opts[:return_type]
+ return_type = opts[:return_type] || 'ProjectDetails'
# auth_names
auth_names = opts[:auth_names] || ['Basic', 'Token']
new_options = opts.merge(
@@ -78,19 +80,19 @@
# @param id [String] ID
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
# @return [nil]
def project_delete(id, opts = {})
- project_delete_with_http_info(id, opts)
- nil
+ data, _status_code, _headers = project_delete_with_http_info(id, opts)
+ data
end
# Delete a project
# Delete an existing project.
# @param id [String] ID
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
def project_delete_with_http_info(id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ProjectsApi.project_delete ...'
end
# verify the required parameter 'id' is set