_params = array(); $this->_auth = true; $this->_timeline = true; } /** * Sets the API method to be called. * * @param string $method Method name */ public function setMethod($method) { $this->_method = $method; } /** * Returns the API method to be called. * * @return string */ public function getMethod() { return $this->_method; } /** * Sets whether or not the API method to be called requires * authentication. * * @param bool $flag TRUE if authentication is required, FALSE otherwise, * defaults to TRUE (optional) */ public function useAuth($flag = true) { $this->_auth = $flag; } /** * Returns whether or not the API method to be called requires * authentication. * * @return bool TRUE if authentication is required, FALSE otherwise */ public function requiresAuth() { return $this->_auth; } /** * Sets whether or not the API method to be called requires a timeline. * * @param bool $flag TRUE if a timeline is required, FALSE otherwise, * defaults to TRUE (optional) */ public function useTimeline($flag = true) { $this->_timeline = $flag; } /** * Returns whether or not the API method to be called requires a * timeline. * * @return bool TRUE if a timeline is required, FALSE otherwise */ public function requiresTimeline() { return $this->_timeline; } /** * Adds a parameter to the request. * * @param string $name Name of the parameter * @param string $value Value of the parameter */ public function addParameter($name, $value) { $this->_params[$name] = $value; } /** * Returns the parameters for the request. * * @return array */ public function getParameters() { return $this->_params; } }