_validateUri($url); $this->getHttpClient()->setUri($this->_apiUri); $this->getHttpClient()->setParameterGet('long_url', $url); $response = $this->getHttpClient()->request(); return $response->getBody(); } /** * Reveals target for short URL * * @param string $shortenedUrl URL to reveal target of * @throws Zend_Service_ShortUrl_Exception When URL is not valid or is not shortened by this service * @return string */ public function unshorten($shortenedUrl) { $this->_validateUri($shortenedUrl); $this->_verifyBaseUri($shortenedUrl); $this->getHttpClient()->setUri($this->_apiUri); $this->getHttpClient()->setParameterGet('short_url', $shortenedUrl); $response = $this->getHttpClient()->request(); return $response->getBody(); } }