iron_functions 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +109 -0
  4. data/VERSION +1 -0
  5. data/docs/App.md +8 -0
  6. data/docs/AppWrapper.md +8 -0
  7. data/docs/AppsApi.md +197 -0
  8. data/docs/AppsWrapper.md +8 -0
  9. data/docs/Error.md +8 -0
  10. data/docs/ErrorBody.md +9 -0
  11. data/docs/NewTasksWrapper.md +8 -0
  12. data/docs/Route.md +11 -0
  13. data/docs/RouteWrapper.md +8 -0
  14. data/docs/RoutesApi.md +208 -0
  15. data/docs/RoutesWrapper.md +10 -0
  16. data/docs/Task.md +16 -0
  17. data/docs/TaskWrapper.md +8 -0
  18. data/docs/TasksApi.md +57 -0
  19. data/docs/TasksWrapper.md +10 -0
  20. data/git_push.sh +67 -0
  21. data/iron_functions.gemspec +55 -0
  22. data/lib/iron_functions/api/apps_api.rb +262 -0
  23. data/lib/iron_functions/api/routes_api.rb +273 -0
  24. data/lib/iron_functions/api/tasks_api.rb +90 -0
  25. data/lib/iron_functions/api_client.rb +378 -0
  26. data/lib/iron_functions/api_error.rb +47 -0
  27. data/lib/iron_functions/configuration.rb +207 -0
  28. data/lib/iron_functions/models/app.rb +200 -0
  29. data/lib/iron_functions/models/app_wrapper.rb +200 -0
  30. data/lib/iron_functions/models/apps_wrapper.rb +202 -0
  31. data/lib/iron_functions/models/error.rb +199 -0
  32. data/lib/iron_functions/models/error_body.rb +208 -0
  33. data/lib/iron_functions/models/new_tasks_wrapper.rb +202 -0
  34. data/lib/iron_functions/models/route.rb +230 -0
  35. data/lib/iron_functions/models/route_wrapper.rb +200 -0
  36. data/lib/iron_functions/models/routes_wrapper.rb +221 -0
  37. data/lib/iron_functions/models/task.rb +315 -0
  38. data/lib/iron_functions/models/task_wrapper.rb +200 -0
  39. data/lib/iron_functions/models/tasks_wrapper.rb +221 -0
  40. data/lib/iron_functions/version.rb +26 -0
  41. data/lib/iron_functions.rb +65 -0
  42. data/spec/api/apps_api_spec.rb +94 -0
  43. data/spec/api/routes_api_spec.rb +97 -0
  44. data/spec/api/tasks_api_spec.rb +58 -0
  45. data/spec/api_client_spec.rb +237 -0
  46. data/spec/configuration_spec.rb +53 -0
  47. data/spec/models/app_spec.rb +53 -0
  48. data/spec/models/app_wrapper_spec.rb +53 -0
  49. data/spec/models/apps_wrapper_spec.rb +53 -0
  50. data/spec/models/error_body_spec.rb +59 -0
  51. data/spec/models/error_spec.rb +53 -0
  52. data/spec/models/new_tasks_wrapper_spec.rb +53 -0
  53. data/spec/models/route_spec.rb +71 -0
  54. data/spec/models/route_wrapper_spec.rb +53 -0
  55. data/spec/models/routes_wrapper_spec.rb +65 -0
  56. data/spec/models/task_spec.rb +105 -0
  57. data/spec/models/task_wrapper_spec.rb +53 -0
  58. data/spec/models/tasks_wrapper_spec.rb +65 -0
  59. data/spec/spec_helper.rb +122 -0
  60. metadata +300 -0
@@ -0,0 +1,273 @@
1
+ =begin
2
+ #IronFunctions
3
+
4
+ #null
5
+
6
+ OpenAPI spec version: 0.0.5
7
+
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 IronFunctions
27
+ class RoutesApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Get route list by app name.
35
+ # This will list routes for a particular app.
36
+ # @param app Name of app for this set of routes.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [RoutesWrapper]
39
+ def apps_app_routes_get(app, opts = {})
40
+ data, _status_code, _headers = apps_app_routes_get_with_http_info(app, opts)
41
+ return data
42
+ end
43
+
44
+ # Get route list by app name.
45
+ # This will list routes for a particular app.
46
+ # @param app Name of app for this set of routes.
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(RoutesWrapper, Fixnum, Hash)>] RoutesWrapper data, response status code and response headers
49
+ def apps_app_routes_get_with_http_info(app, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_get ..."
52
+ end
53
+ # verify the required parameter 'app' is set
54
+ fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_get" if app.nil?
55
+ # resource path
56
+ local_var_path = "/apps/{app}/routes".sub('{format}','json').sub('{' + 'app' + '}', app.to_s)
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 = nil
77
+ auth_names = []
78
+ data, status_code, headers = @api_client.call_api(:GET, 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 => 'RoutesWrapper')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Create new Route
92
+ # Create a new route
93
+ # @param app name of the app.
94
+ # @param body Array of routes to post.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [RoutesWrapper]
97
+ def apps_app_routes_post(app, body, opts = {})
98
+ data, _status_code, _headers = apps_app_routes_post_with_http_info(app, body, opts)
99
+ return data
100
+ end
101
+
102
+ # Create new Route
103
+ # Create a new route
104
+ # @param app name of the app.
105
+ # @param body Array of routes to post.
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [Array<(RoutesWrapper, Fixnum, Hash)>] RoutesWrapper data, response status code and response headers
108
+ def apps_app_routes_post_with_http_info(app, body, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_post ..."
111
+ end
112
+ # verify the required parameter 'app' is set
113
+ fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_post" if app.nil?
114
+ # verify the required parameter 'body' is set
115
+ fail ArgumentError, "Missing the required parameter 'body' when calling RoutesApi.apps_app_routes_post" if body.nil?
116
+ # resource path
117
+ local_var_path = "/apps/{app}/routes".sub('{format}','json').sub('{' + 'app' + '}', app.to_s)
118
+
119
+ # query parameters
120
+ query_params = {}
121
+
122
+ # header parameters
123
+ header_params = {}
124
+
125
+ # HTTP header 'Accept' (if needed)
126
+ local_header_accept = ['application/json']
127
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
128
+
129
+ # HTTP header 'Content-Type'
130
+ local_header_content_type = ['application/json']
131
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
132
+
133
+ # form parameters
134
+ form_params = {}
135
+
136
+ # http body (model)
137
+ post_body = @api_client.object_to_http_body(body)
138
+ auth_names = []
139
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => 'RoutesWrapper')
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # Deletes the route
153
+ # Deletes the route.
154
+ # @param app Name of app for this set of routes.
155
+ # @param route Route name
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [nil]
158
+ def apps_app_routes_route_delete(app, route, opts = {})
159
+ apps_app_routes_route_delete_with_http_info(app, route, opts)
160
+ return nil
161
+ end
162
+
163
+ # Deletes the route
164
+ # Deletes the route.
165
+ # @param app Name of app for this set of routes.
166
+ # @param route Route name
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
169
+ def apps_app_routes_route_delete_with_http_info(app, route, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_delete ..."
172
+ end
173
+ # verify the required parameter 'app' is set
174
+ fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_delete" if app.nil?
175
+ # verify the required parameter 'route' is set
176
+ fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_delete" if route.nil?
177
+ # resource path
178
+ local_var_path = "/apps/{app}/routes/{route}".sub('{format}','json').sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.to_s)
179
+
180
+ # query parameters
181
+ query_params = {}
182
+
183
+ # header parameters
184
+ header_params = {}
185
+
186
+ # HTTP header 'Accept' (if needed)
187
+ local_header_accept = ['application/json']
188
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
189
+
190
+ # HTTP header 'Content-Type'
191
+ local_header_content_type = ['application/json']
192
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
193
+
194
+ # form parameters
195
+ form_params = {}
196
+
197
+ # http body (model)
198
+ post_body = nil
199
+ auth_names = []
200
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names)
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_route_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ end
209
+ return data, status_code, headers
210
+ end
211
+
212
+ # Gets route by name
213
+ # Gets a route by name.
214
+ # @param app Name of app for this set of routes.
215
+ # @param route Route name
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [RouteWrapper]
218
+ def apps_app_routes_route_get(app, route, opts = {})
219
+ data, _status_code, _headers = apps_app_routes_route_get_with_http_info(app, route, opts)
220
+ return data
221
+ end
222
+
223
+ # Gets route by name
224
+ # Gets a route by name.
225
+ # @param app Name of app for this set of routes.
226
+ # @param route Route name
227
+ # @param [Hash] opts the optional parameters
228
+ # @return [Array<(RouteWrapper, Fixnum, Hash)>] RouteWrapper data, response status code and response headers
229
+ def apps_app_routes_route_get_with_http_info(app, route, opts = {})
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_get ..."
232
+ end
233
+ # verify the required parameter 'app' is set
234
+ fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_get" if app.nil?
235
+ # verify the required parameter 'route' is set
236
+ fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_get" if route.nil?
237
+ # resource path
238
+ local_var_path = "/apps/{app}/routes/{route}".sub('{format}','json').sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.to_s)
239
+
240
+ # query parameters
241
+ query_params = {}
242
+
243
+ # header parameters
244
+ header_params = {}
245
+
246
+ # HTTP header 'Accept' (if needed)
247
+ local_header_accept = ['application/json']
248
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
249
+
250
+ # HTTP header 'Content-Type'
251
+ local_header_content_type = ['application/json']
252
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
253
+
254
+ # form parameters
255
+ form_params = {}
256
+
257
+ # http body (model)
258
+ post_body = nil
259
+ auth_names = []
260
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
261
+ :header_params => header_params,
262
+ :query_params => query_params,
263
+ :form_params => form_params,
264
+ :body => post_body,
265
+ :auth_names => auth_names,
266
+ :return_type => 'RouteWrapper')
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_route_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ end
270
+ return data, status_code, headers
271
+ end
272
+ end
273
+ end
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #IronFunctions
3
+
4
+ #null
5
+
6
+ OpenAPI spec version: 0.0.5
7
+
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 IronFunctions
27
+ class TasksApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Get next task.
35
+ # Gets the next task in the queue, ready for processing. Titan may return <=n tasks. Consumers should start processing tasks in order. Each returned task is set to `status` \"running\" and `started_at` is set to the current time. No other consumer can retrieve this task.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Integer] :n Number of tasks to return. (default to 1)
38
+ # @return [TasksWrapper]
39
+ def tasks_get(opts = {})
40
+ data, _status_code, _headers = tasks_get_with_http_info(opts)
41
+ return data
42
+ end
43
+
44
+ # Get next task.
45
+ # Gets the next task in the queue, ready for processing. Titan may return &lt;&#x3D;n tasks. Consumers should start processing tasks in order. Each returned task is set to &#x60;status&#x60; \&quot;running\&quot; and &#x60;started_at&#x60; is set to the current time. No other consumer can retrieve this task.
46
+ # @param [Hash] opts the optional parameters
47
+ # @option opts [Integer] :n Number of tasks to return.
48
+ # @return [Array<(TasksWrapper, Fixnum, Hash)>] TasksWrapper data, response status code and response headers
49
+ def tasks_get_with_http_info(opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: TasksApi.tasks_get ..."
52
+ end
53
+ # resource path
54
+ local_var_path = "/tasks".sub('{format}','json')
55
+
56
+ # query parameters
57
+ query_params = {}
58
+ query_params[:'n'] = opts[:'n'] if !opts[:'n'].nil?
59
+
60
+ # header parameters
61
+ header_params = {}
62
+
63
+ # HTTP header 'Accept' (if needed)
64
+ local_header_accept = ['application/json']
65
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
66
+
67
+ # HTTP header 'Content-Type'
68
+ local_header_content_type = ['application/json']
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = []
77
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => 'TasksWrapper')
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: TasksApi#tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ end
90
+ end