|
@@ -52,12 +52,12 @@ |
|
|
block discarded – undo |
|
52
|
52
|
* @param array $options |
|
53
|
53
|
* @return \GuzzleHttp\Promise\PromiseInterface |
|
54
|
54
|
*/ |
|
55
|
|
- public function shortenAsync($url, array $options = []) |
|
|
55
|
+ public function shortenAsync($url, array $options = [ ]) |
|
56
|
56
|
{ |
|
57
|
57
|
$options = array_merge(Arr::add($this->defaults, 'json.dynamicLinkInfo.link', $url), $options); |
|
58
|
58
|
$request = new Request('POST', '/v1/shortLinks'); |
|
59
|
59
|
|
|
60
|
|
- return $this->client->sendAsync($request, $options)->then(function (ResponseInterface $response) { |
|
|
60
|
+ return $this->client->sendAsync($request, $options)->then(function(ResponseInterface $response) { |
|
61
|
61
|
return json_decode($response->getBody()->getContents())->shortLink; |
|
62
|
62
|
}); |
|
63
|
63
|
} |
Please login to merge, or discard this patch.