Skip to content

Commit

Permalink
fixed the since argument in Base#direct_message method (jnewland)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.addictedtonew.com/public/gems/twitter@71 fe7eae16-9a24-0410-a59d-9e59979e88be
  • Loading branch information
jnunemaker committed Jun 22, 2007
1 parent 69a78d9 commit 41a9006
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/twitter/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def followers
#
# <tt>since</tt> - (optional) Narrows the resulting list of direct messages to just those sent after the specified HTTP-formatted date.
def direct_messages(since=nil)
doc = request('direct_messages.xml', { :auth => true })
path = 'direct_messages.xml'
since.nil? ? 1 : path << "?since=#{CGI.escape(since.to_s)}"
doc = request(path, { :auth => true })
(doc/:direct_message).inject([]) { |dms, dm| dms << DirectMessage.new_from_xml(dm); dms }
end

Expand Down

0 comments on commit 41a9006

Please sign in to comment.