Skip to content

Commit a3b75e3

Browse files
committed
[API] Updates generated code to use new Response object
1 parent 3aeebf4 commit a3b75e3

File tree

388 files changed

+1233
-403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+1233
-403
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def delete(arguments = {})
4141
path = "_async_search/#{Utils.__listify(_id)}"
4242
params = {}
4343

44-
perform_request(method, path, params, body, headers).body
44+
Elasticsearch::API::Response.new(
45+
perform_request(method, path, params, body, headers)
46+
)
4547
end
4648
end
4749
end

elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def get(arguments = {})
4444
path = "_async_search/#{Utils.__listify(_id)}"
4545
params = Utils.process_params(arguments)
4646

47-
perform_request(method, path, params, body, headers).body
47+
Elasticsearch::API::Response.new(
48+
perform_request(method, path, params, body, headers)
49+
)
4850
end
4951
end
5052
end

elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def status(arguments = {})
4141
path = "_async_search/status/#{Utils.__listify(_id)}"
4242
params = {}
4343

44-
perform_request(method, path, params, body, headers).body
44+
Elasticsearch::API::Response.new(
45+
perform_request(method, path, params, body, headers)
46+
)
4547
end
4648
end
4749
end

elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def submit(arguments = {})
8585
end
8686
params = Utils.process_params(arguments)
8787

88-
perform_request(method, path, params, body, headers).body
88+
Elasticsearch::API::Response.new(
89+
perform_request(method, path, params, body, headers)
90+
)
8991
end
9092
end
9193
end

elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def delete_autoscaling_policy(arguments = {})
4141
path = "_autoscaling/policy/#{Utils.__listify(_name)}"
4242
params = {}
4343

44-
perform_request(method, path, params, body, headers).body
44+
Elasticsearch::API::Response.new(
45+
perform_request(method, path, params, body, headers)
46+
)
4547
end
4648
end
4749
end

elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def get_autoscaling_capacity(arguments = {})
3636
path = "_autoscaling/capacity"
3737
params = {}
3838

39-
perform_request(method, path, params, body, headers).body
39+
Elasticsearch::API::Response.new(
40+
perform_request(method, path, params, body, headers)
41+
)
4042
end
4143
end
4244
end

elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def get_autoscaling_policy(arguments = {})
4141
path = "_autoscaling/policy/#{Utils.__listify(_name)}"
4242
params = {}
4343

44-
perform_request(method, path, params, body, headers).body
44+
Elasticsearch::API::Response.new(
45+
perform_request(method, path, params, body, headers)
46+
)
4547
end
4648
end
4749
end

elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def put_autoscaling_policy(arguments = {})
4343
path = "_autoscaling/policy/#{Utils.__listify(_name)}"
4444
params = {}
4545

46-
perform_request(method, path, params, body, headers).body
46+
Elasticsearch::API::Response.new(
47+
perform_request(method, path, params, body, headers)
48+
)
4749
end
4850
end
4951
end

elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def bulk(arguments = {})
6767
end
6868

6969
headers.merge!("Content-Type" => "application/x-ndjson")
70-
perform_request(method, path, params, payload, headers).body
70+
Elasticsearch::API::Response.new(
71+
perform_request(method, path, params, payload, headers)
72+
)
7173
end
7274
end
7375
end

elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def aliases(arguments = {})
5151
params = Utils.process_params(arguments)
5252
params[:h] = Utils.__listify(params[:h]) if params[:h]
5353

54-
perform_request(method, path, params, body, headers).body
54+
Elasticsearch::API::Response.new(
55+
perform_request(method, path, params, body, headers)
56+
)
5557
end
5658
end
5759
end

0 commit comments

Comments
 (0)