[ruby] document the *_with_http_info methods (#8094)

This commit is contained in:
Julien Feltesse
2020-12-05 19:27:49 +09:00
committed by GitHub
parent 38dbcdd752
commit adcf54bc09
118 changed files with 1877 additions and 448 deletions

View File

@@ -16,20 +16,37 @@ Use custom server
Use custom server
### Example
### Examples
```ruby
# load the gem
require 'dynamic_servers'
api_instance = DynamicServers::UsageApi.new
begin
#Use custom server
# Use custom server
result = api_instance.custom_server
p result
rescue DynamicServers::ApiError => e
puts "Exception when calling UsageApi->custom_server: #{e}"
puts "Error when calling UsageApi->custom_server: #{e}"
end
```
#### Using the custom_server_with_http_info variant
This returns an Array which contains the response data, status code and headers.
> <Array(Object, Integer, Hash)> custom_server_with_http_info
```ruby
begin
# Use custom server
data, status_code, headers = api_instance.custom_server_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue DynamicServers::ApiError => e
puts "Error when calling UsageApi->custom_server_with_http_info: #{e}"
end
```
@@ -59,20 +76,37 @@ Use default server
Use default server
### Example
### Examples
```ruby
# load the gem
require 'dynamic_servers'
api_instance = DynamicServers::UsageApi.new
begin
#Use default server
# Use default server
result = api_instance.default_server
p result
rescue DynamicServers::ApiError => e
puts "Exception when calling UsageApi->default_server: #{e}"
puts "Error when calling UsageApi->default_server: #{e}"
end
```
#### Using the default_server_with_http_info variant
This returns an Array which contains the response data, status code and headers.
> <Array(Object, Integer, Hash)> default_server_with_http_info
```ruby
begin
# Use default server
data, status_code, headers = api_instance.default_server_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => Object
rescue DynamicServers::ApiError => e
puts "Error when calling UsageApi->default_server_with_http_info: #{e}"
end
```