我尝试只接收来自tumplr帖子或博客的某些回复。例如:
client = Tumblr::Client.new({
:consumer_key => 'xxx',
:consumer_secret => 'xxx',
:oauth_token => 'xxx',
:oauth_token_secret => 'xxx'
})
myblog = client.posts
puts myblog["posts"].each do |posts|
puts posts["id"]
end
我收到错误:
/Users/xxx/.rvm/gems/ruby-2.2.0/gems/tumblr_client-0.8.5/lib/tumblr/blog.rb:32:in
帖子':错误的参数数量(0表示1..2)(ArgumentError)
来自tumblr.rb:42:<main>''
...我试图能够调用特定的响应,而不是获取您通常会收到的大量帖子信息。拜托,谢谢你的帮助。 :)
答案 0 :(得分:1)
尝试更改:
myblog = client.posts
的
myblog = client.posts(“yourblog.tumblr.com”)
https://github.com/tumblr/tumblr_client/blob/master/README.md