Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
##########################
#NOTICE: Modifying these options in this file has no effect. You must put them in SiriProxy's config.yml!
##########################

- name: 'Twitter'
git: 'git://github.com/netpro2k/SiriProxy-Twitter.git'
consumer_key: "YOUR_KEY"
consumer_key: "YOUR_KEY"
consumer_secret: "YOUR_SECRET"
oauth_token: "YOUR_TOKEN"
oauth_token: "YOUR_TOKEN"
oauth_token_secret: "YOUR_TOKEN_SECRET"
image_url: "http://cl.ly/1l040J1A392n0M1n1g35/content"
12 changes: 6 additions & 6 deletions lib/siriproxy-twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
def initialize(config = {})
@config = config
@config = config

::Twitter.configure do |config|
config.consumer_key = @config['consumer_key']
config.consumer_key = @config['consumer_key']
config.consumer_secret = @config['consumer_secret']
config.oauth_token = @config['oauth_token']
config.oauth_token = @config['oauth_token']
config.oauth_token_secret = @config['oauth_token_secret']
end
end

@twitterClient = ::Twitter::Client.new
end
Expand All @@ -21,7 +21,7 @@ def initialize(config = {})
object = SiriAddViews.new
object.make_root(last_ref_id)
answer = SiriAnswer.new("Tweet", [
SiriAnswerLine.new('logo','http://cl.ly/1l040J1A392n0M1n1g35/content'), # this just makes things looks nice, but is obviously specific to my username
SiriAnswerLine.new('logo', @config['image_url']),
SiriAnswerLine.new(tweetText)
])
object.views << SiriAnswerSnippet.new([answer])
Expand Down