triglav_client 0.1.32

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.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +79 -0
  4. data/LICENSE +201 -0
  5. data/README.md +136 -0
  6. data/Rakefile +1 -0
  7. data/docs/AggregatedResourceEachResponse.md +11 -0
  8. data/docs/AuthApi.md +150 -0
  9. data/docs/BulkinsertResponse.md +8 -0
  10. data/docs/Credential.md +10 -0
  11. data/docs/ErrorModel.md +9 -0
  12. data/docs/JobEachResponse.md +12 -0
  13. data/docs/JobMessageEachResponse.md +11 -0
  14. data/docs/JobMessagesApi.md +117 -0
  15. data/docs/JobRequest.md +12 -0
  16. data/docs/JobResponse.md +14 -0
  17. data/docs/JobsApi.md +217 -0
  18. data/docs/LastJobMessageIdResponse.md +8 -0
  19. data/docs/LastMessageIdResponse.md +8 -0
  20. data/docs/MessageEachResponse.md +16 -0
  21. data/docs/MessageFetchRequest.md +10 -0
  22. data/docs/MessageRequest.md +13 -0
  23. data/docs/MessageResponse.md +16 -0
  24. data/docs/MessagesApi.md +170 -0
  25. data/docs/ResourceEachResponse.md +13 -0
  26. data/docs/ResourceRequest.md +15 -0
  27. data/docs/ResourceResponse.md +17 -0
  28. data/docs/ResourcesApi.md +335 -0
  29. data/docs/TokenResponse.md +9 -0
  30. data/docs/UserEachResponse.md +11 -0
  31. data/docs/UserRequest.md +13 -0
  32. data/docs/UserResponse.md +15 -0
  33. data/docs/UsersApi.md +274 -0
  34. data/example/example.rb +40 -0
  35. data/git_push.sh +67 -0
  36. data/lib/triglav_client.rb +77 -0
  37. data/lib/triglav_client/api/auth_api.rb +196 -0
  38. data/lib/triglav_client/api/job_messages_api.rb +153 -0
  39. data/lib/triglav_client/api/jobs_api.rb +257 -0
  40. data/lib/triglav_client/api/messages_api.rb +208 -0
  41. data/lib/triglav_client/api/resources_api.rb +379 -0
  42. data/lib/triglav_client/api/users_api.rb +318 -0
  43. data/lib/triglav_client/api_client.rb +379 -0
  44. data/lib/triglav_client/api_error.rb +47 -0
  45. data/lib/triglav_client/configuration.rb +214 -0
  46. data/lib/triglav_client/models/aggregated_resource_each_response.rb +230 -0
  47. data/lib/triglav_client/models/bulkinsert_response.rb +200 -0
  48. data/lib/triglav_client/models/credential.rb +252 -0
  49. data/lib/triglav_client/models/error_model.rb +212 -0
  50. data/lib/triglav_client/models/job_each_response.rb +235 -0
  51. data/lib/triglav_client/models/job_message_each_response.rb +229 -0
  52. data/lib/triglav_client/models/job_request.rb +241 -0
  53. data/lib/triglav_client/models/job_response.rb +259 -0
  54. data/lib/triglav_client/models/last_job_message_id_response.rb +200 -0
  55. data/lib/triglav_client/models/last_message_id_response.rb +200 -0
  56. data/lib/triglav_client/models/message_each_response.rb +281 -0
  57. data/lib/triglav_client/models/message_fetch_request.rb +223 -0
  58. data/lib/triglav_client/models/message_request.rb +254 -0
  59. data/lib/triglav_client/models/message_response.rb +281 -0
  60. data/lib/triglav_client/models/resource_each_response.rb +250 -0
  61. data/lib/triglav_client/models/resource_request.rb +269 -0
  62. data/lib/triglav_client/models/resource_response.rb +287 -0
  63. data/lib/triglav_client/models/token_response.rb +208 -0
  64. data/lib/triglav_client/models/user_each_response.rb +262 -0
  65. data/lib/triglav_client/models/user_request.rb +280 -0
  66. data/lib/triglav_client/models/user_response.rb +300 -0
  67. data/lib/triglav_client/version.rb +26 -0
  68. data/spec/api/auth_api_spec.rb +80 -0
  69. data/spec/api/job_messages_api_spec.rb +71 -0
  70. data/spec/api/jobs_api_spec.rb +93 -0
  71. data/spec/api/messages_api_spec.rb +74 -0
  72. data/spec/api/resources_api_spec.rb +109 -0
  73. data/spec/api/users_api_spec.rb +106 -0
  74. data/spec/api_client_spec.rb +237 -0
  75. data/spec/configuration_spec.rb +53 -0
  76. data/spec/models/aggregated_resource_each_response_spec.rb +71 -0
  77. data/spec/models/bulkinsert_response_spec.rb +53 -0
  78. data/spec/models/credential_spec.rb +69 -0
  79. data/spec/models/error_model_spec.rb +59 -0
  80. data/spec/models/job_each_response_spec.rb +77 -0
  81. data/spec/models/job_message_each_response_spec.rb +65 -0
  82. data/spec/models/job_request_spec.rb +71 -0
  83. data/spec/models/job_response_spec.rb +89 -0
  84. data/spec/models/last_job_message_id_response_spec.rb +53 -0
  85. data/spec/models/last_message_id_response_spec.rb +53 -0
  86. data/spec/models/message_each_response_spec.rb +89 -0
  87. data/spec/models/message_fetch_request_spec.rb +65 -0
  88. data/spec/models/message_request_spec.rb +59 -0
  89. data/spec/models/message_response_spec.rb +89 -0
  90. data/spec/models/resource_each_response_spec.rb +71 -0
  91. data/spec/models/resource_request_spec.rb +83 -0
  92. data/spec/models/resource_response_spec.rb +101 -0
  93. data/spec/models/token_response_spec.rb +59 -0
  94. data/spec/models/user_each_response_spec.rb +75 -0
  95. data/spec/models/user_request_spec.rb +87 -0
  96. data/spec/models/user_response_spec.rb +99 -0
  97. data/spec/spec_helper.rb +122 -0
  98. data/triglav_client.gemspec +55 -0
  99. metadata +351 -0
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #Triglav API
3
+
4
+ #Triglav API
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: triglav_admin_my@dena.jp
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module TriglavClient
27
+ class AuthApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ #
35
+ # Creates a new token
36
+ # @param credential
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [TokenResponse]
39
+ def create_token(credential, opts = {})
40
+ data, _status_code, _headers = create_token_with_http_info(credential, opts)
41
+ return data
42
+ end
43
+
44
+ #
45
+ # Creates a new token
46
+ # @param credential
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(TokenResponse, Fixnum, Hash)>] TokenResponse data, response status code and response headers
49
+ def create_token_with_http_info(credential, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: AuthApi.create_token ..."
52
+ end
53
+ # verify the required parameter 'credential' is set
54
+ fail ArgumentError, "Missing the required parameter 'credential' when calling AuthApi.create_token" if credential.nil?
55
+ # resource path
56
+ local_var_path = "/auth/token".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = ['application/json']
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(credential)
77
+ auth_names = []
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'TokenResponse')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: AuthApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ #
92
+ # Deletes (Expires) a token of header
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def delete_token(opts = {})
96
+ delete_token_with_http_info(opts)
97
+ return nil
98
+ end
99
+
100
+ #
101
+ # Deletes (Expires) a token of header
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
104
+ def delete_token_with_http_info(opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug "Calling API: AuthApi.delete_token ..."
107
+ end
108
+ # resource path
109
+ local_var_path = "/auth/token".sub('{format}','json')
110
+
111
+ # query parameters
112
+ query_params = {}
113
+
114
+ # header parameters
115
+ header_params = {}
116
+
117
+ # HTTP header 'Accept' (if needed)
118
+ local_header_accept = ['application/json']
119
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
120
+
121
+ # HTTP header 'Content-Type'
122
+ local_header_content_type = ['application/json']
123
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
124
+
125
+ # form parameters
126
+ form_params = {}
127
+
128
+ # http body (model)
129
+ post_body = nil
130
+ auth_names = ['api_key']
131
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names)
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: AuthApi#delete_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+
143
+ #
144
+ # Returns a user property of the access_token
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [UserResponse]
147
+ def me(opts = {})
148
+ data, _status_code, _headers = me_with_http_info(opts)
149
+ return data
150
+ end
151
+
152
+ #
153
+ # Returns a user property of the access_token
154
+ # @param [Hash] opts the optional parameters
155
+ # @return [Array<(UserResponse, Fixnum, Hash)>] UserResponse data, response status code and response headers
156
+ def me_with_http_info(opts = {})
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "Calling API: AuthApi.me ..."
159
+ end
160
+ # resource path
161
+ local_var_path = "/auth/me".sub('{format}','json')
162
+
163
+ # query parameters
164
+ query_params = {}
165
+
166
+ # header parameters
167
+ header_params = {}
168
+
169
+ # HTTP header 'Accept' (if needed)
170
+ local_header_accept = ['application/json']
171
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
172
+
173
+ # HTTP header 'Content-Type'
174
+ local_header_content_type = ['application/json']
175
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
176
+
177
+ # form parameters
178
+ form_params = {}
179
+
180
+ # http body (model)
181
+ post_body = nil
182
+ auth_names = ['api_key']
183
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
184
+ :header_params => header_params,
185
+ :query_params => query_params,
186
+ :form_params => form_params,
187
+ :body => post_body,
188
+ :auth_names => auth_names,
189
+ :return_type => 'UserResponse')
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: AuthApi#me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,153 @@
1
+ =begin
2
+ #Triglav API
3
+
4
+ #Triglav API
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: triglav_admin_my@dena.jp
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module TriglavClient
27
+ class JobMessagesApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ #
35
+ # Fetch Job messages
36
+ # @param offset Offset (Greater than or equal to) ID for Messages to fetch from
37
+ # @param job_id Job ID
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Integer] :limit Number of limits
40
+ # @return [Array<JobMessageEachResponse>]
41
+ def fetch_job_messages(offset, job_id, opts = {})
42
+ data, _status_code, _headers = fetch_job_messages_with_http_info(offset, job_id, opts)
43
+ return data
44
+ end
45
+
46
+ #
47
+ # Fetch Job messages
48
+ # @param offset Offset (Greater than or equal to) ID for Messages to fetch from
49
+ # @param job_id Job ID
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [Integer] :limit Number of limits
52
+ # @return [Array<(Array<JobMessageEachResponse>, Fixnum, Hash)>] Array<JobMessageEachResponse> data, response status code and response headers
53
+ def fetch_job_messages_with_http_info(offset, job_id, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug "Calling API: JobMessagesApi.fetch_job_messages ..."
56
+ end
57
+ # verify the required parameter 'offset' is set
58
+ fail ArgumentError, "Missing the required parameter 'offset' when calling JobMessagesApi.fetch_job_messages" if offset.nil?
59
+ # verify the required parameter 'job_id' is set
60
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobMessagesApi.fetch_job_messages" if job_id.nil?
61
+ # resource path
62
+ local_var_path = "/job_messages".sub('{format}','json')
63
+
64
+ # query parameters
65
+ query_params = {}
66
+ query_params[:'offset'] = offset
67
+ query_params[:'job_id'] = job_id
68
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
69
+
70
+ # header parameters
71
+ header_params = {}
72
+
73
+ # HTTP header 'Accept' (if needed)
74
+ local_header_accept = ['application/json']
75
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
76
+
77
+ # HTTP header 'Content-Type'
78
+ local_header_content_type = ['application/json']
79
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
80
+
81
+ # form parameters
82
+ form_params = {}
83
+
84
+ # http body (model)
85
+ post_body = nil
86
+ auth_names = ['api_key']
87
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
88
+ :header_params => header_params,
89
+ :query_params => query_params,
90
+ :form_params => form_params,
91
+ :body => post_body,
92
+ :auth_names => auth_names,
93
+ :return_type => 'Array<JobMessageEachResponse>')
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "API called: JobMessagesApi#fetch_job_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
96
+ end
97
+ return data, status_code, headers
98
+ end
99
+
100
+ #
101
+ # Get the current last message id which would be used as a first offset to fetch messages
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [LastJobMessageIdResponse]
104
+ def get_last_job_message_id(opts = {})
105
+ data, _status_code, _headers = get_last_job_message_id_with_http_info(opts)
106
+ return data
107
+ end
108
+
109
+ #
110
+ # Get the current last message id which would be used as a first offset to fetch messages
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(LastJobMessageIdResponse, Fixnum, Hash)>] LastJobMessageIdResponse data, response status code and response headers
113
+ def get_last_job_message_id_with_http_info(opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug "Calling API: JobMessagesApi.get_last_job_message_id ..."
116
+ end
117
+ # resource path
118
+ local_var_path = "/job_messages/last_id".sub('{format}','json')
119
+
120
+ # query parameters
121
+ query_params = {}
122
+
123
+ # header parameters
124
+ header_params = {}
125
+
126
+ # HTTP header 'Accept' (if needed)
127
+ local_header_accept = ['application/json']
128
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
129
+
130
+ # HTTP header 'Content-Type'
131
+ local_header_content_type = ['application/json']
132
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
133
+
134
+ # form parameters
135
+ form_params = {}
136
+
137
+ # http body (model)
138
+ post_body = nil
139
+ auth_names = ['api_key']
140
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => 'LastJobMessageIdResponse')
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: JobMessagesApi#get_last_job_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+ end
153
+ end
@@ -0,0 +1,257 @@
1
+ =begin
2
+ #Triglav API
3
+
4
+ #Triglav API
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: triglav_admin_my@dena.jp
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module TriglavClient
27
+ class JobsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ #
35
+ # Creates or Updates a single job
36
+ # @param job Job parameters
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [JobResponse]
39
+ def create_or_update_job(job, opts = {})
40
+ data, _status_code, _headers = create_or_update_job_with_http_info(job, opts)
41
+ return data
42
+ end
43
+
44
+ #
45
+ # Creates or Updates a single job
46
+ # @param job Job parameters
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(JobResponse, Fixnum, Hash)>] JobResponse data, response status code and response headers
49
+ def create_or_update_job_with_http_info(job, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: JobsApi.create_or_update_job ..."
52
+ end
53
+ # verify the required parameter 'job' is set
54
+ fail ArgumentError, "Missing the required parameter 'job' when calling JobsApi.create_or_update_job" if job.nil?
55
+ # resource path
56
+ local_var_path = "/jobs".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = ['application/json']
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(job)
77
+ auth_names = ['api_key']
78
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'JobResponse')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: JobsApi#create_or_update_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ #
92
+ # Deletes single job
93
+ # @param id_or_uri ID or URI of job to fetch
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [nil]
96
+ def delete_job(id_or_uri, opts = {})
97
+ delete_job_with_http_info(id_or_uri, opts)
98
+ return nil
99
+ end
100
+
101
+ #
102
+ # Deletes single job
103
+ # @param id_or_uri ID or URI of job to fetch
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
106
+ def delete_job_with_http_info(id_or_uri, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: JobsApi.delete_job ..."
109
+ end
110
+ # verify the required parameter 'id_or_uri' is set
111
+ fail ArgumentError, "Missing the required parameter 'id_or_uri' when calling JobsApi.delete_job" if id_or_uri.nil?
112
+ # resource path
113
+ local_var_path = "/jobs/{id_or_uri}".sub('{format}','json').sub('{' + 'id_or_uri' + '}', id_or_uri.to_s)
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+
121
+ # HTTP header 'Accept' (if needed)
122
+ local_header_accept = ['application/json']
123
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
+
125
+ # HTTP header 'Content-Type'
126
+ local_header_content_type = ['application/json']
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = nil
134
+ auth_names = ['api_key']
135
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: JobsApi#delete_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+
147
+ #
148
+ # Returns a single job
149
+ # @param id_or_uri ID or URI of job to fetch
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [JobResponse]
152
+ def get_job(id_or_uri, opts = {})
153
+ data, _status_code, _headers = get_job_with_http_info(id_or_uri, opts)
154
+ return data
155
+ end
156
+
157
+ #
158
+ # Returns a single job
159
+ # @param id_or_uri ID or URI of job to fetch
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(JobResponse, Fixnum, Hash)>] JobResponse data, response status code and response headers
162
+ def get_job_with_http_info(id_or_uri, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug "Calling API: JobsApi.get_job ..."
165
+ end
166
+ # verify the required parameter 'id_or_uri' is set
167
+ fail ArgumentError, "Missing the required parameter 'id_or_uri' when calling JobsApi.get_job" if id_or_uri.nil?
168
+ # resource path
169
+ local_var_path = "/jobs/{id_or_uri}".sub('{format}','json').sub('{' + 'id_or_uri' + '}', id_or_uri.to_s)
170
+
171
+ # query parameters
172
+ query_params = {}
173
+
174
+ # header parameters
175
+ header_params = {}
176
+
177
+ # HTTP header 'Accept' (if needed)
178
+ local_header_accept = ['application/json']
179
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
180
+
181
+ # HTTP header 'Content-Type'
182
+ local_header_content_type = ['application/json']
183
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
184
+
185
+ # form parameters
186
+ form_params = {}
187
+
188
+ # http body (model)
189
+ post_body = nil
190
+ auth_names = ['api_key']
191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => 'JobResponse')
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug "API called: JobsApi#get_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
200
+ end
201
+ return data, status_code, headers
202
+ end
203
+
204
+ #
205
+ # Returns all jobs
206
+ # @param [Hash] opts the optional parameters
207
+ # @return [Array<JobEachResponse>]
208
+ def list_jobs(opts = {})
209
+ data, _status_code, _headers = list_jobs_with_http_info(opts)
210
+ return data
211
+ end
212
+
213
+ #
214
+ # Returns all jobs
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [Array<(Array<JobEachResponse>, Fixnum, Hash)>] Array<JobEachResponse> data, response status code and response headers
217
+ def list_jobs_with_http_info(opts = {})
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "Calling API: JobsApi.list_jobs ..."
220
+ end
221
+ # resource path
222
+ local_var_path = "/jobs".sub('{format}','json')
223
+
224
+ # query parameters
225
+ query_params = {}
226
+
227
+ # header parameters
228
+ header_params = {}
229
+
230
+ # HTTP header 'Accept' (if needed)
231
+ local_header_accept = ['application/json']
232
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
233
+
234
+ # HTTP header 'Content-Type'
235
+ local_header_content_type = ['application/json']
236
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
237
+
238
+ # form parameters
239
+ form_params = {}
240
+
241
+ # http body (model)
242
+ post_body = nil
243
+ auth_names = ['api_key']
244
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
245
+ :header_params => header_params,
246
+ :query_params => query_params,
247
+ :form_params => form_params,
248
+ :body => post_body,
249
+ :auth_names => auth_names,
250
+ :return_type => 'Array<JobEachResponse>')
251
+ if @api_client.config.debugging
252
+ @api_client.config.logger.debug "API called: JobsApi#list_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
253
+ end
254
+ return data, status_code, headers
255
+ end
256
+ end
257
+ end