Exemple #1
0
 /**
  * Constructor
  *
  * @param string     $consumerKey
  * @param string     $consumerSecret
  * @param string     $accessToken
  * @param string     $accessTokenSecret
  * @param string     $username
  * @param string     $list
  * @param array      $options
  * @param TwitterSdk $twitterSdk
  */
 public function __construct($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret, $username, $list, array $options = array(), TwitterSdk $twitterSdk = null)
 {
     parent::__construct(sprintf(self::FEED_URL, $username, $list));
     $this->options = array_replace(array('slug' => $list, 'owner_screen_name' => $username), $options);
     $this->twitterSdk = $twitterSdk ?: new TwitterSdk($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
     $this->setStatusClassname('Lyrixx\\Lifestream\\Status\\AdvancedStatus');
 }
Exemple #2
0
 /**
  * Constructor
  *
  * @param string     $consumerKey
  * @param string     $consumerSecret
  * @param string     $accessToken
  * @param string     $accessTokenSecret
  * @param string     $search
  * @param array      $options
  * @param TwitterSdk $twitterSdk
  */
 public function __construct($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret, $search, array $options = array(), TwitterSdk $twitterSdk = null)
 {
     $search = urlencode($search);
     parent::__construct(sprintf(self::SEARCH_URL, $search));
     $this->options = array_replace(array('q' => $search, 'result_type' => 'recent'), $options);
     $this->twitterSdk = $twitterSdk ?: new TwitterSdk($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
     $this->setStatusClassname('Lyrixx\\Lifestream\\Status\\AdvancedStatus');
 }