/** * Grabs all the latest tweets and puts them into the database. * * @return string Returns a string with informational output. */ public function archive() { // create twitter instance $twitter = new \TijsVerkoyen\Twitter\Twitter($this->config['auth']['consumerKey'], $this->config['auth']['consumerSecret']); $twitter->setOAuthToken($this->config['auth']['oauthToken']); $twitter->setOAuthTokenSecret($this->config['auth']['oauthSecret']); $archiver = new Archiver($this->config['twitter']['username'], $twitter, $this->model); return $archiver->archive(); }
/** * Grabs all the latest favorites and puts them into the database. * * @return string Returns a string with informational output. */ public function archiveFavorites() { $configuration = $this->core->getConfiguration(); $authConfig = $configuration->get('auth'); // create twitter instance $twitter = new \TijsVerkoyen\Twitter\Twitter($authConfig['consumerKey'], $authConfig['consumerSecret']); $twitter->setOAuthToken($authConfig['oauthToken']); $twitter->setOAuthTokenSecret($authConfig['oauthSecret']); $archiver = new \Darathor\Amt\Archiver($configuration->get('twitter', 'username'), $twitter, $this->model); return $archiver->archive(\Darathor\Amt\Archiver::TYPE_FAVORITES); }