mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Use version 1.1 of twitter stream API endpoint
The v1 endpoint was discontinued at the end of april. #1490
This commit is contained in:
parent
71a0d4f922
commit
104dc29169
2 changed files with 2 additions and 2 deletions
|
@ -182,7 +182,7 @@ module Agents
|
|||
filters = filters.map(&:downcase).uniq
|
||||
|
||||
stream = Twitter::JSONStream.connect(
|
||||
:path => "/1/statuses/#{(filters && filters.length > 0) ? 'filter' : 'sample'}.json#{"?track=#{filters.map {|f| CGI::escape(f) }.join(",")}" if filters && filters.length > 0}",
|
||||
:path => "/1.1/statuses/#{(filters && filters.length > 0) ? 'filter' : 'sample'}.json#{"?track=#{filters.map {|f| CGI::escape(f) }.join(",")}" if filters && filters.length > 0}",
|
||||
:ssl => true,
|
||||
:oauth => {
|
||||
:consumer_key => agent.twitter_consumer_key,
|
||||
|
|
|
@ -212,7 +212,7 @@ describe Agents::TwitterStreamAgent do
|
|||
end
|
||||
|
||||
it "initializes Twitter::JSONStream" do
|
||||
mock(Twitter::JSONStream).connect({:path=>"/1/statuses/filter.json?track=agent",
|
||||
mock(Twitter::JSONStream).connect({:path=>"/1.1/statuses/filter.json?track=agent",
|
||||
:ssl=>true, :oauth=>{:consumer_key=>"twitteroauthkey",
|
||||
:consumer_secret=>"twitteroauthsecret",
|
||||
:access_key=>"1234token",
|
||||
|
|
Loading…
Add table
Reference in a new issue