Sha256: 81691f5d62226320d4223efebc69968ad7af74cb3931b72f828bc3fda8886d2e
Contents?: true
Size: 554 Bytes
Versions: 5
Compression:
Stored size: 554 Bytes
Contents
module StreamBot # wrapper class for dealing with twitters native retweet api class Retweet # intitialize method aka constructor def initialize(params) auth_type = params['auth_type'] auth_params = params[auth_type] case auth_type when "oauth" then @handler = StreamBot::OAuth.new(auth_params) when "http" then @handler = StreamBot::HTTP.new(auth_params) end end # retweets the status with given id def retweet(id) @handler.post("/statuses/retweet/#{id}.json",nil) end end end
Version data entries
5 entries across 5 versions & 1 rubygems