Issues

ZF-5646: directMessageMessages and directMessageSent do not use rest params

Description

/** * Retrieve direct messages for the current user * * $params may include one or more of the following keys * - since: return results only after the date specified * - since_id: return statuses only greater than the one specified * - page: return page X of results * * @param array $params * @return Zend_Rest_Client_Result */ public function directMessageMessages(array $params = array()) { $this->_init(); $path = '/direct_messages.xml'; $_params = array(); foreach ($params as $key => $value) { switch (strtolower($key)) { case 'since': $this->_setDate($value); break; case 'since_id': $this->since_id = (int) $value; break; case 'page': $this->page = (int) $value; break; default: break; } } $response = $this->restGet($path,$_params); return new Zend_Rest_Client_Result($response->getBody()); }

/**
 * Retrieve list of direct messages sent by current user
 *
 * $params may include one or more of the following keys
 * - since: return results only after the date specified
 * - since_id: return statuses only greater than the one specified
 * - page: return page X of results
 *
 * @param  array $params
 * @return Zend_Rest_Client_Result
 */
public function directMessageSent(array $params = array())
{
    $this->_init();
    $path = '/direct_messages/sent.xml';
    foreach ($params as $key => $value) {
        switch (strtolower($key)) {
            case 'since':
                $this->_setDate($value);
                break;
            case 'since_id':
                $this->since_id = (int) $value;
                break;
            case 'page':
                $this->page = (int) $value;
                break;
            default:
                break;
        }
    }
    $response = $this->restGet($path);
    return new Zend_Rest_Client_Result($response->getBody());
}

Comments

a piece of the amended code

If you post a patch file this can get fixed faster. I will look at once a proper patch file is submitted.

Solved in SVN r13857

I think statusFriendsTimeline() and favoriteFavorites() have also same problem, and I fixed.

I changed as following.

$this->page to $_params['page']

$this->since_id to $_params['since_id']

and adds second parameter to restGet() if needed.

Sorry, not in 1.7.4. please wait.

Reopening insue since it was not fixed in the trunk.

When you posted this to trunk did you also merge it into the 1.7 branch?

This was merged into the 1.7 release branch with r13994