Changeset e960958 in lab.git for Dev/twitter/twitterbot.pl


Ignore:
Timestamp:
Jun 21, 2013 3:48:34 PM (11 years ago)
Author:
Ken-ichi Mito <mitty@…>
Branches:
master
Children:
0f8acb5
Parents:
a5b6bf1
Message:

use Net::Twitter::Lite::WithAPIv1_1 instead of Net::Twitter::Lite

  • s/Net::Twitter::Lite/Net::Twitter::Lite::WithAPIv1_1/g;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/twitter/twitterbot.pl

    ra5b6bf1 re960958  
    1010# You can catch and process these exceptions by using eval blocks and testing $@ 
    1111## from http://search.cpan.org/perldoc?Net::Twitter::Lite#ERROR_HANDLING 
    12 use Net::Twitter::Lite; 
     12use Net::Twitter::Lite::WithAPIv1_1; 
    1313use FindBin qw($Bin); 
    1414use YAML::Tiny; 
     
    170170 
    171171sub login { 
    172     # make Net::Twitter::Lite object and login 
     172    # make Net::Twitter::Lite::WithAPIv1_1 object and login 
    173173    #   param   => hash object of configration 
    174     #   ret     => Net::Twitter::Lite object 
     174    #   ret     => Net::Twitter::Lite::WithAPIv1_1 object 
    175175     
    176176    my $conf = shift @_; 
    177177     
    178     my $bot = Net::Twitter::Lite->new( 
     178    my $bot = Net::Twitter::Lite::WithAPIv1_1->new( 
    179179        consumer_key    => $conf->{consumer_key}, 
    180180        consumer_secret => $conf->{consumer_secret}, 
     
    190190sub or_search { 
    191191    # search tweets containing keywords 
    192     #   param   => Net::Twitter::Lite object, ArrayRef of keywords, since_id 
     192    #   param   => Net::Twitter::Lite::WithAPIv1_1 object, ArrayRef of keywords, since_id 
    193193    #   ret     => HashRef of status_id (timeline order is destroyed) 
    194194    #               or undef (none is found) 
     
    254254sub mentions_ids { 
    255255    # return status_ids mentioned to me 
    256     #   param   => Net::Twitter::Lite object, since_id 
     256    #   param   => Net::Twitter::Lite::WithAPIv1_1 object, since_id 
    257257    #   ret     => HashRef of status_id (timeline order is destroyed) 
    258258    #               or undef (none is found) 
Note: See TracChangeset for help on using the changeset viewer.