public function reply($text) { if (true === @$this->config['strict'] && strlen($text) > 140) { throw new Exception('Message too long!'); } else { $text = substr($text, 0, 140); } $get = array(); $url = 'http://api.twitter.com/1.1/statuses/update.' . $this->config['format']; return $this->build($this->transport->fetch(new Post($url, $get, array('status' => $text), array('oauth' => $this->config['oauth'])))->document(), array('\\Twitter\\User\\TimeLine\\Twitt', 'user' => '\\Twitter\\User')); }
/** * 'http://weather.yahooapis.com/forecastrss?u=c&w=' . 676757; * * @param string $code e.g. 676757 for munich * * @return \CryptoCompress\WebService\Yahoo\Weather\Document */ public function getByCode($code) { $get = array('u' => $this->config['degree'], 'w' => $code, 'd' => 2); return new Weather\Document($this->transport->fetch(new Get($this->config['url'], $get))->document()); }