How to get Ruby twitter to check friendship relationship -


how make friendship method work twitter gem check relationships of users friends , or followers? error says there no parameters.

my code is:

require 'twitter' require 'rubygems'  client = twitter::rest::client.new |config|   config.consumer_key = "..."   config.consumer_secret = "..."   config.access_token = "..."   config.access_token_secret = "..." end 

edit :

puts client.friendship('user1','user2').to_s 

response:

#<twitter::relationship:0x007f88c1e58de0> 

how can extract hash response readable output i.e. boolean let me know suppose saying?

http://www.rubydoc.info/github/sferik/twitter/master/twitter/rest/friendsandfollowers:friendship

according documentation, appears you're using wrong method , passing incorrect parameters. parameters not hash keys 'source' , 'target', they're 2 strings representing source , target users.

calling twitter::rest::friendsandfollowers.friendship('user1', 'user2') should return twitter::relationship object containing information relationship between 2 users.

edit

calling client.friendship?('user1', 'user2') returns true if user1 follows user2, , false otherwise.