@@ 32-47 (lines=16) @@ | ||
29 | * @param array $params |
|
30 | * @return PromiseInterface |
|
31 | */ |
|
32 | public function output(string $id, string $node = null, string $step = null, array $params = []): PromiseInterface |
|
33 | { |
|
34 | if ($node && $step) { |
|
35 | $path = sprintf('/execution/%s/output/node/%s/step/%s', urlencode($id), urlencode($node), urlencode($step)); |
|
36 | } elseif ($node && !$step) { |
|
37 | $path = sprintf('/execution/%s/output/node/%s', urlencode($id), urlencode($node)); |
|
38 | } elseif (!$node && $step) { |
|
39 | $path = sprintf('/execution/%s/output/step/%s', urlencode($id), urlencode($step)); |
|
40 | } else { |
|
41 | $path = sprintf('/execution/%s/output', urlencode($id)); |
|
42 | } |
|
43 | ||
44 | return $this->client->getConfiguration()->getGuzzle()->sendAsync( |
|
45 | new Request('GET', $this->client->getConfiguration()->getBaseUri() . $path, [], $this->client->getConfiguration()->getFormat()->formatParams($params)) |
|
46 | ); |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @param string $id |
@@ 76-91 (lines=16) @@ | ||
73 | * @param array $params |
|
74 | * @return PromiseInterface |
|
75 | */ |
|
76 | public function output(string $id, string $node = null, string $step = null, array $params = []): PromiseInterface |
|
77 | { |
|
78 | if ($node && $step) { |
|
79 | $path = sprintf('/execution/%s/output/node/%s/step/%s', urlencode($id), urlencode($node), urlencode($step)); |
|
80 | } elseif ($node && !$step) { |
|
81 | $path = sprintf('/execution/%s/output/node/%s', urlencode($id), urlencode($node)); |
|
82 | } elseif (!$node && $step) { |
|
83 | $path = sprintf('/execution/%s/output/step/%s', urlencode($id), urlencode($step)); |
|
84 | } else { |
|
85 | $path = sprintf('/execution/%s/output', urlencode($id)); |
|
86 | } |
|
87 | ||
88 | return $this->client->getConfiguration()->getGuzzle()->sendAsync( |
|
89 | new Request('GET', $this->client->getConfiguration()->getBaseUri() . $path, [], $this->client->getConfiguration()->getFormat()->formatParams($params)) |
|
90 | ); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * @param string $id |