From e960958d0632638a955d083bbd912f56ddccdb7e Mon Sep 17 00:00:00 2001 From: Ken-ichi Mito Date: Fri, 21 Jun 2013 15:48:34 +0900 Subject: [PATCH] use Net::Twitter::Lite::WithAPIv1_1 instead of Net::Twitter::Lite * s/Net::Twitter::Lite/Net::Twitter::Lite::WithAPIv1_1/g; --- Dev/twitter/dump_timeline.pl | 8 ++++---- Dev/twitter/get_oauth.pl | 4 ++-- Dev/twitter/show_status.pl | 4 ++-- Dev/twitter/twitterbot.pl | 12 ++++++------ Dev/twitter/update_timeline.pl | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Dev/twitter/dump_timeline.pl b/Dev/twitter/dump_timeline.pl index 484a228..ae9cc94 100755 --- a/Dev/twitter/dump_timeline.pl +++ b/Dev/twitter/dump_timeline.pl @@ -9,7 +9,7 @@ use utf8; # it throws a Net::Twitter::Lite::Error object. # You can catch and process these exceptions by using eval blocks and testing $@ ## from http://search.cpan.org/perldoc?Net::Twitter::Lite#ERROR_HANDLING -use Net::Twitter::Lite; +use Net::Twitter::Lite::WithAPIv1_1; use FindBin qw($Bin); use YAML::Tiny; use Data::Dumper; @@ -133,13 +133,13 @@ sub loadconf { } sub login { - # make Net::Twitter::Lite object and login + # make Net::Twitter::Lite::WithAPIv1_1 object and login # param => hash object of configration - # ret => Net::Twitter::Lite object + # ret => Net::Twitter::Lite::WithAPIv1_1 object my $conf = shift @_; - my $bot = Net::Twitter::Lite->new( + my $bot = Net::Twitter::Lite::WithAPIv1_1->new( consumer_key => $conf->{consumer_key}, consumer_secret => $conf->{consumer_secret}, legacy_lists_api => 0, diff --git a/Dev/twitter/get_oauth.pl b/Dev/twitter/get_oauth.pl index ec96c19..39ba14f 100755 --- a/Dev/twitter/get_oauth.pl +++ b/Dev/twitter/get_oauth.pl @@ -2,7 +2,7 @@ use strict; use warnings; use utf8; -use Net::Twitter::Lite; +use Net::Twitter::Lite::WithAPIv1_1; use YAML::Tiny; my $config = (YAML::Tiny->read('config.yml'))->[0]; @@ -12,7 +12,7 @@ my $consumer_key_secret = $config->{'consumer_secret'}; my $access_token = $config->{'access_token'}; my $access_token_secret = $config->{'access_token_secret'}; -my $nt = Net::Twitter::Lite->new( +my $nt = Net::Twitter::Lite::WithAPIv1_1->new( traits => ['API::REST', 'OAuth'], consumer_key => $consumer_key, consumer_secret => $consumer_key_secret, diff --git a/Dev/twitter/show_status.pl b/Dev/twitter/show_status.pl index 5c22a92..0d2ecac 100755 --- a/Dev/twitter/show_status.pl +++ b/Dev/twitter/show_status.pl @@ -9,10 +9,10 @@ use utf8; # it throws a Net::Twitter::Lite::Error object. # You can catch and process these exceptions by using eval blocks and testing $@ ## from http://search.cpan.org/perldoc?Net::Twitter::Lite#ERROR_HANDLING -use Net::Twitter::Lite; +use Net::Twitter::Lite::WithAPIv1_1; use Data::Dumper; -my $bot = Net::Twitter::Lite->new( +my $bot = Net::Twitter::Lite::WithAPIv1_1->new( legacy_lists_api => 0, ); diff --git a/Dev/twitter/twitterbot.pl b/Dev/twitter/twitterbot.pl index 7eeed96..f33837b 100755 --- a/Dev/twitter/twitterbot.pl +++ b/Dev/twitter/twitterbot.pl @@ -9,7 +9,7 @@ use utf8; # it throws a Net::Twitter::Lite::Error object. # You can catch and process these exceptions by using eval blocks and testing $@ ## from http://search.cpan.org/perldoc?Net::Twitter::Lite#ERROR_HANDLING -use Net::Twitter::Lite; +use Net::Twitter::Lite::WithAPIv1_1; use FindBin qw($Bin); use YAML::Tiny; use Date::Parse qw(str2time); @@ -169,13 +169,13 @@ sub loadconf { } sub login { - # make Net::Twitter::Lite object and login + # make Net::Twitter::Lite::WithAPIv1_1 object and login # param => hash object of configration - # ret => Net::Twitter::Lite object + # ret => Net::Twitter::Lite::WithAPIv1_1 object my $conf = shift @_; - my $bot = Net::Twitter::Lite->new( + my $bot = Net::Twitter::Lite::WithAPIv1_1->new( consumer_key => $conf->{consumer_key}, consumer_secret => $conf->{consumer_secret}, legacy_lists_api => 0, @@ -189,7 +189,7 @@ sub login { sub or_search { # search tweets containing keywords - # param => Net::Twitter::Lite object, ArrayRef of keywords, since_id + # param => Net::Twitter::Lite::WithAPIv1_1 object, ArrayRef of keywords, since_id # ret => HashRef of status_id (timeline order is destroyed) # or undef (none is found) @@ -253,7 +253,7 @@ sub or_search { sub mentions_ids { # return status_ids mentioned to me - # param => Net::Twitter::Lite object, since_id + # param => Net::Twitter::Lite::WithAPIv1_1 object, since_id # ret => HashRef of status_id (timeline order is destroyed) # or undef (none is found) diff --git a/Dev/twitter/update_timeline.pl b/Dev/twitter/update_timeline.pl index 02a6433..d93906c 100755 --- a/Dev/twitter/update_timeline.pl +++ b/Dev/twitter/update_timeline.pl @@ -9,7 +9,7 @@ use utf8; # it throws a Net::Twitter::Lite::Error object. # You can catch and process these exceptions by using eval blocks and testing $@ ## from http://search.cpan.org/perldoc?Net::Twitter::Lite#ERROR_HANDLING -use Net::Twitter::Lite; +use Net::Twitter::Lite::WithAPIv1_1; use FindBin qw($Bin); use YAML::Tiny; use Data::Dumper; @@ -85,13 +85,13 @@ sub loadconf { } sub login { - # make Net::Twitter::Lite object and login + # make Net::Twitter::Lite::WithAPIv1_1 object and login # param => hash object of configration - # ret => Net::Twitter::Lite object + # ret => Net::Twitter::Lite::WithAPIv1_1 object my $conf = shift @_; - my $bot = Net::Twitter::Lite->new( + my $bot = Net::Twitter::Lite::WithAPIv1_1->new( consumer_key => $conf->{consumer_key}, consumer_secret => $conf->{consumer_secret}, legacy_lists_api => 0, -- 1.7.9.5