Remove extra space in method template (#785)
* Remove extra space in method template * Fix CONTRIBUTING link in readme file
This commit is contained in:
1 parent
d3e153b3b6
commit
69fb4a0b11
2 files changed
+4
-4
No files matched your search
@@ -52,7 +52,7 @@
|
||||
def <%= api_method.generated_name %>(<% for param in api_method.required_parameters %><%= param.generated_name %>, <% end %><% if api_method.request %><%= api.schemas[api_method.request._ref].generated_name %>_object = nil, <% end %><% for param in api_method.optional_query_parameters %><%= param.generated_name %>: nil, <% end %><% for param in api.parameters.values.reject {|p| p.name == 'key'} %><%= param.generated_name %>: nil, <% end %><% if api_method.supports_media_upload? %>upload_source: nil, content_type: nil, <% elsif api_method.supports_media_download? %>download_dest: nil, <% end %>options: nil, &block)
|
||||
<% if api_method.supports_media_upload? -%>
|
||||
if upload_source.nil?
|
||||
command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
else
|
||||
command = make_upload_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
command.upload_source = upload_source
|
||||
@@ -60,13 +60,13 @@ def <%= api_method.generated_name %>(<% for param in api_method.required_paramet
|
||||
end
|
||||
<% elsif api_method.supports_media_download? -%>
|
||||
if download_dest.nil?
|
||||
command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
else
|
||||
command = make_download_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
command.download_dest = download_dest
|
||||
end
|
||||
<% else -%>
|
||||
command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
command = make_simple_command(:<%= api_method.http_method.downcase %>, '<%= api_method.path %>', options)
|
||||
<% end -%>
|
||||
<% if api_method.request -%>
|
||||
command.request_representation = <%= api.schemas[api_method.request._ref].generated_type %>::Representation
|
||||
|
||||
Reference in new issue
Block a user