@@ 269-283 (lines=15) @@ | ||
266 | * |
|
267 | * @return \Psr\Http\Message\ResponseInterface |
|
268 | */ |
|
269 | public function resize($id, $parameters = [], $fetch = self::FETCH_OBJECT) |
|
270 | { |
|
271 | $queryParam = new QueryParam(); |
|
272 | $queryParam->setDefault('h', null); |
|
273 | $queryParam->setDefault('w', null); |
|
274 | $url = '/containers/{id}/resize'; |
|
275 | $url = str_replace('{id}', $id, $url); |
|
276 | $url = $url . ('?' . $queryParam->buildQueryString($parameters)); |
|
277 | $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); |
|
278 | $body = $queryParam->buildFormDataString($parameters); |
|
279 | $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); |
|
280 | $response = $this->httpClient->sendRequest($request); |
|
281 | ||
282 | return $response; |
|
283 | } |
|
284 | ||
285 | /** |
|
286 | * Start the container id. |
|
@@ 529-543 (lines=15) @@ | ||
526 | * |
|
527 | * @return \Psr\Http\Message\ResponseInterface |
|
528 | */ |
|
529 | public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) |
|
530 | { |
|
531 | $queryParam = new QueryParam(); |
|
532 | $queryParam->setDefault('v', null); |
|
533 | $queryParam->setDefault('force', null); |
|
534 | $url = '/containers/{id}'; |
|
535 | $url = str_replace('{id}', $id, $url); |
|
536 | $url = $url . ('?' . $queryParam->buildQueryString($parameters)); |
|
537 | $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); |
|
538 | $body = $queryParam->buildFormDataString($parameters); |
|
539 | $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); |
|
540 | $response = $this->httpClient->sendRequest($request); |
|
541 | ||
542 | return $response; |
|
543 | } |
|
544 | ||
545 | /** |
|
546 | * Get an tar archive of a resource in the filesystem of container id. |