allq_rest 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/README.md +111 -0
- data/Rakefile +8 -0
- data/allq_client-1.2.0.gem +0 -0
- data/allq_client.gemspec +46 -0
- data/allq_rest.gemspec +34 -0
- data/deploy.sh +3 -0
- data/docs/ActionsApi.md +544 -0
- data/docs/AdminApi.md +98 -0
- data/docs/BasicPayload.md +11 -0
- data/docs/BasicResponse.md +8 -0
- data/docs/JobRef.md +8 -0
- data/docs/JobResponse.md +12 -0
- data/docs/NewJob.md +13 -0
- data/docs/NewParentJob.md +16 -0
- data/docs/StatsInfo.md +9 -0
- data/docs/StatsResults.md +10 -0
- data/docs/StatsTube.md +14 -0
- data/docs/Throttle.md +9 -0
- data/docs/TubeRef.md +8 -0
- data/git_push.sh +55 -0
- data/lib/.DS_Store +0 -0
- data/lib/allq_client.rb +53 -0
- data/lib/allq_client/.DS_Store +0 -0
- data/lib/allq_client/api/actions_api.rb +702 -0
- data/lib/allq_client/api/admin_api.rb +181 -0
- data/lib/allq_client/api_client.rb +388 -0
- data/lib/allq_client/api_error.rb +38 -0
- data/lib/allq_client/configuration.rb +202 -0
- data/lib/allq_client/models/basic_payload.rb +218 -0
- data/lib/allq_client/models/basic_response.rb +188 -0
- data/lib/allq_client/models/job_ref.rb +190 -0
- data/lib/allq_client/models/job_response.rb +249 -0
- data/lib/allq_client/models/multiple_job_response.rb +187 -0
- data/lib/allq_client/models/new_job.rb +270 -0
- data/lib/allq_client/models/new_parent_job.rb +302 -0
- data/lib/allq_client/models/stats_info.rb +204 -0
- data/lib/allq_client/models/stats_results.rb +253 -0
- data/lib/allq_client/models/stats_tube.rb +285 -0
- data/lib/allq_client/models/throttle.rb +209 -0
- data/lib/allq_client/models/tube_ref.rb +190 -0
- data/lib/allq_client/version.rb +15 -0
- data/spec/.DS_Store +0 -0
- data/spec/api/actions_api_spec.rb +575 -0
- data/spec/api/admin_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/basic_payload_spec.rb +60 -0
- data/spec/models/basic_response_spec.rb +42 -0
- data/spec/models/job_ref_spec.rb +42 -0
- data/spec/models/job_response_spec.rb +66 -0
- data/spec/models/new_job_spec.rb +72 -0
- data/spec/models/new_parent_job_spec.rb +90 -0
- data/spec/models/stats_info_spec.rb +48 -0
- data/spec/models/stats_results_spec.rb +54 -0
- data/spec/models/stats_tube_spec.rb +78 -0
- data/spec/models/throttle_spec.rb +48 -0
- data/spec/models/tube_ref_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +299 -0
data/docs/AdminApi.md
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# Allq::AdminApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:8090*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**stats_get**](AdminApi.md#stats_get) | **GET** /stats | Stats
|
8
|
+
[**update_servers_put**](AdminApi.md#update_servers_put) | **PUT** /update_servers | Reset Server Urls
|
9
|
+
|
10
|
+
|
11
|
+
# **stats_get**
|
12
|
+
> Array<StatsResults> stats_get
|
13
|
+
|
14
|
+
Stats
|
15
|
+
|
16
|
+
Get Stats
|
17
|
+
|
18
|
+
### Example
|
19
|
+
```ruby
|
20
|
+
# load the gem
|
21
|
+
require 'allq_client'
|
22
|
+
|
23
|
+
api_instance = Allq::AdminApi.new
|
24
|
+
|
25
|
+
begin
|
26
|
+
#Stats
|
27
|
+
result = api_instance.stats_get
|
28
|
+
p result
|
29
|
+
rescue Allq::ApiError => e
|
30
|
+
puts "Exception when calling AdminApi->stats_get: #{e}"
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
### Parameters
|
35
|
+
This endpoint does not need any parameter.
|
36
|
+
|
37
|
+
### Return type
|
38
|
+
|
39
|
+
[**Array<StatsResults>**](StatsResults.md)
|
40
|
+
|
41
|
+
### Authorization
|
42
|
+
|
43
|
+
No authorization required
|
44
|
+
|
45
|
+
### HTTP request headers
|
46
|
+
|
47
|
+
- **Content-Type**: application/json
|
48
|
+
- **Accept**: application/json
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
# **update_servers_put**
|
53
|
+
> BasicResponse update_servers_put(server_urls)
|
54
|
+
|
55
|
+
Reset Server Urls
|
56
|
+
|
57
|
+
Change server URLs
|
58
|
+
|
59
|
+
### Example
|
60
|
+
```ruby
|
61
|
+
# load the gem
|
62
|
+
require 'allq_client'
|
63
|
+
|
64
|
+
api_instance = Allq::AdminApi.new
|
65
|
+
|
66
|
+
server_urls = "server_urls_example" # String | Comma Separated List URL String
|
67
|
+
|
68
|
+
|
69
|
+
begin
|
70
|
+
#Reset Server Urls
|
71
|
+
result = api_instance.update_servers_put(server_urls)
|
72
|
+
p result
|
73
|
+
rescue Allq::ApiError => e
|
74
|
+
puts "Exception when calling AdminApi->update_servers_put: #{e}"
|
75
|
+
end
|
76
|
+
```
|
77
|
+
|
78
|
+
### Parameters
|
79
|
+
|
80
|
+
Name | Type | Description | Notes
|
81
|
+
------------- | ------------- | ------------- | -------------
|
82
|
+
**server_urls** | **String**| Comma Separated List URL String |
|
83
|
+
|
84
|
+
### Return type
|
85
|
+
|
86
|
+
[**BasicResponse**](BasicResponse.md)
|
87
|
+
|
88
|
+
### Authorization
|
89
|
+
|
90
|
+
No authorization required
|
91
|
+
|
92
|
+
### HTTP request headers
|
93
|
+
|
94
|
+
- **Content-Type**: application/json
|
95
|
+
- **Accept**: application/json
|
96
|
+
|
97
|
+
|
98
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Allq::BasicPayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**action** | **String** | Name of action |
|
7
|
+
**job_id** | **String** | Job ID | [optional]
|
8
|
+
**error** | **String** | Error (If any) | [optional]
|
9
|
+
**job** | [**JobResponse**](JobResponse.md) | | [optional]
|
10
|
+
|
11
|
+
|
data/docs/JobRef.md
ADDED
data/docs/JobResponse.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Allq::JobResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | Job id | [optional]
|
7
|
+
**body** | **String** | Body |
|
8
|
+
**tube** | **String** | Tube name |
|
9
|
+
**expireds** | **Integer** | Expired count | [default to 0]
|
10
|
+
**releases** | **Integer** | Release count | [default to 0]
|
11
|
+
|
12
|
+
|
data/docs/NewJob.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Allq::NewJob
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**tube** | **String** | Tube name | [default to "default"]
|
7
|
+
**body** | **String** | Text payload | [default to "<BODY_TEXT>"]
|
8
|
+
**ttl** | **Integer** | Time to live when reserved (in seconds) | [default to 1200]
|
9
|
+
**delay** | **Integer** | Delay before becoming available for processing | [default to 0]
|
10
|
+
**priority** | **Integer** | Priority of job in tube | [default to 5]
|
11
|
+
**parent_id** | **String** | Parent job id (if applicable) | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Allq::NewParentJob
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**tube** | **String** | Tube name | [default to "default"]
|
7
|
+
**body** | **String** | Text payload | [default to "<BODY_TEXT>"]
|
8
|
+
**ttl** | **Integer** | Time to live when reserved (in seconds) | [default to 1200]
|
9
|
+
**delay** | **Integer** | Delay before becoming available for processing | [default to 0]
|
10
|
+
**priority** | **Integer** | Priority of job in tube | [default to 5]
|
11
|
+
**parent_id** | **String** | Parent job id (if applicable) | [optional]
|
12
|
+
**timeout** | **Integer** | Timeout to run | [optional]
|
13
|
+
**run_on_timeout** | **BOOLEAN** | Execute job after timeout | [optional] [default to false]
|
14
|
+
**limit** | **Integer** | Number of children | [optional]
|
15
|
+
|
16
|
+
|
data/docs/StatsInfo.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Allq::StatsResults
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**server_name** | **String** | ID of server |
|
7
|
+
**stats** | [**Array<StatsTube>**](StatsTube.md) | Array of server instances |
|
8
|
+
**action_count** | **Integer** | Total actions taken on server |
|
9
|
+
|
10
|
+
|
data/docs/StatsTube.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Allq::StatsTube
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**ready** | **Integer** | Count of ready jobs | [default to 0]
|
7
|
+
**delayed** | **Integer** | Count of delayed jobs | [default to 0]
|
8
|
+
**reserved** | **Integer** | Count of reserved jobs | [default to 0]
|
9
|
+
**buried** | **Integer** | Count of buried jobs | [default to 0]
|
10
|
+
**parents** | **Integer** | Count of parent jobs | [default to 0]
|
11
|
+
**throttle_size** | **Integer** | TPS of throttle | [optional]
|
12
|
+
**tube** | **String** | Name of tube |
|
13
|
+
|
14
|
+
|
data/docs/Throttle.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# Allq::Throttle
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**tube** | **String** | Name of tube | [default to "default"]
|
7
|
+
**tps** | **Integer** | Transactions per second | [default to 1000]
|
8
|
+
|
9
|
+
|
data/docs/TubeRef.md
ADDED
data/git_push.sh
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
+
#
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
+
|
9
|
+
git_user_id=$1
|
10
|
+
git_repo_id=$2
|
11
|
+
release_note=$3
|
12
|
+
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
14
|
+
git_user_id=""
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
19
|
+
git_repo_id=""
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
+
fi
|
22
|
+
|
23
|
+
if [ "$release_note" = "" ]; then
|
24
|
+
release_note=""
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Initialize the local directory as a Git repository
|
29
|
+
git init
|
30
|
+
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
32
|
+
git add .
|
33
|
+
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
+
git commit -m "$release_note"
|
36
|
+
|
37
|
+
# Sets the new remote
|
38
|
+
git_remote=`git remote`
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
+
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
+
else
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
+
fi
|
47
|
+
|
48
|
+
fi
|
49
|
+
|
50
|
+
git pull origin master
|
51
|
+
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
55
|
+
|
data/lib/.DS_Store
ADDED
Binary file
|
data/lib/allq_client.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
=begin
|
2
|
+
#AllQ
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'allq_client/api_client'
|
15
|
+
require 'allq_client/api_error'
|
16
|
+
require 'allq_client/version'
|
17
|
+
require 'allq_client/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'allq_client/models/basic_payload'
|
21
|
+
require 'allq_client/models/basic_response'
|
22
|
+
require 'allq_client/models/job_ref'
|
23
|
+
require 'allq_client/models/job_response'
|
24
|
+
require 'allq_client/models/multiple_job_response'
|
25
|
+
require 'allq_client/models/new_job'
|
26
|
+
require 'allq_client/models/new_parent_job'
|
27
|
+
require 'allq_client/models/stats_info'
|
28
|
+
require 'allq_client/models/stats_results'
|
29
|
+
require 'allq_client/models/stats_tube'
|
30
|
+
require 'allq_client/models/throttle'
|
31
|
+
require 'allq_client/models/tube_ref'
|
32
|
+
|
33
|
+
# APIs
|
34
|
+
require 'allq_client/api/actions_api'
|
35
|
+
require 'allq_client/api/admin_api'
|
36
|
+
|
37
|
+
module Allq
|
38
|
+
class << self
|
39
|
+
# Customize default settings for the SDK using block.
|
40
|
+
# Allq.configure do |config|
|
41
|
+
# config.username = "xxx"
|
42
|
+
# config.password = "xxx"
|
43
|
+
# end
|
44
|
+
# If no block given, return the default Configuration object.
|
45
|
+
def configure
|
46
|
+
if block_given?
|
47
|
+
yield(Configuration.default)
|
48
|
+
else
|
49
|
+
Configuration.default
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
Binary file
|
@@ -0,0 +1,702 @@
|
|
1
|
+
=begin
|
2
|
+
#AllQ
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module Allq
|
16
|
+
class ActionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Bury
|
23
|
+
# Bury Job
|
24
|
+
# @param job_id Job ID
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [BasicResponse]
|
27
|
+
def bury_put(job_id, opts = {})
|
28
|
+
data, _status_code, _headers = bury_put_with_http_info(job_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Bury
|
33
|
+
# Bury Job
|
34
|
+
# @param job_id Job ID
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(BasicResponse, Fixnum, Hash)>] BasicResponse data, response status code and response headers
|
37
|
+
def bury_put_with_http_info(job_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.bury_put ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'job_id' is set
|
42
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling ActionsApi.bury_put"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/bury'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
query_params[:'job_id'] = job_id
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
64
|
+
auth_names = []
|
65
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'BasicResponse')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: ActionsApi#bury_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
# Delete
|
78
|
+
# Finished Job
|
79
|
+
# @param job_id Job ID
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @option opts [String] :tube Name of Tube (For deleting \"ready\" objects)
|
82
|
+
# @return [BasicResponse]
|
83
|
+
def job_delete(job_id, opts = {})
|
84
|
+
data, _status_code, _headers = job_delete_with_http_info(job_id, opts)
|
85
|
+
data
|
86
|
+
end
|
87
|
+
|
88
|
+
# Delete
|
89
|
+
# Finished Job
|
90
|
+
# @param job_id Job ID
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [String] :tube Name of Tube (For deleting \"ready\" objects)
|
93
|
+
# @return [Array<(BasicResponse, Fixnum, Hash)>] BasicResponse data, response status code and response headers
|
94
|
+
def job_delete_with_http_info(job_id, opts = {})
|
95
|
+
if @api_client.config.debugging
|
96
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.job_delete ...'
|
97
|
+
end
|
98
|
+
# verify the required parameter 'job_id' is set
|
99
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
100
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling ActionsApi.job_delete"
|
101
|
+
end
|
102
|
+
# resource path
|
103
|
+
local_var_path = '/job'
|
104
|
+
|
105
|
+
# query parameters
|
106
|
+
query_params = {}
|
107
|
+
query_params[:'job_id'] = job_id
|
108
|
+
query_params[:'tube'] = opts[:'tube'] if !opts[:'tube'].nil?
|
109
|
+
|
110
|
+
# header parameters
|
111
|
+
header_params = {}
|
112
|
+
# HTTP header 'Accept' (if needed)
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
114
|
+
# HTTP header 'Content-Type'
|
115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = nil
|
122
|
+
auth_names = []
|
123
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => 'BasicResponse')
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: ActionsApi#job_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
return data, status_code, headers
|
134
|
+
end
|
135
|
+
# Job
|
136
|
+
# Get job from queue
|
137
|
+
# @param tube Name of tube
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @option opts [String] :delete Delete on get
|
140
|
+
# @return [JobResponse]
|
141
|
+
def job_get(tube, opts = {})
|
142
|
+
data, _status_code, _headers = job_get_with_http_info(tube, opts)
|
143
|
+
data
|
144
|
+
end
|
145
|
+
|
146
|
+
# Job
|
147
|
+
# Get job from queue
|
148
|
+
# @param tube Name of tube
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @option opts [String] :delete Delete on get
|
151
|
+
# @return [Array<(JobResponse, Fixnum, Hash)>] JobResponse data, response status code and response headers
|
152
|
+
def job_get_with_http_info(tube, opts = {})
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.job_get ...'
|
155
|
+
end
|
156
|
+
# verify the required parameter 'tube' is set
|
157
|
+
if @api_client.config.client_side_validation && tube.nil?
|
158
|
+
fail ArgumentError, "Missing the required parameter 'tube' when calling ActionsApi.job_get"
|
159
|
+
end
|
160
|
+
# resource path
|
161
|
+
local_var_path = '/job'
|
162
|
+
|
163
|
+
# query parameters
|
164
|
+
query_params = {}
|
165
|
+
query_params[:'tube'] = tube
|
166
|
+
query_params[:'delete'] = opts[:'delete'] if !opts[:'delete'].nil?
|
167
|
+
|
168
|
+
# header parameters
|
169
|
+
header_params = {}
|
170
|
+
# HTTP header 'Accept' (if needed)
|
171
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
172
|
+
# HTTP header 'Content-Type'
|
173
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
174
|
+
|
175
|
+
# form parameters
|
176
|
+
form_params = {}
|
177
|
+
|
178
|
+
# http body (model)
|
179
|
+
post_body = nil
|
180
|
+
auth_names = []
|
181
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
182
|
+
:header_params => header_params,
|
183
|
+
:query_params => query_params,
|
184
|
+
:form_params => form_params,
|
185
|
+
:body => post_body,
|
186
|
+
:auth_names => auth_names,
|
187
|
+
:return_type => 'JobResponse')
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug "API called: ActionsApi#job_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
|
+
end
|
191
|
+
return data, status_code, headers
|
192
|
+
end
|
193
|
+
# Job
|
194
|
+
# Put job into queue
|
195
|
+
# @param new_job New Job Object
|
196
|
+
# @param [Hash] opts the optional parameters
|
197
|
+
# @return [JobRef]
|
198
|
+
def job_post(new_job, opts = {})
|
199
|
+
data, _status_code, _headers = job_post_with_http_info(new_job, opts)
|
200
|
+
data
|
201
|
+
end
|
202
|
+
|
203
|
+
# Job
|
204
|
+
# Put job into queue
|
205
|
+
# @param new_job New Job Object
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @return [Array<(JobRef, Fixnum, Hash)>] JobRef data, response status code and response headers
|
208
|
+
def job_post_with_http_info(new_job, opts = {})
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.job_post ...'
|
211
|
+
end
|
212
|
+
# verify the required parameter 'new_job' is set
|
213
|
+
if @api_client.config.client_side_validation && new_job.nil?
|
214
|
+
fail ArgumentError, "Missing the required parameter 'new_job' when calling ActionsApi.job_post"
|
215
|
+
end
|
216
|
+
# resource path
|
217
|
+
local_var_path = '/job'
|
218
|
+
|
219
|
+
# query parameters
|
220
|
+
query_params = {}
|
221
|
+
|
222
|
+
# header parameters
|
223
|
+
header_params = {}
|
224
|
+
# HTTP header 'Accept' (if needed)
|
225
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
226
|
+
# HTTP header 'Content-Type'
|
227
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
228
|
+
|
229
|
+
# form parameters
|
230
|
+
form_params = {}
|
231
|
+
|
232
|
+
# http body (model)
|
233
|
+
post_body = @api_client.object_to_http_body(new_job)
|
234
|
+
auth_names = []
|
235
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
236
|
+
:header_params => header_params,
|
237
|
+
:query_params => query_params,
|
238
|
+
:form_params => form_params,
|
239
|
+
:body => post_body,
|
240
|
+
:auth_names => auth_names,
|
241
|
+
:return_type => 'JobRef')
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug "API called: ActionsApi#job_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
244
|
+
end
|
245
|
+
return data, status_code, headers
|
246
|
+
end
|
247
|
+
|
248
|
+
# Multiple Job
|
249
|
+
# Get multiple jobs from queue
|
250
|
+
# @param tube Name of tube
|
251
|
+
# @param count Max number of reults
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @option opts [String] :delete Delete on get
|
254
|
+
# @return [MultipleJobResponse]
|
255
|
+
def multiple_job_get(tube, count, opts = {})
|
256
|
+
data, _status_code, _headers = multiple_job_get_with_http_info(tube, count, opts)
|
257
|
+
data
|
258
|
+
end
|
259
|
+
|
260
|
+
# Multiple Job
|
261
|
+
# Get multiple jobs from queue
|
262
|
+
# @param tube Name of tube
|
263
|
+
# @param count Max number of reults
|
264
|
+
# @param [Hash] opts the optional parameters
|
265
|
+
# @option opts [String] :delete Delete on get
|
266
|
+
# @return [Array<(MultipleJobResponse, Fixnum, Hash)>] MultipleJobResponse data, response status code and response headers
|
267
|
+
def multiple_job_get_with_http_info(tube, count, opts = {})
|
268
|
+
if @api_client.config.debugging
|
269
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.multiple_job_get ...'
|
270
|
+
end
|
271
|
+
# verify the required parameter 'tube' is set
|
272
|
+
if @api_client.config.client_side_validation && tube.nil?
|
273
|
+
fail ArgumentError, "Missing the required parameter 'tube' when calling ActionsApi.multiple_job_get"
|
274
|
+
end
|
275
|
+
# verify the required parameter 'count' is set
|
276
|
+
if @api_client.config.client_side_validation && count.nil?
|
277
|
+
fail ArgumentError, "Missing the required parameter 'count' when calling ActionsApi.multiple_job_get"
|
278
|
+
end
|
279
|
+
# resource path
|
280
|
+
local_var_path = '/multiple_job'
|
281
|
+
|
282
|
+
# query parameters
|
283
|
+
query_params = {}
|
284
|
+
query_params[:'tube'] = tube
|
285
|
+
query_params[:'count'] = count
|
286
|
+
query_params[:'delete'] = opts[:'delete'] if !opts[:'delete'].nil?
|
287
|
+
|
288
|
+
# header parameters
|
289
|
+
header_params = {}
|
290
|
+
# HTTP header 'Accept' (if needed)
|
291
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
292
|
+
# HTTP header 'Content-Type'
|
293
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
294
|
+
|
295
|
+
# form parameters
|
296
|
+
form_params = {}
|
297
|
+
|
298
|
+
# http body (model)
|
299
|
+
post_body = nil
|
300
|
+
auth_names = []
|
301
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
302
|
+
:header_params => header_params,
|
303
|
+
:query_params => query_params,
|
304
|
+
:form_params => form_params,
|
305
|
+
:body => post_body,
|
306
|
+
:auth_names => auth_names,
|
307
|
+
:return_type => 'MultipleJobResponse')
|
308
|
+
if @api_client.config.debugging
|
309
|
+
@api_client.config.logger.debug "API called: ActionsApi#multiple_job_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
310
|
+
end
|
311
|
+
return data, status_code, headers
|
312
|
+
end
|
313
|
+
|
314
|
+
|
315
|
+
# Parent Job
|
316
|
+
# Create a parent job
|
317
|
+
# @param new_parent_job New Parent Job Data
|
318
|
+
# @param [Hash] opts the optional parameters
|
319
|
+
# @return [JobRef]
|
320
|
+
def parent_job_post(new_parent_job, opts = {})
|
321
|
+
data, _status_code, _headers = parent_job_post_with_http_info(new_parent_job, opts)
|
322
|
+
data
|
323
|
+
end
|
324
|
+
|
325
|
+
# Parent Job
|
326
|
+
# Create a parent job
|
327
|
+
# @param new_parent_job New Parent Job Data
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @return [Array<(JobRef, Fixnum, Hash)>] JobRef data, response status code and response headers
|
330
|
+
def parent_job_post_with_http_info(new_parent_job, opts = {})
|
331
|
+
if @api_client.config.debugging
|
332
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.parent_job_post ...'
|
333
|
+
end
|
334
|
+
# verify the required parameter 'new_parent_job' is set
|
335
|
+
if @api_client.config.client_side_validation && new_parent_job.nil?
|
336
|
+
fail ArgumentError, "Missing the required parameter 'new_parent_job' when calling ActionsApi.parent_job_post"
|
337
|
+
end
|
338
|
+
# resource path
|
339
|
+
local_var_path = '/parent_job'
|
340
|
+
|
341
|
+
# query parameters
|
342
|
+
query_params = {}
|
343
|
+
|
344
|
+
# header parameters
|
345
|
+
header_params = {}
|
346
|
+
# HTTP header 'Accept' (if needed)
|
347
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
348
|
+
# HTTP header 'Content-Type'
|
349
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
350
|
+
|
351
|
+
# form parameters
|
352
|
+
form_params = {}
|
353
|
+
|
354
|
+
# http body (model)
|
355
|
+
post_body = @api_client.object_to_http_body(new_parent_job)
|
356
|
+
auth_names = []
|
357
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
358
|
+
:header_params => header_params,
|
359
|
+
:query_params => query_params,
|
360
|
+
:form_params => form_params,
|
361
|
+
:body => post_body,
|
362
|
+
:auth_names => auth_names,
|
363
|
+
:return_type => 'JobRef')
|
364
|
+
if @api_client.config.debugging
|
365
|
+
@api_client.config.logger.debug "API called: ActionsApi#parent_job_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
366
|
+
end
|
367
|
+
return data, status_code, headers
|
368
|
+
end
|
369
|
+
# Peek
|
370
|
+
# Peek at next job
|
371
|
+
# @param tube Tube name
|
372
|
+
# @param [Hash] opts the optional parameters
|
373
|
+
# @option opts [String] :buried Look in buried (default to false)
|
374
|
+
# @return [JobResponse]
|
375
|
+
def peek_get(tube, opts = {})
|
376
|
+
data, _status_code, _headers = peek_get_with_http_info(tube, opts)
|
377
|
+
data
|
378
|
+
end
|
379
|
+
|
380
|
+
# Peek
|
381
|
+
# Peek at next job
|
382
|
+
# @param tube Tube name
|
383
|
+
# @param [Hash] opts the optional parameters
|
384
|
+
# @option opts [String] :buried Look in buried
|
385
|
+
# @return [Array<(JobResponse, Fixnum, Hash)>] JobResponse data, response status code and response headers
|
386
|
+
def peek_get_with_http_info(tube, opts = {})
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.peek_get ...'
|
389
|
+
end
|
390
|
+
# verify the required parameter 'tube' is set
|
391
|
+
if @api_client.config.client_side_validation && tube.nil?
|
392
|
+
fail ArgumentError, "Missing the required parameter 'tube' when calling ActionsApi.peek_get"
|
393
|
+
end
|
394
|
+
# resource path
|
395
|
+
local_var_path = '/peek'
|
396
|
+
|
397
|
+
# query parameters
|
398
|
+
query_params = {}
|
399
|
+
query_params[:'tube'] = tube
|
400
|
+
query_params[:'buried'] = opts[:'buried'] if !opts[:'buried'].nil?
|
401
|
+
|
402
|
+
# header parameters
|
403
|
+
header_params = {}
|
404
|
+
# HTTP header 'Accept' (if needed)
|
405
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
406
|
+
# HTTP header 'Content-Type'
|
407
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
408
|
+
|
409
|
+
# form parameters
|
410
|
+
form_params = {}
|
411
|
+
|
412
|
+
# http body (model)
|
413
|
+
post_body = nil
|
414
|
+
auth_names = []
|
415
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
416
|
+
:header_params => header_params,
|
417
|
+
:query_params => query_params,
|
418
|
+
:form_params => form_params,
|
419
|
+
:body => post_body,
|
420
|
+
:auth_names => auth_names,
|
421
|
+
:return_type => 'JobResponse')
|
422
|
+
if @api_client.config.debugging
|
423
|
+
@api_client.config.logger.debug "API called: ActionsApi#peek_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
424
|
+
end
|
425
|
+
return data, status_code, headers
|
426
|
+
end
|
427
|
+
# Release
|
428
|
+
# Releases job back into queue
|
429
|
+
# @param job_id Job ID
|
430
|
+
# @param [Hash] opts the optional parameters
|
431
|
+
# @return [BasicResponse]
|
432
|
+
def release_put(job_id, opts = {})
|
433
|
+
data, _status_code, _headers = release_put_with_http_info(job_id, opts)
|
434
|
+
data
|
435
|
+
end
|
436
|
+
|
437
|
+
# Release
|
438
|
+
# Releases job back into queue
|
439
|
+
# @param job_id Job ID
|
440
|
+
# @param [Hash] opts the optional parameters
|
441
|
+
# @return [Array<(BasicResponse, Fixnum, Hash)>] BasicResponse data, response status code and response headers
|
442
|
+
def release_put_with_http_info(job_id, opts = {})
|
443
|
+
if @api_client.config.debugging
|
444
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.release_put ...'
|
445
|
+
end
|
446
|
+
# verify the required parameter 'job_id' is set
|
447
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
448
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling ActionsApi.release_put"
|
449
|
+
end
|
450
|
+
# resource path
|
451
|
+
local_var_path = '/release'
|
452
|
+
|
453
|
+
# query parameters
|
454
|
+
query_params = {}
|
455
|
+
query_params[:'job_id'] = job_id
|
456
|
+
|
457
|
+
# header parameters
|
458
|
+
header_params = {}
|
459
|
+
# HTTP header 'Accept' (if needed)
|
460
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
461
|
+
# HTTP header 'Content-Type'
|
462
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
463
|
+
|
464
|
+
# form parameters
|
465
|
+
form_params = {}
|
466
|
+
|
467
|
+
# http body (model)
|
468
|
+
post_body = nil
|
469
|
+
auth_names = []
|
470
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
471
|
+
:header_params => header_params,
|
472
|
+
:query_params => query_params,
|
473
|
+
:form_params => form_params,
|
474
|
+
:body => post_body,
|
475
|
+
:auth_names => auth_names,
|
476
|
+
:return_type => 'BasicResponse')
|
477
|
+
if @api_client.config.debugging
|
478
|
+
@api_client.config.logger.debug "API called: ActionsApi#release_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
479
|
+
end
|
480
|
+
return data, status_code, headers
|
481
|
+
end
|
482
|
+
# Set Children Started
|
483
|
+
# When a parent job doesn't know how many children are going to be added, this is the event that sets the final children count on the parent_job, allowing it to run when the children are done.
|
484
|
+
# @param job_id Job ID
|
485
|
+
# @param [Hash] opts the optional parameters
|
486
|
+
# @return [BasicResponse]
|
487
|
+
def set_children_started_put(job_id, opts = {})
|
488
|
+
data, _status_code, _headers = set_children_started_put_with_http_info(job_id, opts)
|
489
|
+
data
|
490
|
+
end
|
491
|
+
|
492
|
+
# Set Children Started
|
493
|
+
# When a parent job doesn't know how many children are going to be added, this is the event that sets the final children count on the parent_job, allowing it to run when the children are done.
|
494
|
+
# @param job_id Job ID
|
495
|
+
# @param [Hash] opts the optional parameters
|
496
|
+
# @return [Array<(BasicResponse, Fixnum, Hash)>] BasicResponse data, response status code and response headers
|
497
|
+
def set_children_started_put_with_http_info(job_id, opts = {})
|
498
|
+
if @api_client.config.debugging
|
499
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.set_children_started_put ...'
|
500
|
+
end
|
501
|
+
# verify the required parameter 'job_id' is set
|
502
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
503
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling ActionsApi.set_children_started_put"
|
504
|
+
end
|
505
|
+
# resource path
|
506
|
+
local_var_path = '/set_children_started'
|
507
|
+
|
508
|
+
# query parameters
|
509
|
+
query_params = {}
|
510
|
+
query_params[:'job_id'] = job_id
|
511
|
+
|
512
|
+
# header parameters
|
513
|
+
header_params = {}
|
514
|
+
# HTTP header 'Accept' (if needed)
|
515
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
516
|
+
# HTTP header 'Content-Type'
|
517
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
518
|
+
|
519
|
+
# form parameters
|
520
|
+
form_params = {}
|
521
|
+
|
522
|
+
# http body (model)
|
523
|
+
post_body = nil
|
524
|
+
auth_names = []
|
525
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
526
|
+
:header_params => header_params,
|
527
|
+
:query_params => query_params,
|
528
|
+
:form_params => form_params,
|
529
|
+
:body => post_body,
|
530
|
+
:auth_names => auth_names,
|
531
|
+
:return_type => 'BasicResponse')
|
532
|
+
if @api_client.config.debugging
|
533
|
+
@api_client.config.logger.debug "API called: ActionsApi#set_children_started_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
534
|
+
end
|
535
|
+
return data, status_code, headers
|
536
|
+
end
|
537
|
+
# Throttle
|
538
|
+
# Creates a throttle on a tube
|
539
|
+
# @param throttle Throttle info
|
540
|
+
# @param [Hash] opts the optional parameters
|
541
|
+
# @return [TubeRef]
|
542
|
+
def throttle_post(throttle, opts = {})
|
543
|
+
data, _status_code, _headers = throttle_post_with_http_info(throttle, opts)
|
544
|
+
data
|
545
|
+
end
|
546
|
+
|
547
|
+
# Throttle
|
548
|
+
# Creates a throttle on a tube
|
549
|
+
# @param throttle Throttle info
|
550
|
+
# @param [Hash] opts the optional parameters
|
551
|
+
# @return [Array<(TubeRef, Fixnum, Hash)>] TubeRef data, response status code and response headers
|
552
|
+
def throttle_post_with_http_info(throttle, opts = {})
|
553
|
+
if @api_client.config.debugging
|
554
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.throttle_post ...'
|
555
|
+
end
|
556
|
+
# verify the required parameter 'throttle' is set
|
557
|
+
if @api_client.config.client_side_validation && throttle.nil?
|
558
|
+
fail ArgumentError, "Missing the required parameter 'throttle' when calling ActionsApi.throttle_post"
|
559
|
+
end
|
560
|
+
# resource path
|
561
|
+
local_var_path = '/throttle'
|
562
|
+
|
563
|
+
# query parameters
|
564
|
+
query_params = {}
|
565
|
+
|
566
|
+
# header parameters
|
567
|
+
header_params = {}
|
568
|
+
# HTTP header 'Accept' (if needed)
|
569
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
570
|
+
# HTTP header 'Content-Type'
|
571
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
572
|
+
|
573
|
+
# form parameters
|
574
|
+
form_params = {}
|
575
|
+
|
576
|
+
# http body (model)
|
577
|
+
post_body = @api_client.object_to_http_body(throttle)
|
578
|
+
auth_names = []
|
579
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
580
|
+
:header_params => header_params,
|
581
|
+
:query_params => query_params,
|
582
|
+
:form_params => form_params,
|
583
|
+
:body => post_body,
|
584
|
+
:auth_names => auth_names,
|
585
|
+
:return_type => 'TubeRef')
|
586
|
+
if @api_client.config.debugging
|
587
|
+
@api_client.config.logger.debug "API called: ActionsApi#throttle_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
588
|
+
end
|
589
|
+
return data, status_code, headers
|
590
|
+
end
|
591
|
+
# Touch
|
592
|
+
# Touch job
|
593
|
+
# @param job_id Job ID
|
594
|
+
# @param [Hash] opts the optional parameters
|
595
|
+
# @return [BasicResponse]
|
596
|
+
def touch_put(job_id, opts = {})
|
597
|
+
data, _status_code, _headers = touch_put_with_http_info(job_id, opts)
|
598
|
+
data
|
599
|
+
end
|
600
|
+
|
601
|
+
# Touch
|
602
|
+
# Touch job
|
603
|
+
# @param job_id Job ID
|
604
|
+
# @param [Hash] opts the optional parameters
|
605
|
+
# @return [Array<(BasicResponse, Fixnum, Hash)>] BasicResponse data, response status code and response headers
|
606
|
+
def touch_put_with_http_info(job_id, opts = {})
|
607
|
+
if @api_client.config.debugging
|
608
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.touch_put ...'
|
609
|
+
end
|
610
|
+
# verify the required parameter 'job_id' is set
|
611
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
612
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling ActionsApi.touch_put"
|
613
|
+
end
|
614
|
+
# resource path
|
615
|
+
local_var_path = '/touch'
|
616
|
+
|
617
|
+
# query parameters
|
618
|
+
query_params = {}
|
619
|
+
query_params[:'job_id'] = job_id
|
620
|
+
|
621
|
+
# header parameters
|
622
|
+
header_params = {}
|
623
|
+
# HTTP header 'Accept' (if needed)
|
624
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
625
|
+
# HTTP header 'Content-Type'
|
626
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
627
|
+
|
628
|
+
# form parameters
|
629
|
+
form_params = {}
|
630
|
+
|
631
|
+
# http body (model)
|
632
|
+
post_body = nil
|
633
|
+
auth_names = []
|
634
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
635
|
+
:header_params => header_params,
|
636
|
+
:query_params => query_params,
|
637
|
+
:form_params => form_params,
|
638
|
+
:body => post_body,
|
639
|
+
:auth_names => auth_names,
|
640
|
+
:return_type => 'BasicResponse')
|
641
|
+
if @api_client.config.debugging
|
642
|
+
@api_client.config.logger.debug "API called: ActionsApi#touch_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
643
|
+
end
|
644
|
+
return data, status_code, headers
|
645
|
+
end
|
646
|
+
# Clear Tube
|
647
|
+
# Delete all contents of tube
|
648
|
+
# @param tube Tube Name
|
649
|
+
# @param [Hash] opts the optional parameters
|
650
|
+
# @return [BasicResponse]
|
651
|
+
def tube_delete(tube, opts = {})
|
652
|
+
data, _status_code, _headers = tube_delete_with_http_info(tube, opts)
|
653
|
+
data
|
654
|
+
end
|
655
|
+
|
656
|
+
# Clear Tube
|
657
|
+
# Delete all contents of tube
|
658
|
+
# @param tube Tube Name
|
659
|
+
# @param [Hash] opts the optional parameters
|
660
|
+
# @return [Array<(BasicResponse, Fixnum, Hash)>] BasicResponse data, response status code and response headers
|
661
|
+
def tube_delete_with_http_info(tube, opts = {})
|
662
|
+
if @api_client.config.debugging
|
663
|
+
@api_client.config.logger.debug 'Calling API: ActionsApi.tube_delete ...'
|
664
|
+
end
|
665
|
+
# verify the required parameter 'tube' is set
|
666
|
+
if @api_client.config.client_side_validation && tube.nil?
|
667
|
+
fail ArgumentError, "Missing the required parameter 'tube' when calling ActionsApi.tube_delete"
|
668
|
+
end
|
669
|
+
# resource path
|
670
|
+
local_var_path = '/tube'
|
671
|
+
|
672
|
+
# query parameters
|
673
|
+
query_params = {}
|
674
|
+
query_params[:'tube'] = tube
|
675
|
+
|
676
|
+
# header parameters
|
677
|
+
header_params = {}
|
678
|
+
# HTTP header 'Accept' (if needed)
|
679
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
680
|
+
# HTTP header 'Content-Type'
|
681
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
682
|
+
|
683
|
+
# form parameters
|
684
|
+
form_params = {}
|
685
|
+
|
686
|
+
# http body (model)
|
687
|
+
post_body = nil
|
688
|
+
auth_names = []
|
689
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
690
|
+
:header_params => header_params,
|
691
|
+
:query_params => query_params,
|
692
|
+
:form_params => form_params,
|
693
|
+
:body => post_body,
|
694
|
+
:auth_names => auth_names,
|
695
|
+
:return_type => 'BasicResponse')
|
696
|
+
if @api_client.config.debugging
|
697
|
+
@api_client.config.logger.debug "API called: ActionsApi#tube_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
698
|
+
end
|
699
|
+
return data, status_code, headers
|
700
|
+
end
|
701
|
+
end
|
702
|
+
end
|