Re: Replies with twitter4r

0 views
Skip to first unread message

S Potter

unread,
Nov 19, 2007, 9:16:38 AM11/19/07
to Dan, twitter...@googlegroups.com
As a quick update on the Twitter4R 0.3.1 release. I wasn't feeling
well this weekend, but I have something working.

I am not a fan of releasing this without thorough testing (that I
currently do not have on the #to_xml fix), but the interface will
remain the same, so if you want to get started writing your apps, you
can add the following require patch do your application to get
started.

-----
gem 'twitter4r', '=0.3.0'
require 'twitter'

class Twitter::Client
@@TIMELINE_URIS[:replies] = '/statuses/replies.json'

alias :old_status :status

def status(action, value = nil)
return self.timeline_for(action, value || {}) if :replies == action
self.old_status(action, value)
end
end
-----

Sample code would look like:
client = Twitter::Client.new(:login => 'bla', :password => 'yadayada')
client.status(:replies)
client.timeline_for(:replies, :page => 3)

When I tested this in IRB this morning I intermittently kept getting
the following error being raised:
>> Bad Gateway (Twitter::RESTError)

This is an issue on the Twitter.com server side. Looks like there are
having one of their not so hot moments right now. So if you get this
error, wait a little while for Twitter.com to stabilize and then try
again.

Hope this helps people get moving quickly. When Twitter4R 0.3.1 is
released you will be able to remove the patching code between the
-----.
Thanks,
Susan

On Nov 15, 2007 9:16 AM, Susan Potter <m...@susanpotter.net> wrote:
> Hopefully over the weekend. I am trying to also fix a problem with
> Model#to_xml when used in Rails applications in the same release. If
> it looks like I can't get the full fix in for #to_xml I will just
> release 0.3.1 with the status(:replies).
>
> Susan
--
mailto:m...@susanpotter.net
www:http://susanpotter.net
blog:http://snakesgemscoffee.susanpotter.net
linkedin:http://linkedin.com/in/susanpotter

SP

unread,
Nov 19, 2007, 9:20:18 AM11/19/07
to twitter4r-users
Sorry for all the typos.

This is why sick people shouldn't get out of bed!:)
Susan
Reply all
Reply to author
Forward
0 new messages