worker_ruby 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +118 -0
  4. data/VERSION +1 -0
  5. data/VERSION.txt +1 -0
  6. data/docs/Complete.md +10 -0
  7. data/docs/CoreApi.md +200 -0
  8. data/docs/Error.md +8 -0
  9. data/docs/ErrorBody.md +9 -0
  10. data/docs/Group.md +12 -0
  11. data/docs/GroupWrapper.md +8 -0
  12. data/docs/GroupsApi.md +197 -0
  13. data/docs/GroupsWrapper.md +8 -0
  14. data/docs/IdStatus.md +9 -0
  15. data/docs/Image.md +10 -0
  16. data/docs/ImageWrapper.md +8 -0
  17. data/docs/ImagesApi.md +98 -0
  18. data/docs/ImagesWrapper.md +8 -0
  19. data/docs/Job.md +25 -0
  20. data/docs/JobWrapper.md +8 -0
  21. data/docs/JobsApi.md +684 -0
  22. data/docs/JobsWrapper.md +10 -0
  23. data/docs/Log.md +8 -0
  24. data/docs/NewJob.md +14 -0
  25. data/docs/NewJobWithImage.md +15 -0
  26. data/docs/NewJobsWrapper.md +8 -0
  27. data/docs/NewTask.md +14 -0
  28. data/docs/NewTasksWrapper.md +8 -0
  29. data/docs/Reason.md +7 -0
  30. data/docs/RunnerApi.md +170 -0
  31. data/docs/Start.md +8 -0
  32. data/docs/Task.md +25 -0
  33. data/docs/TaskWrapper.md +8 -0
  34. data/docs/TasksApi.md +684 -0
  35. data/docs/TasksWrapper.md +10 -0
  36. data/git_push.sh +67 -0
  37. data/iron_ruby.gemspec +55 -0
  38. data/iron_titan.gemspec +32 -0
  39. data/lib/iron_ruby.rb +66 -0
  40. data/lib/iron_ruby/api/groups_api.rb +262 -0
  41. data/lib/iron_ruby/api/runner_api.rb +229 -0
  42. data/lib/iron_ruby/api/tasks_api.rb +842 -0
  43. data/lib/iron_ruby/api_client.rb +378 -0
  44. data/lib/iron_ruby/api_error.rb +47 -0
  45. data/lib/iron_ruby/configuration.rb +207 -0
  46. data/lib/iron_ruby/models/complete.rb +220 -0
  47. data/lib/iron_ruby/models/error.rb +199 -0
  48. data/lib/iron_ruby/models/error_body.rb +208 -0
  49. data/lib/iron_ruby/models/group.rb +242 -0
  50. data/lib/iron_ruby/models/group_wrapper.rb +200 -0
  51. data/lib/iron_ruby/models/groups_wrapper.rb +202 -0
  52. data/lib/iron_ruby/models/id_status.rb +243 -0
  53. data/lib/iron_ruby/models/new_task.rb +270 -0
  54. data/lib/iron_ruby/models/new_tasks_wrapper.rb +202 -0
  55. data/lib/iron_ruby/models/start.rb +200 -0
  56. data/lib/iron_ruby/models/task.rb +427 -0
  57. data/lib/iron_ruby/models/task_wrapper.rb +200 -0
  58. data/lib/iron_ruby/models/tasks_wrapper.rb +221 -0
  59. data/lib/iron_ruby/version.rb +26 -0
  60. data/lib/iron_titan.rb +66 -0
  61. data/lib/iron_titan/api/core_api.rb +260 -0
  62. data/lib/iron_titan/api/groups_api.rb +262 -0
  63. data/lib/iron_titan/api/images_api.rb +138 -0
  64. data/lib/iron_titan/api/jobs_api.rb +842 -0
  65. data/lib/iron_titan/api/runner_api.rb +229 -0
  66. data/lib/iron_titan/api_client.rb +372 -0
  67. data/lib/iron_titan/api_error.rb +47 -0
  68. data/lib/iron_titan/configuration.rb +186 -0
  69. data/lib/iron_titan/models/complete.rb +220 -0
  70. data/lib/iron_titan/models/error.rb +199 -0
  71. data/lib/iron_titan/models/error_body.rb +208 -0
  72. data/lib/iron_titan/models/group.rb +242 -0
  73. data/lib/iron_titan/models/group_wrapper.rb +200 -0
  74. data/lib/iron_titan/models/groups_wrapper.rb +202 -0
  75. data/lib/iron_titan/models/id_status.rb +243 -0
  76. data/lib/iron_titan/models/image.rb +184 -0
  77. data/lib/iron_titan/models/image_wrapper.rb +161 -0
  78. data/lib/iron_titan/models/images_wrapper.rb +163 -0
  79. data/lib/iron_titan/models/job.rb +427 -0
  80. data/lib/iron_titan/models/job_array.rb +160 -0
  81. data/lib/iron_titan/models/job_wrapper.rb +200 -0
  82. data/lib/iron_titan/models/jobs_wrapper.rb +221 -0
  83. data/lib/iron_titan/models/log.rb +161 -0
  84. data/lib/iron_titan/models/new_job.rb +270 -0
  85. data/lib/iron_titan/models/new_job_array.rb +160 -0
  86. data/lib/iron_titan/models/new_job_with_image.rb +249 -0
  87. data/lib/iron_titan/models/new_jobs_wrapper.rb +202 -0
  88. data/lib/iron_titan/models/reason.rb +164 -0
  89. data/lib/iron_titan/models/start.rb +200 -0
  90. data/lib/iron_titan/version.rb +26 -0
  91. data/lib/worker_ruby.rb +66 -0
  92. data/lib/worker_ruby/api/groups_api.rb +262 -0
  93. data/lib/worker_ruby/api/runner_api.rb +229 -0
  94. data/lib/worker_ruby/api/tasks_api.rb +842 -0
  95. data/lib/worker_ruby/api_client.rb +378 -0
  96. data/lib/worker_ruby/api_error.rb +47 -0
  97. data/lib/worker_ruby/configuration.rb +207 -0
  98. data/lib/worker_ruby/models/complete.rb +220 -0
  99. data/lib/worker_ruby/models/error.rb +199 -0
  100. data/lib/worker_ruby/models/error_body.rb +208 -0
  101. data/lib/worker_ruby/models/group.rb +242 -0
  102. data/lib/worker_ruby/models/group_wrapper.rb +200 -0
  103. data/lib/worker_ruby/models/groups_wrapper.rb +202 -0
  104. data/lib/worker_ruby/models/id_status.rb +243 -0
  105. data/lib/worker_ruby/models/new_task.rb +270 -0
  106. data/lib/worker_ruby/models/new_tasks_wrapper.rb +202 -0
  107. data/lib/worker_ruby/models/start.rb +200 -0
  108. data/lib/worker_ruby/models/task.rb +427 -0
  109. data/lib/worker_ruby/models/task_wrapper.rb +200 -0
  110. data/lib/worker_ruby/models/tasks_wrapper.rb +221 -0
  111. data/lib/worker_ruby/version.rb +26 -0
  112. data/spec/api/CoreApi_spec.rb +99 -0
  113. data/spec/api/JobsApi_spec.rb +131 -0
  114. data/spec/api/core_api_spec.rb +99 -0
  115. data/spec/api/groups_api_spec.rb +94 -0
  116. data/spec/api/images_api_spec.rb +66 -0
  117. data/spec/api/jobs_api_spec.rb +220 -0
  118. data/spec/api/runner_api_spec.rb +88 -0
  119. data/spec/api/tasks_api_spec.rb +220 -0
  120. data/spec/api_client_spec.rb +237 -0
  121. data/spec/configuration_spec.rb +53 -0
  122. data/spec/models/ErrorBody_spec.rb +56 -0
  123. data/spec/models/JobArray_spec.rb +46 -0
  124. data/spec/models/JobWrapper_spec.rb +46 -0
  125. data/spec/models/NewJobArray_spec.rb +46 -0
  126. data/spec/models/NewJob_spec.rb +96 -0
  127. data/spec/models/complete_spec.rb +65 -0
  128. data/spec/models/error_body_spec.rb +59 -0
  129. data/spec/models/error_spec.rb +53 -0
  130. data/spec/models/group_spec.rb +77 -0
  131. data/spec/models/group_wrapper_spec.rb +53 -0
  132. data/spec/models/groups_wrapper_spec.rb +53 -0
  133. data/spec/models/id_status_spec.rb +63 -0
  134. data/spec/models/image_spec.rb +66 -0
  135. data/spec/models/image_wrapper_spec.rb +46 -0
  136. data/spec/models/images_wrapper_spec.rb +46 -0
  137. data/spec/models/job_array_spec.rb +46 -0
  138. data/spec/models/job_spec.rb +161 -0
  139. data/spec/models/job_wrapper_spec.rb +53 -0
  140. data/spec/models/jobs_wrapper_spec.rb +65 -0
  141. data/spec/models/log_spec.rb +46 -0
  142. data/spec/models/new_job_array_spec.rb +46 -0
  143. data/spec/models/new_job_spec.rb +89 -0
  144. data/spec/models/new_job_with_image_spec.rb +116 -0
  145. data/spec/models/new_jobs_wrapper_spec.rb +53 -0
  146. data/spec/models/new_task_spec.rb +89 -0
  147. data/spec/models/new_tasks_wrapper_spec.rb +53 -0
  148. data/spec/models/reason_spec.rb +36 -0
  149. data/spec/models/start_spec.rb +53 -0
  150. data/spec/models/task_spec.rb +163 -0
  151. data/spec/models/task_wrapper_spec.rb +53 -0
  152. data/spec/models/tasks_wrapper_spec.rb +65 -0
  153. data/spec/spec_helper.rb +122 -0
  154. data/worker_ruby-0.5.5.gem +0 -0
  155. data/worker_ruby.gemspec +55 -0
  156. metadata +420 -0
@@ -0,0 +1,10 @@
1
+ # IronWorker::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
+
data/iron_ruby.gemspec ADDED
@@ -0,0 +1,55 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ =begin
4
+ #IronWorker CE API
5
+
6
+ #The ultimate, language agnostic, container based task processing framework.
7
+
8
+ OpenAPI spec version: 0.5.0
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_ruby/version"
28
+
29
+ Gem::Specification.new do |s|
30
+ s.name = "iron_ruby"
31
+ s.version = IronWorker::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/worker_ruby"
36
+ s.summary = "Ruby gem for IronWorker CE"
37
+ s.description = "Ruby gem for IronWorker CE."
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,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "iron_titan/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "iron_titan"
7
+ s.version = IronTitan::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Travis Reeder"]
10
+ s.email = ["travis@iron.io"]
11
+ s.homepage = "https://github.com/iron-io/titan_ruby"
12
+ s.summary = ""
13
+ s.description = ""
14
+ s.license = "Apache 2.0"
15
+
16
+
17
+ s.add_runtime_dependency 'typhoeus', '~> 0.2', '>= 0.2.1'
18
+ s.add_runtime_dependency 'json', '~> 1.4', '>= 1.4.6'
19
+
20
+ s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
21
+ s.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.3'
22
+ s.add_development_dependency 'webmock', '~> 1.6', '>= 1.6.2'
23
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
24
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
25
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
26
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
27
+
28
+ s.files = Dir["{lib}/**/*.rb", "bin/*", "LICENSE", "*.md"]
29
+ s.test_files = `find spec/*`.split("\n")
30
+ s.executables = []
31
+ s.require_paths = ["lib"]
32
+ end
data/lib/iron_ruby.rb ADDED
@@ -0,0 +1,66 @@
1
+ =begin
2
+ #IronWorker CE API
3
+
4
+ #The ultimate, language agnostic, container based task processing framework.
5
+
6
+ OpenAPI spec version: 0.5.0
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
+ # Common files
25
+ require 'iron_ruby/api_client'
26
+ require 'iron_ruby/api_error'
27
+ require 'iron_ruby/version'
28
+ require 'iron_ruby/configuration'
29
+
30
+ # Models
31
+ require 'iron_ruby/models/complete'
32
+ require 'iron_ruby/models/error'
33
+ require 'iron_ruby/models/error_body'
34
+ require 'iron_ruby/models/group'
35
+ require 'iron_ruby/models/group_wrapper'
36
+ require 'iron_ruby/models/groups_wrapper'
37
+ require 'iron_ruby/models/id_status'
38
+ require 'iron_ruby/models/new_task'
39
+ require 'iron_ruby/models/new_tasks_wrapper'
40
+ require 'iron_ruby/models/start'
41
+ require 'iron_ruby/models/task'
42
+ require 'iron_ruby/models/task_wrapper'
43
+ require 'iron_ruby/models/tasks_wrapper'
44
+
45
+ # APIs
46
+ require 'iron_ruby/api/groups_api'
47
+ require 'iron_ruby/api/runner_api'
48
+ require 'iron_ruby/api/tasks_api'
49
+
50
+ module IronWorker
51
+ class << self
52
+ # Customize default settings for the SDK using block.
53
+ # IronWorker.configure do |config|
54
+ # config.username = "xxx"
55
+ # config.password = "xxx"
56
+ # end
57
+ # If no block given, return the default Configuration object.
58
+ def configure
59
+ if block_given?
60
+ yield(Configuration.default)
61
+ else
62
+ Configuration.default
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #IronWorker CE API
3
+
4
+ #The ultimate, language agnostic, container based task processing framework.
5
+
6
+ OpenAPI spec version: 0.5.0
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 IronWorker
27
+ class GroupsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Get all group names.
35
+ # Get a list of all the groups in the system.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [GroupsWrapper]
38
+ def groups_get(opts = {})
39
+ data, _status_code, _headers = groups_get_with_http_info(opts)
40
+ return data
41
+ end
42
+
43
+ # Get all group names.
44
+ # Get a list of all the groups in the system.
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [Array<(GroupsWrapper, Fixnum, Hash)>] GroupsWrapper data, response status code and response headers
47
+ def groups_get_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_get ..."
50
+ end
51
+ # resource path
52
+ local_var_path = "/groups".sub('{format}','json')
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+
60
+ # HTTP header 'Accept' (if needed)
61
+ local_header_accept = ['application/json']
62
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
63
+
64
+ # HTTP header 'Content-Type'
65
+ local_header_content_type = ['application/json']
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = []
74
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'GroupsWrapper')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: GroupsApi#groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
87
+ # Get information for a group.
88
+ # This gives more details about a task group, such as statistics.
89
+ # @param name name of the group.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [GroupWrapper]
92
+ def groups_name_get(name, opts = {})
93
+ data, _status_code, _headers = groups_name_get_with_http_info(name, opts)
94
+ return data
95
+ end
96
+
97
+ # Get information for a group.
98
+ # This gives more details about a task group, such as statistics.
99
+ # @param name name of the group.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
102
+ def groups_name_get_with_http_info(name, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_name_get ..."
105
+ end
106
+ # verify the required parameter 'name' is set
107
+ fail ArgumentError, "Missing the required parameter 'name' when calling GroupsApi.groups_name_get" if name.nil?
108
+ # resource path
109
+ local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
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 = []
131
+ data, status_code, headers = @api_client.call_api(:GET, 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
+ :return_type => 'GroupWrapper')
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: GroupsApi#groups_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Create/update a task group.
145
+ # You can set group level settings here.
146
+ # @param name name of the group.
147
+ # @param body Group to post.
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [GroupWrapper]
150
+ def groups_name_put(name, body, opts = {})
151
+ data, _status_code, _headers = groups_name_put_with_http_info(name, body, opts)
152
+ return data
153
+ end
154
+
155
+ # Create/update a task group.
156
+ # You can set group level settings here.
157
+ # @param name name of the group.
158
+ # @param body Group to post.
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
161
+ def groups_name_put_with_http_info(name, body, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_name_put ..."
164
+ end
165
+ # verify the required parameter 'name' is set
166
+ fail ArgumentError, "Missing the required parameter 'name' when calling GroupsApi.groups_name_put" if name.nil?
167
+ # verify the required parameter 'body' is set
168
+ fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_name_put" if body.nil?
169
+ # resource path
170
+ local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
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 = @api_client.object_to_http_body(body)
191
+ auth_names = []
192
+ data, status_code, headers = @api_client.call_api(:PUT, 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 => 'GroupWrapper')
199
+ if @api_client.config.debugging
200
+ @api_client.config.logger.debug "API called: GroupsApi#groups_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
201
+ end
202
+ return data, status_code, headers
203
+ end
204
+
205
+ # Post new group
206
+ # Insert a new task group
207
+ # @param body Group to post.
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [GroupWrapper]
210
+ def groups_post(body, opts = {})
211
+ data, _status_code, _headers = groups_post_with_http_info(body, opts)
212
+ return data
213
+ end
214
+
215
+ # Post new group
216
+ # Insert a new task group
217
+ # @param body Group to post.
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
220
+ def groups_post_with_http_info(body, opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_post ..."
223
+ end
224
+ # verify the required parameter 'body' is set
225
+ fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_post" if body.nil?
226
+ # resource path
227
+ local_var_path = "/groups".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 => 'GroupWrapper')
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: GroupsApi#groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+ end
262
+ end