Пример #1
0
 function fetch_data($type = 'Results', $atts)
 {
     if (Bon_IDX::is_debug()) {
         Bon_IDX::r($atts, true, 'fetch_data: ' . $type, false);
     }
     $apiHttpResponse = dsSearchAgent_ApiRequest::FetchData($type, $atts, false, 0);
     $response = $apiHttpResponse["body"];
     $decoded = json_decode($response);
     $response = is_null($decoded) ? $response : $decoded;
     return $response;
 }
Пример #2
0
 /**
  * Get the dsIDXpress account and plugin configuration settings
  * This saves a few database calls.
  */
 function set_account_settings()
 {
     // Set ds-specific settings to prevent DB access multiple times.
     $option_name = defined("DSIDXPRESS_OPTION_NAME") ? DSIDXPRESS_OPTION_NAME : 'dsidxpress';
     $this->idxopts = get_option($option_name);
     if (is_array($this->idxopts) && !empty($this->idxopts)) {
         if (isset($this->idxopts['dsIDXPressPackage'])) {
             $this->dsIDXPressPackage = $this->idxopts['dsIDXPressPackage'];
         }
         self::$AccountID = $this->idxopts['AccountID'];
         self::$SearchSetupID = $this->idxopts['SearchSetupID'];
         self::$PrivateApiKey = $this->idxopts['PrivateApiKey'];
     }
 }