iron_functions 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +109 -0
- data/VERSION +1 -0
- data/docs/App.md +8 -0
- data/docs/AppWrapper.md +8 -0
- data/docs/AppsApi.md +197 -0
- data/docs/AppsWrapper.md +8 -0
- data/docs/Error.md +8 -0
- data/docs/ErrorBody.md +9 -0
- data/docs/NewTasksWrapper.md +8 -0
- data/docs/Route.md +11 -0
- data/docs/RouteWrapper.md +8 -0
- data/docs/RoutesApi.md +208 -0
- data/docs/RoutesWrapper.md +10 -0
- data/docs/Task.md +16 -0
- data/docs/TaskWrapper.md +8 -0
- data/docs/TasksApi.md +57 -0
- data/docs/TasksWrapper.md +10 -0
- data/git_push.sh +67 -0
- data/iron_functions.gemspec +55 -0
- data/lib/iron_functions/api/apps_api.rb +262 -0
- data/lib/iron_functions/api/routes_api.rb +273 -0
- data/lib/iron_functions/api/tasks_api.rb +90 -0
- data/lib/iron_functions/api_client.rb +378 -0
- data/lib/iron_functions/api_error.rb +47 -0
- data/lib/iron_functions/configuration.rb +207 -0
- data/lib/iron_functions/models/app.rb +200 -0
- data/lib/iron_functions/models/app_wrapper.rb +200 -0
- data/lib/iron_functions/models/apps_wrapper.rb +202 -0
- data/lib/iron_functions/models/error.rb +199 -0
- data/lib/iron_functions/models/error_body.rb +208 -0
- data/lib/iron_functions/models/new_tasks_wrapper.rb +202 -0
- data/lib/iron_functions/models/route.rb +230 -0
- data/lib/iron_functions/models/route_wrapper.rb +200 -0
- data/lib/iron_functions/models/routes_wrapper.rb +221 -0
- data/lib/iron_functions/models/task.rb +315 -0
- data/lib/iron_functions/models/task_wrapper.rb +200 -0
- data/lib/iron_functions/models/tasks_wrapper.rb +221 -0
- data/lib/iron_functions/version.rb +26 -0
- data/lib/iron_functions.rb +65 -0
- data/spec/api/apps_api_spec.rb +94 -0
- data/spec/api/routes_api_spec.rb +97 -0
- data/spec/api/tasks_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/models/app_spec.rb +53 -0
- data/spec/models/app_wrapper_spec.rb +53 -0
- data/spec/models/apps_wrapper_spec.rb +53 -0
- data/spec/models/error_body_spec.rb +59 -0
- data/spec/models/error_spec.rb +53 -0
- data/spec/models/new_tasks_wrapper_spec.rb +53 -0
- data/spec/models/route_spec.rb +71 -0
- data/spec/models/route_wrapper_spec.rb +53 -0
- data/spec/models/routes_wrapper_spec.rb +65 -0
- data/spec/models/task_spec.rb +105 -0
- data/spec/models/task_wrapper_spec.rb +53 -0
- data/spec/models/tasks_wrapper_spec.rb +65 -0
- data/spec/spec_helper.rb +122 -0
- metadata +300 -0
data/docs/RoutesApi.md
ADDED
@@ -0,0 +1,208 @@
|
|
1
|
+
# IronFunctions::RoutesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://127.0.0.1:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**apps_app_routes_get**](RoutesApi.md#apps_app_routes_get) | **GET** /apps/{app}/routes | Get route list by app name.
|
8
|
+
[**apps_app_routes_post**](RoutesApi.md#apps_app_routes_post) | **POST** /apps/{app}/routes | Create new Route
|
9
|
+
[**apps_app_routes_route_delete**](RoutesApi.md#apps_app_routes_route_delete) | **DELETE** /apps/{app}/routes/{route} | Deletes the route
|
10
|
+
[**apps_app_routes_route_get**](RoutesApi.md#apps_app_routes_route_get) | **GET** /apps/{app}/routes/{route} | Gets route by name
|
11
|
+
|
12
|
+
|
13
|
+
# **apps_app_routes_get**
|
14
|
+
> RoutesWrapper apps_app_routes_get(app)
|
15
|
+
|
16
|
+
Get route list by app name.
|
17
|
+
|
18
|
+
This will list routes for a particular app.
|
19
|
+
|
20
|
+
### Example
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'iron_functions'
|
24
|
+
|
25
|
+
api_instance = IronFunctions::RoutesApi.new
|
26
|
+
|
27
|
+
app = "app_example" # String | Name of app for this set of routes.
|
28
|
+
|
29
|
+
|
30
|
+
begin
|
31
|
+
#Get route list by app name.
|
32
|
+
result = api_instance.apps_app_routes_get(app)
|
33
|
+
p result
|
34
|
+
rescue IronFunctions::ApiError => e
|
35
|
+
puts "Exception when calling RoutesApi->apps_app_routes_get: #{e}"
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
### Parameters
|
40
|
+
|
41
|
+
Name | Type | Description | Notes
|
42
|
+
------------- | ------------- | ------------- | -------------
|
43
|
+
**app** | **String**| Name of app for this set of routes. |
|
44
|
+
|
45
|
+
### Return type
|
46
|
+
|
47
|
+
[**RoutesWrapper**](RoutesWrapper.md)
|
48
|
+
|
49
|
+
### Authorization
|
50
|
+
|
51
|
+
No authorization required
|
52
|
+
|
53
|
+
### HTTP request headers
|
54
|
+
|
55
|
+
- **Content-Type**: application/json
|
56
|
+
- **Accept**: application/json
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
# **apps_app_routes_post**
|
61
|
+
> RoutesWrapper apps_app_routes_post(app, body)
|
62
|
+
|
63
|
+
Create new Route
|
64
|
+
|
65
|
+
Create a new route
|
66
|
+
|
67
|
+
### Example
|
68
|
+
```ruby
|
69
|
+
# load the gem
|
70
|
+
require 'iron_functions'
|
71
|
+
|
72
|
+
api_instance = IronFunctions::RoutesApi.new
|
73
|
+
|
74
|
+
app = "app_example" # String | name of the app.
|
75
|
+
|
76
|
+
body = IronFunctions::NewRoutesWrapper.new # NewRoutesWrapper | Array of routes to post.
|
77
|
+
|
78
|
+
|
79
|
+
begin
|
80
|
+
#Create new Route
|
81
|
+
result = api_instance.apps_app_routes_post(app, body)
|
82
|
+
p result
|
83
|
+
rescue IronFunctions::ApiError => e
|
84
|
+
puts "Exception when calling RoutesApi->apps_app_routes_post: #{e}"
|
85
|
+
end
|
86
|
+
```
|
87
|
+
|
88
|
+
### Parameters
|
89
|
+
|
90
|
+
Name | Type | Description | Notes
|
91
|
+
------------- | ------------- | ------------- | -------------
|
92
|
+
**app** | **String**| name of the app. |
|
93
|
+
**body** | [**NewRoutesWrapper**](NewRoutesWrapper.md)| Array of routes to post. |
|
94
|
+
|
95
|
+
### Return type
|
96
|
+
|
97
|
+
[**RoutesWrapper**](RoutesWrapper.md)
|
98
|
+
|
99
|
+
### Authorization
|
100
|
+
|
101
|
+
No authorization required
|
102
|
+
|
103
|
+
### HTTP request headers
|
104
|
+
|
105
|
+
- **Content-Type**: application/json
|
106
|
+
- **Accept**: application/json
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
# **apps_app_routes_route_delete**
|
111
|
+
> apps_app_routes_route_delete(app, route)
|
112
|
+
|
113
|
+
Deletes the route
|
114
|
+
|
115
|
+
Deletes the route.
|
116
|
+
|
117
|
+
### Example
|
118
|
+
```ruby
|
119
|
+
# load the gem
|
120
|
+
require 'iron_functions'
|
121
|
+
|
122
|
+
api_instance = IronFunctions::RoutesApi.new
|
123
|
+
|
124
|
+
app = "app_example" # String | Name of app for this set of routes.
|
125
|
+
|
126
|
+
route = "route_example" # String | Route name
|
127
|
+
|
128
|
+
|
129
|
+
begin
|
130
|
+
#Deletes the route
|
131
|
+
api_instance.apps_app_routes_route_delete(app, route)
|
132
|
+
rescue IronFunctions::ApiError => e
|
133
|
+
puts "Exception when calling RoutesApi->apps_app_routes_route_delete: #{e}"
|
134
|
+
end
|
135
|
+
```
|
136
|
+
|
137
|
+
### Parameters
|
138
|
+
|
139
|
+
Name | Type | Description | Notes
|
140
|
+
------------- | ------------- | ------------- | -------------
|
141
|
+
**app** | **String**| Name of app for this set of routes. |
|
142
|
+
**route** | **String**| Route name |
|
143
|
+
|
144
|
+
### Return type
|
145
|
+
|
146
|
+
nil (empty response body)
|
147
|
+
|
148
|
+
### Authorization
|
149
|
+
|
150
|
+
No authorization required
|
151
|
+
|
152
|
+
### HTTP request headers
|
153
|
+
|
154
|
+
- **Content-Type**: application/json
|
155
|
+
- **Accept**: application/json
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
# **apps_app_routes_route_get**
|
160
|
+
> RouteWrapper apps_app_routes_route_get(app, route)
|
161
|
+
|
162
|
+
Gets route by name
|
163
|
+
|
164
|
+
Gets a route by name.
|
165
|
+
|
166
|
+
### Example
|
167
|
+
```ruby
|
168
|
+
# load the gem
|
169
|
+
require 'iron_functions'
|
170
|
+
|
171
|
+
api_instance = IronFunctions::RoutesApi.new
|
172
|
+
|
173
|
+
app = "app_example" # String | Name of app for this set of routes.
|
174
|
+
|
175
|
+
route = "route_example" # String | Route name
|
176
|
+
|
177
|
+
|
178
|
+
begin
|
179
|
+
#Gets route by name
|
180
|
+
result = api_instance.apps_app_routes_route_get(app, route)
|
181
|
+
p result
|
182
|
+
rescue IronFunctions::ApiError => e
|
183
|
+
puts "Exception when calling RoutesApi->apps_app_routes_route_get: #{e}"
|
184
|
+
end
|
185
|
+
```
|
186
|
+
|
187
|
+
### Parameters
|
188
|
+
|
189
|
+
Name | Type | Description | Notes
|
190
|
+
------------- | ------------- | ------------- | -------------
|
191
|
+
**app** | **String**| Name of app for this set of routes. |
|
192
|
+
**route** | **String**| Route name |
|
193
|
+
|
194
|
+
### Return type
|
195
|
+
|
196
|
+
[**RouteWrapper**](RouteWrapper.md)
|
197
|
+
|
198
|
+
### Authorization
|
199
|
+
|
200
|
+
No authorization required
|
201
|
+
|
202
|
+
### HTTP request headers
|
203
|
+
|
204
|
+
- **Content-Type**: application/json
|
205
|
+
- **Accept**: application/json
|
206
|
+
|
207
|
+
|
208
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# IronFunctions::RoutesWrapper
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**routes** | [**Array<Route>**](Route.md) | |
|
7
|
+
**cursor** | **String** | Used to paginate results. If this is returned, pass it into the same query again to get more results. | [optional]
|
8
|
+
**error** | [**ErrorBody**](ErrorBody.md) | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/Task.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# IronFunctions::Task
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**group_name** | **String** | Group this task belongs to. | [optional]
|
7
|
+
**error** | **String** | The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log. | [optional]
|
8
|
+
**reason** | **String** | Machine usable reason for task being in this state. Valid values for error status are `timeout | killed | bad_exit`. Valid values for cancelled status are `client_request`. For everything else, this is undefined. | [optional]
|
9
|
+
**created_at** | **DateTime** | Time when task was submitted. Always in UTC. | [optional]
|
10
|
+
**started_at** | **DateTime** | Time when task started execution. Always in UTC. | [optional]
|
11
|
+
**completed_at** | **DateTime** | Time when task completed, whether it was successul or failed. Always in UTC. | [optional]
|
12
|
+
**retry_of** | **String** | If this field is set, then this task is a retry of the ID in this field. | [optional]
|
13
|
+
**retry_at** | **String** | If this field is set, then this task was retried by the task referenced in this field. | [optional]
|
14
|
+
**env_vars** | **Hash<String, String>** | Env vars for the task. Comes from the ones set on the Group. | [optional]
|
15
|
+
|
16
|
+
|
data/docs/TaskWrapper.md
ADDED
data/docs/TasksApi.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# IronFunctions::TasksApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://127.0.0.1:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**tasks_get**](TasksApi.md#tasks_get) | **GET** /tasks | Get next task.
|
8
|
+
|
9
|
+
|
10
|
+
# **tasks_get**
|
11
|
+
> TasksWrapper tasks_get(opts)
|
12
|
+
|
13
|
+
Get next task.
|
14
|
+
|
15
|
+
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.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'iron_functions'
|
21
|
+
|
22
|
+
api_instance = IronFunctions::TasksApi.new
|
23
|
+
|
24
|
+
opts = {
|
25
|
+
n: 1 # Integer | Number of tasks to return.
|
26
|
+
}
|
27
|
+
|
28
|
+
begin
|
29
|
+
#Get next task.
|
30
|
+
result = api_instance.tasks_get(opts)
|
31
|
+
p result
|
32
|
+
rescue IronFunctions::ApiError => e
|
33
|
+
puts "Exception when calling TasksApi->tasks_get: #{e}"
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
### Parameters
|
38
|
+
|
39
|
+
Name | Type | Description | Notes
|
40
|
+
------------- | ------------- | ------------- | -------------
|
41
|
+
**n** | **Integer**| Number of tasks to return. | [optional] [default to 1]
|
42
|
+
|
43
|
+
### Return type
|
44
|
+
|
45
|
+
[**TasksWrapper**](TasksWrapper.md)
|
46
|
+
|
47
|
+
### Authorization
|
48
|
+
|
49
|
+
No authorization required
|
50
|
+
|
51
|
+
### HTTP request headers
|
52
|
+
|
53
|
+
- **Content-Type**: application/json
|
54
|
+
- **Accept**: application/json
|
55
|
+
|
56
|
+
|
57
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# IronFunctions::TasksWrapper
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**tasks** | [**Array<Task>**](Task.md) | |
|
7
|
+
**cursor** | **String** | Used to paginate results. If this is returned, pass it into the same query again to get more results. | [optional]
|
8
|
+
**error** | [**ErrorBody**](ErrorBody.md) | | [optional]
|
9
|
+
|
10
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
18
|
+
#
|
19
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
20
|
+
|
21
|
+
git_user_id=$1
|
22
|
+
git_repo_id=$2
|
23
|
+
release_note=$3
|
24
|
+
|
25
|
+
if [ "$git_user_id" = "" ]; then
|
26
|
+
git_user_id=""
|
27
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
28
|
+
fi
|
29
|
+
|
30
|
+
if [ "$git_repo_id" = "" ]; then
|
31
|
+
git_repo_id=""
|
32
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
33
|
+
fi
|
34
|
+
|
35
|
+
if [ "$release_note" = "" ]; then
|
36
|
+
release_note=""
|
37
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
38
|
+
fi
|
39
|
+
|
40
|
+
# Initialize the local directory as a Git repository
|
41
|
+
git init
|
42
|
+
|
43
|
+
# Adds the files in the local repository and stages them for commit.
|
44
|
+
git add .
|
45
|
+
|
46
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
47
|
+
git commit -m "$release_note"
|
48
|
+
|
49
|
+
# Sets the new remote
|
50
|
+
git_remote=`git remote`
|
51
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
52
|
+
|
53
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
54
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
55
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
56
|
+
else
|
57
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
58
|
+
fi
|
59
|
+
|
60
|
+
fi
|
61
|
+
|
62
|
+
git pull origin master
|
63
|
+
|
64
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
65
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
66
|
+
git push origin master 2>&1 | grep -v 'To https'
|
67
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
=begin
|
4
|
+
#IronFunctions
|
5
|
+
|
6
|
+
#null
|
7
|
+
|
8
|
+
OpenAPI spec version: 0.0.3
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
|
12
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
13
|
+
you may not use this file except in compliance with the License.
|
14
|
+
You may obtain a copy of the License at
|
15
|
+
|
16
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
|
18
|
+
Unless required by applicable law or agreed to in writing, software
|
19
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
20
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21
|
+
See the License for the specific language governing permissions and
|
22
|
+
limitations under the License.
|
23
|
+
|
24
|
+
=end
|
25
|
+
|
26
|
+
$:.push File.expand_path("../lib", __FILE__)
|
27
|
+
require "iron_functions/version"
|
28
|
+
|
29
|
+
Gem::Specification.new do |s|
|
30
|
+
s.name = "iron_functions"
|
31
|
+
s.version = IronFunctions::VERSION
|
32
|
+
s.platform = Gem::Platform::RUBY
|
33
|
+
s.authors = ["Swagger-Codegen"]
|
34
|
+
s.email = ["travis@iron.io"]
|
35
|
+
s.homepage = "https://github.com/iron-io/functions_ruby"
|
36
|
+
s.summary = "Ruby gem for IronFunctions"
|
37
|
+
s.description = "Ruby gem for IronFunctions."
|
38
|
+
s.license = "Apache 2.0"
|
39
|
+
|
40
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
41
|
+
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
|
42
|
+
|
43
|
+
s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
|
44
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
45
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
46
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
47
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
48
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
49
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
|
50
|
+
|
51
|
+
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
52
|
+
s.test_files = `find spec/*`.split("\n")
|
53
|
+
s.executables = []
|
54
|
+
s.require_paths = ["lib"]
|
55
|
+
end
|
@@ -0,0 +1,262 @@
|
|
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 AppsApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get information for a app.
|
35
|
+
# This gives more details about a app, such as statistics.
|
36
|
+
# @param app name of the app.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [AppWrapper]
|
39
|
+
def apps_app_get(app, opts = {})
|
40
|
+
data, _status_code, _headers = apps_app_get_with_http_info(app, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
# Get information for a app.
|
45
|
+
# This gives more details about a app, such as statistics.
|
46
|
+
# @param app name of the app.
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [Array<(AppWrapper, Fixnum, Hash)>] AppWrapper data, response status code and response headers
|
49
|
+
def apps_app_get_with_http_info(app, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: AppsApi.apps_app_get ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'app' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling AppsApi.apps_app_get" if app.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/apps/{app}".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 => 'AppWrapper')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: AppsApi#apps_app_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
# Create/update a app.
|
92
|
+
# You can set app level settings here.
|
93
|
+
# @param app name of the app.
|
94
|
+
# @param body App to post.
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [AppWrapper]
|
97
|
+
def apps_app_put(app, body, opts = {})
|
98
|
+
data, _status_code, _headers = apps_app_put_with_http_info(app, body, opts)
|
99
|
+
return data
|
100
|
+
end
|
101
|
+
|
102
|
+
# Create/update a app.
|
103
|
+
# You can set app level settings here.
|
104
|
+
# @param app name of the app.
|
105
|
+
# @param body App to post.
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Array<(AppWrapper, Fixnum, Hash)>] AppWrapper data, response status code and response headers
|
108
|
+
def apps_app_put_with_http_info(app, body, opts = {})
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug "Calling API: AppsApi.apps_app_put ..."
|
111
|
+
end
|
112
|
+
# verify the required parameter 'app' is set
|
113
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling AppsApi.apps_app_put" if app.nil?
|
114
|
+
# verify the required parameter 'body' is set
|
115
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AppsApi.apps_app_put" if body.nil?
|
116
|
+
# resource path
|
117
|
+
local_var_path = "/apps/{app}".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(:PUT, 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 => 'AppWrapper')
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: AppsApi#apps_app_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# Get all app names.
|
153
|
+
# Get a list of all the apps in the system.
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @return [AppsWrapper]
|
156
|
+
def apps_get(opts = {})
|
157
|
+
data, _status_code, _headers = apps_get_with_http_info(opts)
|
158
|
+
return data
|
159
|
+
end
|
160
|
+
|
161
|
+
# Get all app names.
|
162
|
+
# Get a list of all the apps in the system.
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @return [Array<(AppsWrapper, Fixnum, Hash)>] AppsWrapper data, response status code and response headers
|
165
|
+
def apps_get_with_http_info(opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug "Calling API: AppsApi.apps_get ..."
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = "/apps".sub('{format}','json')
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = {}
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = {}
|
177
|
+
|
178
|
+
# HTTP header 'Accept' (if needed)
|
179
|
+
local_header_accept = ['application/json']
|
180
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
181
|
+
|
182
|
+
# HTTP header 'Content-Type'
|
183
|
+
local_header_content_type = ['application/json']
|
184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = nil
|
191
|
+
auth_names = []
|
192
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => 'AppsWrapper')
|
199
|
+
if @api_client.config.debugging
|
200
|
+
@api_client.config.logger.debug "API called: AppsApi#apps_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
201
|
+
end
|
202
|
+
return data, status_code, headers
|
203
|
+
end
|
204
|
+
|
205
|
+
# Post new app
|
206
|
+
# Insert a new app
|
207
|
+
# @param body App to post.
|
208
|
+
# @param [Hash] opts the optional parameters
|
209
|
+
# @return [AppWrapper]
|
210
|
+
def apps_post(body, opts = {})
|
211
|
+
data, _status_code, _headers = apps_post_with_http_info(body, opts)
|
212
|
+
return data
|
213
|
+
end
|
214
|
+
|
215
|
+
# Post new app
|
216
|
+
# Insert a new app
|
217
|
+
# @param body App to post.
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @return [Array<(AppWrapper, Fixnum, Hash)>] AppWrapper data, response status code and response headers
|
220
|
+
def apps_post_with_http_info(body, opts = {})
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "Calling API: AppsApi.apps_post ..."
|
223
|
+
end
|
224
|
+
# verify the required parameter 'body' is set
|
225
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AppsApi.apps_post" if body.nil?
|
226
|
+
# resource path
|
227
|
+
local_var_path = "/apps".sub('{format}','json')
|
228
|
+
|
229
|
+
# query parameters
|
230
|
+
query_params = {}
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = {}
|
234
|
+
|
235
|
+
# HTTP header 'Accept' (if needed)
|
236
|
+
local_header_accept = ['application/json']
|
237
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
238
|
+
|
239
|
+
# HTTP header 'Content-Type'
|
240
|
+
local_header_content_type = ['application/json']
|
241
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
242
|
+
|
243
|
+
# form parameters
|
244
|
+
form_params = {}
|
245
|
+
|
246
|
+
# http body (model)
|
247
|
+
post_body = @api_client.object_to_http_body(body)
|
248
|
+
auth_names = []
|
249
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
250
|
+
:header_params => header_params,
|
251
|
+
:query_params => query_params,
|
252
|
+
:form_params => form_params,
|
253
|
+
:body => post_body,
|
254
|
+
:auth_names => auth_names,
|
255
|
+
:return_type => 'AppWrapper')
|
256
|
+
if @api_client.config.debugging
|
257
|
+
@api_client.config.logger.debug "API called: AppsApi#apps_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
258
|
+
end
|
259
|
+
return data, status_code, headers
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|