Issues

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

Issue Type: Bug Created: 2009-01-28T01:28:51.000+0000 Last Updated: 2009-02-06T09:51:19.000+0000 Status: Resolved Fix version(s): - 1.7.5 (16/Feb/09)

Reporter: akira (akira.spb) Assignee: Jon Whitcraft (sidhighwind) Tags: - Zend_Service_Twitter

Related issues: Attachments: - fix-twiter-service-zf.php

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

Posted by akira (akira.spb) on 2009-01-28T01:31:16.000+0000

a piece of the amended code

Posted by Jon Whitcraft (sidhighwind) on 2009-01-28T03:49:08.000+0000

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

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-01-30T07:51:20.000+0000

Solved in SVN r13857

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-01-30T17:00:09.000+0000

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.

Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-02-02T17:47:29.000+0000

Sorry, not in 1.7.4. please wait.

Posted by Jon Whitcraft (sidhighwind) on 2009-02-05T05:58:57.000+0000

Reopening insue since it was not fixed in the trunk.

Posted by Jon Whitcraft (sidhighwind) on 2009-02-05T06:01:06.000+0000

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

Posted by Jon Whitcraft (sidhighwind) on 2009-02-06T08:56:43.000+0000

This was merged into the 1.7 release branch with r13994

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts