/**
  * Execute the job.
  *
  * @throws EmptyResponse
  */
 public function handle()
 {
     $response = $this->instagram->getUserMedia($this->user, $this->limit);
     if (empty($response)) {
         throw new EmptyResponse();
     }
     if ($response->meta->code !== 200) {
         throw new \Exception($response->meta->error_message);
     }
     event(new FeedWasFetched($response, 'instagram'));
     return $response;
 }
Example #2
0
 /**
  * Get the config instance.
  *
  * @return \Illuminate\Contracts\Config\Repository 
  * @static 
  */
 public static function getConfig()
 {
     //Method inherited from \GrahamCampbell\Manager\AbstractManager
     return \Vinkla\Instagram\InstagramManager::getConfig();
 }