问题描述
我想打电话给 retweeted_by_user(user, options = {}).如何创建对象 Twitter::Tweet(在 Twitter::REST::Timelines 模块中)的实例来调用此方法.是实例方法,对吗?
I want to call retweeted_by_user(user, options = {}). How do I create instance of object Twitter::Tweet (in Twitter::REST::Timelines module) to call this method. It is instance method, correct?
我是为 Twitter::REST::CLIENT 做的
I did this for Twitter::REST::CLIENT
client = client = Twitter::REST::Client.new do |config|
config.consumer_key = "..."
config.consumer_secret = "..."
config.access_token = "..."
config.access_token_secret = "..."
end
但它不适用于 Twitter::Tweet
but it does not work for Twitter::Tweet
client = client = Twitter::Tweet.new do |config|
config.consumer_key = "..."
config.consumer_secret = "..."
config.access_token = "..."
config.access_token_secret = "..."
end
这里是 Twitter gem 的文档.我需要多一点解释http://rdoc.info/gems/twitter/Twitter/REST/Timelines#retweeted_by_user-instance_method
Here are the docs for Twitter gem. I need a little more explanationhttp://rdoc.info/gems/twitter/Twitter/REST/Timelines#retweeted_by_user-instance_method
推荐答案
spec 是最好的文档和解释:
spec are the best documentation and explanation:
这篇关于如何创建 Twitter::Tweet 实例以创建 retweeted_by_user的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!