Exemple #1
0
 protected function init($args)
 {
     parent::init($args);
     if (isset($args['CHANNEL']) && strlen($args['CHANNEL'])) {
         $this->setOption('channel', $args['CHANNEL']);
     }
 }
 protected function init($args)
 {
     parent::init($args);
     $this->setContext('retriever', 'api');
     $this->setBaseUrl('http://api.flickr.com/services/rest/');
     if (!isset($args['API_KEY'])) {
         throw new KurogoConfigurationException("Flickr API_KEY required");
     }
     $this->api_key = $args['API_KEY'];
     $this->addFilter('api_key', $this->api_key);
     if (isset($args['USER'])) {
         $this->setContext('type', 'photos');
         $this->addFilter('method', 'flickr.photos.search');
         $this->addFilter('user_id', $args['USER']);
     }
     if (isset($args['PHOTOSET'])) {
         $this->setContext('type', 'photoset');
         $this->addFilter('method', 'flickr.photosets.getPhotos');
         $this->addFilter('photoset_id', $args['PHOTOSET']);
     }
     if (isset($args['GALLERY'])) {
         $this->setContext('type', 'photos');
         $this->addFilter('method', 'flickr.galleries.getPhotos');
         $this->addFilter('gallery_id', $args['GALLERY']);
     }
     if (isset($args['GROUP'])) {
         $this->setContext('type', 'photos');
         $this->addFilter('method', 'flickr.photos.search');
         $this->addFilter('group_id', $args['GROUP']);
     }
     $this->addFilter('extras', implode(',', $this->extraFields));
     $this->addFilter('format', 'php_serial');
 }
 protected function init($args)
 {
     parent::init($args);
     if (!isset($args['SPORT'])) {
         throw new KurogoConfigurationException("Sport must be defined");
     }
     $this->sport = $args['SPORT'];
 }
Exemple #4
0
 protected function init($args)
 {
     parent::init($args);
     if (isset($args['PLAYLIST']) && strlen($args['PLAYLIST'])) {
         $this->setOption('playlist', $args['PLAYLIST']);
     }
     $this->setStandardFilters();
 }
 public function init($args)
 {
     parent::init($args);
     if (isset($args['ARCGIS_LAYER_ID'])) {
         $this->selectedLayer = $args['ARCGIS_LAYER_ID'];
         $this->parser->createFolder($this->selectedLayer, $args['TITLE']);
     }
     $this->filters = array('f' => 'json');
 }
 protected function init($args)
 {
     parent::init($args);
     if (!isset($args['API_KEY'])) {
         throw new KurogoConfigurationException("Instagram API_KEY required");
     }
     $this->api_key = $args['API_KEY'];
     $this->setBaseUrl('https://api.instagram.com/v1/users/self/feed');
     $this->addFilter('access_token', $this->api_key);
 }
 protected function init($args)
 {
     if (!isset($args['DRUPAL_SERVER_URL'])) {
         throw new KurogoConfigurationException("DRUPAL_SERVER_URL not set");
     }
     if (!isset($args['FEED_VERSION'])) {
         throw new KurogoConfigurationException("FEED_VERSION not set");
     }
     $args['BASE_URL'] = $args['DRUPAL_SERVER_URL'] . "/emergency-contacts-v" . $args['FEED_VERSION'];
     parent::init($args);
 }
 protected function init($args)
 {
     parent::init($args);
     $this->fieldMap = array('userid' => isset($args['KUROGO_USERID_FIELD']) ? $args['KUROGO_USERID_FIELD'] : 'uid', 'email' => isset($args['KUROGO_EMAIL_FIELD']) ? $args['KUROGO_EMAIL_FIELD'] : 'mail', 'fullname' => isset($args['KUROGO_FULLNAME_FIELD']) ? $args['KUROGO_FULLNAME_FIELD'] : '', 'firstname' => isset($args['KUROGO_FIRSTNAME_FIELD']) ? $args['KUROGO_FIRSTNAME_FIELD'] : 'givenname', 'lastname' => isset($args['KUROGO_LASTNAME_FIELD']) ? $args['KUROGO_LASTNAME_FIELD'] : 'sn', 'photodata' => isset($args['KUROGO_PHOTODATA_FIELD']) ? $args['KUROGO_PHOTODATA_FIELD'] : 'jpegphoto', 'phone' => isset($args['KUROGO_PHONE_FIELD']) ? $args['KUROGO_PHONE_FIELD'] : 'telephonenumber');
     if (isset($args['SORTFIELDS']) && is_array($args['SORTFIELDS'])) {
         $this->sortFields = $args['SORTFIELDS'];
     }
     if (isset($args['BASE_URL']) && $args['BASE_URL']) {
         $this->peopleAPI = rtrim($args['BASE_URL'], '/');
     }
     $this->feed = Kurogo::arrayVal($args, 'FEED');
     $this->setContext('fieldMap', $this->fieldMap);
 }
Exemple #9
0
 protected function init($args)
 {
     parent::init($args);
     $url = "https://picasaweb.google.com/data/feed/api/";
     if (isset($args['USER'], $args['ALBUM'])) {
         $url .= sprintf("user/%s/albumid/%s", $args['USER'], $args['ALBUM']);
     } else {
         throw new KurogoConfigurationException("USER and ALBUM values must be set for Picasa albums");
     }
     $this->setBaseURL($url);
     $this->addFilter('kind', 'photo');
     $this->addFilter('thumbsize', '72c');
     $this->addFilter('alt', 'json');
 }
 public function init($args)
 {
     parent::init($args);
     if (isset($args['ARCGIS_LAYER_ID'])) {
         $this->selectedLayer = $args['ARCGIS_LAYER_ID'];
         $this->parser->createFolder($this->selectedLayer, $args['TITLE']);
     }
     if (isset($args['SORT_FIELD'])) {
         $this->orderByFields = $args['SORT_FIELD'];
     }
     if (isset($args['USE_EXTENT_GEOMETRY'])) {
         $this->useExtentGeometry = $args['USE_EXTENT_GEOMETRY'];
     }
     $this->filters = array('f' => 'json');
 }
 protected function init($args)
 {
     parent::init($args);
     if (!isset($args['token'])) {
         throw new KurogoConfigurationException('Brightcove token not included');
     }
     $this->setOption('token', $args['token']);
     if (!isset($args['playerKey'])) {
         throw new KurogoConfigurationException('Brightcove playerKey not included');
     }
     $this->setOption('playerKey', $args['playerKey']);
     if (!isset($args['playerId'])) {
         throw new KurogoConfigurationException('Brightcove playerId not included');
     }
     $this->setOption('playerId', $args['playerId']);
     $this->setStandardFilters();
     $this->addFilter('command', 'find_all_videos');
 }
 protected function init($args)
 {
     parent::init($args);
     if (isset($args['BASE_URL'])) {
         $this->param_baseUrl = $args['BASE_URL'];
     } else {
         $this->param_baseUrl = $this->DEFAULT_BASE_URL;
     }
     if (!isset($args['PARTNER_ID'])) {
         throw new KurogoConfigurationException("Kaltura PARTNER_ID is a required configuration");
     }
     if (!isset($args['FEED_ID'])) {
         throw new KurogoConfigurationException("Kaltura FEED_ID is a required configuration");
     }
     $this->param_partnerId = $args['PARTNER_ID'];
     $this->param_feedId = $args['FEED_ID'];
     $this->setStandardParameters();
     $json = $this->getData();
 }
 protected function init($args)
 {
     parent::init($args);
     $this->setContext('retriever', 'feed');
     if (isset($args['USER'])) {
         $this->setBaseUrl('http://api.flickr.com/services/feeds/photos_public.gne');
         $this->addFilter('id', $args['USER']);
     }
     if (isset($args['PHOTOSET'])) {
         if (!isset($args['USER'])) {
             throw new KurogoConfigurationException("Photoset feeds must contain a USER value");
         }
         $this->setBaseURL('http://api.flickr.com/services/feeds/photoset.gne');
         $this->addFilter('set', $args['PHOTOSET']);
         $this->addFilter('nsid', $args['USER']);
     }
     if (isset($args['GROUP'])) {
         $this->setBaseUrl('http://api.flickr.com/services/feeds/groups_pool.gne');
         $this->addFilter('id', $args['GROUP']);
     }
     $this->addFilter('format', 'php_serial');
 }
Exemple #14
0
 protected function init($args)
 {
     parent::init($args);
     if ($provider = $this->getOAuthProvider()) {
         $this->initOAuthProvider($provider);
     }
     if (isset($args['OAUTH_CONSUMER_KEY'])) {
         $this->consumerKey = $args['OAUTH_CONSUMER_KEY'];
     }
     if (isset($args['OAUTH_CONSUMER_SECRET'])) {
         $this->consumerSecret = $args['OAUTH_CONSUMER_SECRET'];
     }
     if (isset($args['token'])) {
         $this->token = $args['token'];
     }
     if (isset($args['tokenSecret'])) {
         $this->tokenSecret = $args['tokenSecret'];
     }
     if (isset($args['cert'])) {
         $this->cert = $args['cert'];
     }
     if (isset($args['signatureMethod'])) {
         $this->signatureMethod = $args['signatureMethod'];
     }
 }
 public function init($args)
 {
     parent::init($args);
     if (!isset($args['ACCOUNT'])) {
         throw new KurogoConfigurationException("ACCOUNT must be set for Facebook");
     }
     $this->setUser($args['ACCOUNT']);
     if (!isset($args['OAUTH_CONSUMER_KEY'])) {
         throw new KurogoConfigurationException("OAUTH_CONSUMER_KEY must be set for Facebook");
     }
     $this->clientId = $args['OAUTH_CONSUMER_KEY'];
     if (!isset($args['OAUTH_CONSUMER_SECRET'])) {
         throw new KurogoConfigurationException("OAUTH_CONSUMER_SECRET must be set for Facebook");
     }
     $this->clientSecret = $args['OAUTH_CONSUMER_SECRET'];
 }