2

I am using sferik gem to get tweets.

I want to pass following extra parameters to method "user_timeline":

count, include_rts and exclude_replies

Is it possible to pass these in as parameters?

If yes, how can I pass these extra parameters to "user_timeline" method and get the appropriate response back according to these extra params?

Thanks for the help!!

Shashi
  • 35
  • 1
  • 6

1 Answers1

1

Check the documentation here. You should be able to pass the supported options like so:

user_timeline(your_user, {
 :include_rts => true,
 :exclude_replies => true,
 :count => 42 
})

Update As @mudasobwa correctly pointed out in the comment, if you are using ruby 1.9+, you can use the simpler syntax below:

user_timeline(your_user, include_rts: true, exclude_replies: true, count: 42)
Shaunak
  • 17,377
  • 5
  • 53
  • 84