How to use with Sinatra?

7 views
Skip to first unread message

ethnt

unread,
Jul 31, 2010, 9:16:42 PM7/31/10
to Grackle Development
What I'm trying to do is use Grackle to get all the retweets of a
certain tweet, and I want to use Sinatra with this. How would I do so?
Is there an existing example somewhere on GitHub?

Thanks.

Hayes Davis

unread,
Aug 1, 2010, 1:20:26 AM8/1/10
to grac...@googlegroups.com
Nothing special is required to run grackle with Sinatra. You just create a client instance when you need it and use it.

As for getting retweets, the grackle call just maps to the Twitter API endpoint[1]:

client = Grackle::Client.new(YOUR_OPTIONS) # configure with your authentication
client.statuses.retweets? :id=>NNN # Get retweets for some tweet with id NNN

Reply all
Reply to author
Forward
0 new messages