endoflife_date 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +72 -0
- data/README.md +91 -0
- data/Rakefile +10 -0
- data/bin/bundle +109 -0
- data/bin/byebug +27 -0
- data/bin/coderay +27 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/pry +27 -0
- data/bin/racc +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -0
- data/docs/Cycle.md +32 -0
- data/docs/DefaultApi.md +201 -0
- data/endoflife_date.gemspec +38 -0
- data/git_push.sh +57 -0
- data/lib/endoflife_date/api/default_api.rb +211 -0
- data/lib/endoflife_date/api_client.rb +391 -0
- data/lib/endoflife_date/api_error.rb +58 -0
- data/lib/endoflife_date/configuration.rb +290 -0
- data/lib/endoflife_date/models/cycle.rb +411 -0
- data/lib/endoflife_date/version.rb +15 -0
- data/lib/endoflife_date.rb +41 -0
- data/spec/api/default_api_spec.rb +71 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/cycle_spec.rb +76 -0
- data/spec/spec_helper.rb +111 -0
- metadata +121 -0
data/docs/DefaultApi.md
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
# EndOfLifeDateApiClient::DefaultApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://endoflife.date*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_api_all_json**](DefaultApi.md#get_api_all_json) | **GET** /api/all.json | All Products |
|
8
|
+
| [**get_api_product_cycle_json**](DefaultApi.md#get_api_product_cycle_json) | **GET** /api/{product}/{cycle}.json | Single cycle details |
|
9
|
+
| [**get_api_product_json**](DefaultApi.md#get_api_product_json) | **GET** /api/{product}.json | Get All Details |
|
10
|
+
|
11
|
+
|
12
|
+
## get_api_all_json
|
13
|
+
|
14
|
+
> Object get_api_all_json
|
15
|
+
|
16
|
+
All Products
|
17
|
+
|
18
|
+
Return a list of all products. Each of these can be used for the other API endpoints.
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'endoflife_date'
|
25
|
+
|
26
|
+
api_instance = EndOfLifeDateApiClient::DefaultApi.new
|
27
|
+
|
28
|
+
begin
|
29
|
+
# All Products
|
30
|
+
result = api_instance.get_api_all_json
|
31
|
+
p result
|
32
|
+
rescue EndOfLifeDateApiClient::ApiError => e
|
33
|
+
puts "Error when calling DefaultApi->get_api_all_json: #{e}"
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
#### Using the get_api_all_json_with_http_info variant
|
38
|
+
|
39
|
+
This returns an Array which contains the response data, status code and headers.
|
40
|
+
|
41
|
+
> <Array(Object, Integer, Hash)> get_api_all_json_with_http_info
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
begin
|
45
|
+
# All Products
|
46
|
+
data, status_code, headers = api_instance.get_api_all_json_with_http_info
|
47
|
+
p status_code # => 2xx
|
48
|
+
p headers # => { ... }
|
49
|
+
p data # => Object
|
50
|
+
rescue EndOfLifeDateApiClient::ApiError => e
|
51
|
+
puts "Error when calling DefaultApi->get_api_all_json_with_http_info: #{e}"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Parameters
|
56
|
+
|
57
|
+
This endpoint does not need any parameter.
|
58
|
+
|
59
|
+
### Return type
|
60
|
+
|
61
|
+
**Object**
|
62
|
+
|
63
|
+
### Authorization
|
64
|
+
|
65
|
+
No authorization required
|
66
|
+
|
67
|
+
### HTTP request headers
|
68
|
+
|
69
|
+
- **Content-Type**: Not defined
|
70
|
+
- **Accept**: application/json
|
71
|
+
|
72
|
+
|
73
|
+
## get_api_product_cycle_json
|
74
|
+
|
75
|
+
> <Cycle> get_api_product_cycle_json(product, cycle)
|
76
|
+
|
77
|
+
Single cycle details
|
78
|
+
|
79
|
+
Gets details of a single cycle
|
80
|
+
|
81
|
+
### Examples
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
require 'time'
|
85
|
+
require 'endoflife_date'
|
86
|
+
|
87
|
+
api_instance = EndOfLifeDateApiClient::DefaultApi.new
|
88
|
+
product = TODO # Object | Product URL as per the canonical URL on the endofife.date website
|
89
|
+
cycle = TODO # Object | Release Cycle for which the details must be fetched
|
90
|
+
|
91
|
+
begin
|
92
|
+
# Single cycle details
|
93
|
+
result = api_instance.get_api_product_cycle_json(product, cycle)
|
94
|
+
p result
|
95
|
+
rescue EndOfLifeDateApiClient::ApiError => e
|
96
|
+
puts "Error when calling DefaultApi->get_api_product_cycle_json: #{e}"
|
97
|
+
end
|
98
|
+
```
|
99
|
+
|
100
|
+
#### Using the get_api_product_cycle_json_with_http_info variant
|
101
|
+
|
102
|
+
This returns an Array which contains the response data, status code and headers.
|
103
|
+
|
104
|
+
> <Array(<Cycle>, Integer, Hash)> get_api_product_cycle_json_with_http_info(product, cycle)
|
105
|
+
|
106
|
+
```ruby
|
107
|
+
begin
|
108
|
+
# Single cycle details
|
109
|
+
data, status_code, headers = api_instance.get_api_product_cycle_json_with_http_info(product, cycle)
|
110
|
+
p status_code # => 2xx
|
111
|
+
p headers # => { ... }
|
112
|
+
p data # => <Cycle>
|
113
|
+
rescue EndOfLifeDateApiClient::ApiError => e
|
114
|
+
puts "Error when calling DefaultApi->get_api_product_cycle_json_with_http_info: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
### Parameters
|
119
|
+
|
120
|
+
| Name | Type | Description | Notes |
|
121
|
+
| ---- | ---- | ----------- | ----- |
|
122
|
+
| **product** | [**Object**](.md) | Product URL as per the canonical URL on the endofife.date website | |
|
123
|
+
| **cycle** | [**Object**](.md) | Release Cycle for which the details must be fetched | |
|
124
|
+
|
125
|
+
### Return type
|
126
|
+
|
127
|
+
[**Cycle**](Cycle.md)
|
128
|
+
|
129
|
+
### Authorization
|
130
|
+
|
131
|
+
No authorization required
|
132
|
+
|
133
|
+
### HTTP request headers
|
134
|
+
|
135
|
+
- **Content-Type**: Not defined
|
136
|
+
- **Accept**: application/json
|
137
|
+
|
138
|
+
|
139
|
+
## get_api_product_json
|
140
|
+
|
141
|
+
> Object get_api_product_json(product)
|
142
|
+
|
143
|
+
Get All Details
|
144
|
+
|
145
|
+
Get EoL dates of all cycles of a given product.
|
146
|
+
|
147
|
+
### Examples
|
148
|
+
|
149
|
+
```ruby
|
150
|
+
require 'time'
|
151
|
+
require 'endoflife_date'
|
152
|
+
|
153
|
+
api_instance = EndOfLifeDateApiClient::DefaultApi.new
|
154
|
+
product = TODO # Object | Product URL as per the canonical URL on the endofife.date website
|
155
|
+
|
156
|
+
begin
|
157
|
+
# Get All Details
|
158
|
+
result = api_instance.get_api_product_json(product)
|
159
|
+
p result
|
160
|
+
rescue EndOfLifeDateApiClient::ApiError => e
|
161
|
+
puts "Error when calling DefaultApi->get_api_product_json: #{e}"
|
162
|
+
end
|
163
|
+
```
|
164
|
+
|
165
|
+
#### Using the get_api_product_json_with_http_info variant
|
166
|
+
|
167
|
+
This returns an Array which contains the response data, status code and headers.
|
168
|
+
|
169
|
+
> <Array(Object, Integer, Hash)> get_api_product_json_with_http_info(product)
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
begin
|
173
|
+
# Get All Details
|
174
|
+
data, status_code, headers = api_instance.get_api_product_json_with_http_info(product)
|
175
|
+
p status_code # => 2xx
|
176
|
+
p headers # => { ... }
|
177
|
+
p data # => Object
|
178
|
+
rescue EndOfLifeDateApiClient::ApiError => e
|
179
|
+
puts "Error when calling DefaultApi->get_api_product_json_with_http_info: #{e}"
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
### Parameters
|
184
|
+
|
185
|
+
| Name | Type | Description | Notes |
|
186
|
+
| ---- | ---- | ----------- | ----- |
|
187
|
+
| **product** | [**Object**](.md) | Product URL as per the canonical URL on the endofife.date website | |
|
188
|
+
|
189
|
+
### Return type
|
190
|
+
|
191
|
+
**Object**
|
192
|
+
|
193
|
+
### Authorization
|
194
|
+
|
195
|
+
No authorization required
|
196
|
+
|
197
|
+
### HTTP request headers
|
198
|
+
|
199
|
+
- **Content-Type**: Not defined
|
200
|
+
- **Accept**: application/json
|
201
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#endoflife.date
|
5
|
+
|
6
|
+
#Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.0.1
|
9
|
+
Contact: blah@cliffano.com
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 7.0.0
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "endoflife_date/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "endoflife_date"
|
20
|
+
s.version = EndOfLifeDateApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cliffano Subagio"]
|
23
|
+
s.email = ["blah@cliffano.com"]
|
24
|
+
s.homepage = "https://github.com/cliffano/endoflife.date-api-clients"
|
25
|
+
s.summary = "endoflife.date Ruby Gem"
|
26
|
+
s.description = "Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)"
|
27
|
+
s.license = "MIT"
|
28
|
+
s.required_ruby_version = ">= 2.0"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
|
32
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
33
|
+
|
34
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
35
|
+
s.test_files = `find spec/*`.split("\n")
|
36
|
+
s.executables = []
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
end
|
data/git_push.sh
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="cliffano"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="endoflife.date-api-clients"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=$(git remote)
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
@@ -0,0 +1,211 @@
|
|
1
|
+
=begin
|
2
|
+
#endoflife.date
|
3
|
+
|
4
|
+
#Documentation for the endoflife.date API. The API is currently in Alpha. Additional information about the API can be found on the [endoflife.date wiki](https://github.com/endoflife-date/endoflife.date/wiki)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
7
|
+
Contact: blah@cliffano.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module EndOfLifeDateApiClient
|
16
|
+
class DefaultApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# All Products
|
23
|
+
# Return a list of all products. Each of these can be used for the other API endpoints.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Object]
|
26
|
+
def get_api_all_json(opts = {})
|
27
|
+
data, _status_code, _headers = get_api_all_json_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# All Products
|
32
|
+
# Return a list of all products. Each of these can be used for the other API endpoints.
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
35
|
+
def get_api_all_json_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_api_all_json ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/api/all.json'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:debug_body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:debug_return_type] || 'Object'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:operation => :"DefaultApi.get_api_all_json",
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_api_all_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
|
79
|
+
# Single cycle details
|
80
|
+
# Gets details of a single cycle
|
81
|
+
# @param product [Object] Product URL as per the canonical URL on the endofife.date website
|
82
|
+
# @param cycle [Object] Release Cycle for which the details must be fetched
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [Cycle]
|
85
|
+
def get_api_product_cycle_json(product, cycle, opts = {})
|
86
|
+
data, _status_code, _headers = get_api_product_cycle_json_with_http_info(product, cycle, opts)
|
87
|
+
data
|
88
|
+
end
|
89
|
+
|
90
|
+
# Single cycle details
|
91
|
+
# Gets details of a single cycle
|
92
|
+
# @param product [Object] Product URL as per the canonical URL on the endofife.date website
|
93
|
+
# @param cycle [Object] Release Cycle for which the details must be fetched
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [Array<(Cycle, Integer, Hash)>] Cycle data, response status code and response headers
|
96
|
+
def get_api_product_cycle_json_with_http_info(product, cycle, opts = {})
|
97
|
+
if @api_client.config.debugging
|
98
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_api_product_cycle_json ...'
|
99
|
+
end
|
100
|
+
# verify the required parameter 'product' is set
|
101
|
+
if @api_client.config.client_side_validation && product.nil?
|
102
|
+
fail ArgumentError, "Missing the required parameter 'product' when calling DefaultApi.get_api_product_cycle_json"
|
103
|
+
end
|
104
|
+
# verify the required parameter 'cycle' is set
|
105
|
+
if @api_client.config.client_side_validation && cycle.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'cycle' when calling DefaultApi.get_api_product_cycle_json"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/api/{product}/{cycle}.json'.sub('{' + 'product' + '}', CGI.escape(product.to_s)).sub('{' + 'cycle' + '}', CGI.escape(cycle.to_s))
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
118
|
+
|
119
|
+
# form parameters
|
120
|
+
form_params = opts[:form_params] || {}
|
121
|
+
|
122
|
+
# http body (model)
|
123
|
+
post_body = opts[:debug_body]
|
124
|
+
|
125
|
+
# return_type
|
126
|
+
return_type = opts[:debug_return_type] || 'Cycle'
|
127
|
+
|
128
|
+
# auth_names
|
129
|
+
auth_names = opts[:debug_auth_names] || []
|
130
|
+
|
131
|
+
new_options = opts.merge(
|
132
|
+
:operation => :"DefaultApi.get_api_product_cycle_json",
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type
|
139
|
+
)
|
140
|
+
|
141
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_api_product_cycle_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# Get All Details
|
149
|
+
# Get EoL dates of all cycles of a given product.
|
150
|
+
# @param product [Object] Product URL as per the canonical URL on the endofife.date website
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [Object]
|
153
|
+
def get_api_product_json(product, opts = {})
|
154
|
+
data, _status_code, _headers = get_api_product_json_with_http_info(product, opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# Get All Details
|
159
|
+
# Get EoL dates of all cycles of a given product.
|
160
|
+
# @param product [Object] Product URL as per the canonical URL on the endofife.date website
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
163
|
+
def get_api_product_json_with_http_info(product, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_api_product_json ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'product' is set
|
168
|
+
if @api_client.config.client_side_validation && product.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'product' when calling DefaultApi.get_api_product_json"
|
170
|
+
end
|
171
|
+
# resource path
|
172
|
+
local_var_path = '/api/{product}.json'.sub('{' + 'product' + '}', CGI.escape(product.to_s))
|
173
|
+
|
174
|
+
# query parameters
|
175
|
+
query_params = opts[:query_params] || {}
|
176
|
+
|
177
|
+
# header parameters
|
178
|
+
header_params = opts[:header_params] || {}
|
179
|
+
# HTTP header 'Accept' (if needed)
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
181
|
+
|
182
|
+
# form parameters
|
183
|
+
form_params = opts[:form_params] || {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = opts[:debug_body]
|
187
|
+
|
188
|
+
# return_type
|
189
|
+
return_type = opts[:debug_return_type] || 'Object'
|
190
|
+
|
191
|
+
# auth_names
|
192
|
+
auth_names = opts[:debug_auth_names] || []
|
193
|
+
|
194
|
+
new_options = opts.merge(
|
195
|
+
:operation => :"DefaultApi.get_api_product_json",
|
196
|
+
:header_params => header_params,
|
197
|
+
:query_params => query_params,
|
198
|
+
:form_params => form_params,
|
199
|
+
:body => post_body,
|
200
|
+
:auth_names => auth_names,
|
201
|
+
:return_type => return_type
|
202
|
+
)
|
203
|
+
|
204
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_api_product_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
+
end
|
208
|
+
return data, status_code, headers
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|