Skip to content

Commit b9f9353

Browse files
committed
Updated endpoints + YAML tests + added bulk and ml integration tests
1 parent 4566b41 commit b9f9353

Some content is hidden

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

45 files changed

+1751
-1412
lines changed

src/Endpoints/AsyncSearch.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function delete(array $params = [])
5656
$method = 'DELETE';
5757

5858
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
59-
$headers = array (
60-
'Accept' => 'application/json',
61-
);
59+
$headers = [
60+
'Accept' => 'application/json',
61+
];
6262
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
6363
}
6464

@@ -94,9 +94,9 @@ public function get(array $params = [])
9494
$method = 'GET';
9595

9696
$url = $this->addQueryString($url, $params, ['wait_for_completion_timeout','keep_alive','typed_keys','pretty','human','error_trace','source','filter_path']);
97-
$headers = array (
98-
'Accept' => 'application/json',
99-
);
97+
$headers = [
98+
'Accept' => 'application/json',
99+
];
100100
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
101101
}
102102

@@ -129,9 +129,9 @@ public function status(array $params = [])
129129
$method = 'GET';
130130

131131
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
132-
$headers = array (
133-
'Accept' => 'application/json',
134-
);
132+
$headers = [
133+
'Accept' => 'application/json',
134+
];
135135
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
136136
}
137137

@@ -209,10 +209,10 @@ public function submit(array $params = [])
209209
$method = 'POST';
210210
}
211211
$url = $this->addQueryString($url, $params, ['wait_for_completion_timeout','keep_on_completion','keep_alive','batched_reduce_size','request_cache','analyzer','analyze_wildcard','default_operator','df','explain','stored_fields','docvalue_fields','from','ignore_unavailable','ignore_throttled','allow_no_indices','expand_wildcards','lenient','preference','q','routing','search_type','size','sort','_source','_source_excludes','_source_includes','terminate_after','stats','suggest_field','suggest_mode','suggest_size','suggest_text','timeout','track_scores','track_total_hits','allow_partial_search_results','typed_keys','version','seq_no_primary_term','max_concurrent_shard_requests','pretty','human','error_trace','source','filter_path']);
212-
$headers = array (
213-
'Accept' => 'application/json',
214-
'Content-Type' => 'application/json',
215-
);
212+
$headers = [
213+
'Accept' => 'application/json',
214+
'Content-Type' => 'application/json',
215+
];
216216
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
217217
}
218218
}

src/Endpoints/Autoscaling.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function deleteAutoscalingPolicy(array $params = [])
5656
$method = 'DELETE';
5757

5858
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
59-
$headers = array (
60-
'Accept' => 'application/json',
61-
);
59+
$headers = [
60+
'Accept' => 'application/json',
61+
];
6262
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
6363
}
6464

@@ -74,9 +74,9 @@ public function getAutoscalingCapacity(array $params = [])
7474
$method = 'GET';
7575

7676
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
77-
$headers = array (
78-
'Accept' => 'application/json',
79-
);
77+
$headers = [
78+
'Accept' => 'application/json',
79+
];
8080
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
8181
}
8282

@@ -109,9 +109,9 @@ public function getAutoscalingPolicy(array $params = [])
109109
$method = 'GET';
110110

111111
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
112-
$headers = array (
113-
'Accept' => 'application/json',
114-
);
112+
$headers = [
113+
'Accept' => 'application/json',
114+
];
115115
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
116116
}
117117

@@ -140,15 +140,15 @@ public function getAutoscalingPolicy(array $params = [])
140140
*/
141141
public function putAutoscalingPolicy(array $params = [])
142142
{
143-
$this->checkRequiredParameters(['name'], $params);
143+
$this->checkRequiredParameters(['name','body'], $params);
144144
$url = '/_autoscaling/policy/' . $this->encode($params['name']);
145145
$method = 'PUT';
146146

147147
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
148-
$headers = array (
149-
'Accept' => 'application/json',
150-
'Content-Type' => 'application/json',
151-
);
148+
$headers = [
149+
'Accept' => 'application/json',
150+
'Content-Type' => 'application/json',
151+
];
152152
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
153153
}
154154
}

0 commit comments

Comments
 (0)