WordPress.org

Plugin Directory

Changeset 601914


Ignore:
Timestamp:
09/21/12 10:27:54 (19 months ago)
Author:
simonwheatley
Message:

Code for v0.3:

  • BUGFIX: Remove test hook.
  • ENHANCEMENT: Get 100 tweets in a request.
Location:
tweet-watcher/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tweet-watcher/trunk/class-tweet-watcher.php

    r600164 r601914  
    6868        // For testing and demo purposes 
    6969//      $this->add_action( 'twtwchr_mention', 'mention', null, 6 ); 
    70         $this->add_action( 'twtwchr_tweet', 'tweet', null, 8 ); 
     70//      $this->add_action( 'twtwchr_tweet', 'tweet', null, 8 ); 
    7171 
    7272        $this->version = 3; 
     
    159159//      var_dump( "Done" ); 
    160160//      exit; 
     161//      $this->queue_new_mentions(); 
    161162    } 
    162163     
     
    213214         
    214215        foreach ( $users as $user_id => & $user ) { 
    215             $args = array( 'include_entities' => 'true' ); 
     216            $args = array( 'include_entities' => 'true', 'count' => 100 ); 
    216217            if ( isset( $user[ 'last_mention_id' ] ) ) { 
    217218                $args[ 'since_id' ] = $user[ 'last_mention_id' ]; 
     
    237238         
    238239        foreach ( $users as $user_id => & $user ) { 
    239             $args = array( 'include_entities' => 'true', 'include_rts' => 'true', 'contributor_details' => 'true' ); 
     240            $args = array( 'include_entities' => 'true', 'include_rts' => 'true', 'contributor_details' => 'true', 'count' => 100 ); 
    240241            if ( isset( $user[ 'last_tweet_id' ] ) ) { 
    241242                $args[ 'since_id' ] = $user[ 'last_tweet_id' ]; 
     
    243244            if ( $mentions = $this->oauth->get_tweets( $user_id, $args ) ) { 
    244245                $queued_tweets = (array) get_option( 'twtwchr_queued_tweets', array() ); 
    245                 var_dump( $queued_tweets ); 
    246246                foreach ( $mentions as & $mention ) { 
    247247                    array_unshift( $queued_tweets, $mention ); 
     
    324324 
    325325            update_option( 'twtwchr_queued_mentions', $queued_mentions ); 
     326            unset( $queued_mentions ); 
    326327        } 
    327328    } 
  • tweet-watcher/trunk/class-twitter-oauth.php

    r600164 r601914  
    3535     
    3636    function get_tweets( $user_id, $override_params = array() ) { 
    37         // http://api.twitter.com/1/statuses/mentions.json 
     37        // https://api.twitter.com/1/statuses/user_timeline.json 
    3838         
    3939        if ( ! $user = $this->get_user( $user_id ) ) 
  • tweet-watcher/trunk/readme.txt

    r600183 r601914  
    1717== Changelog == 
    1818 
     19= 0.3 = 
     20 
     21Friday 21 September 2012 
     22 
     23* BUGFIX: Remove test hook. 
     24* ENHANCEMENT: Get 100 tweets in a request. 
     25 
    1926= 0.2 = 
    2027 
  • tweet-watcher/trunk/tweet-watcher.php

    r600183 r601914  
    55Plugin URI: https://github.com/simonwheatley/Tweet-Watcher/ 
    66Description: Authenticates with a number of Twitter accounts and fires actions for each mention or tweet. 
    7 Version: 0.2 
     7Version: 0.3 
    88Author: Simon Wheatley (Code for the People) 
    99Author URI: http://codeforthepeople.com/ 
Note: See TracChangeset for help on using the changeset viewer.