diff --git a/www/plugins/jasonwilliams/feed/controllers/Feed.php b/www/plugins/jasonwilliams/feed/controllers/Feed.php index 00c7735..e776679 100644 --- a/www/plugins/jasonwilliams/feed/controllers/Feed.php +++ b/www/plugins/jasonwilliams/feed/controllers/Feed.php @@ -2,6 +2,7 @@ use Backend\Classes\Controller; use BackendMenu; +use JasonWilliams\Feed\Classes\SocialApis; class Feed extends Controller { @@ -18,4 +19,39 @@ class Feed extends Controller parent::__construct(); BackendMenu::setContext('jasonwilliams.feed', 'main-menu-item'); } + + public function import() + { + $this->pageTitle = 'Fetch posts'; + } + + public function onImportTwitter() + { + SocialApis::updateTwitter(); + + return $this->makePartial('import', [ + 'importType' => 'Twitter', + 'content' => 'Done' + ]); + } + + public function onImportInstagram() + { + SocialApis::updateInstagram(); + + return $this->makePartial('import', [ + 'importType' => 'Instagram', + 'content' => 'Done' + ]); + } + + public function onImportFoursquare() + { + SocialApis::updateFoursquare(); + + return $this->makePartial('import', [ + 'importType' => 'Foursquare', + 'content' => 'Done' + ]); + } } diff --git a/www/plugins/jasonwilliams/feed/controllers/Import.php b/www/plugins/jasonwilliams/feed/controllers/Import.php deleted file mode 100644 index 66db654..0000000 --- a/www/plugins/jasonwilliams/feed/controllers/Import.php +++ /dev/null @@ -1,15 +0,0 @@ - + +