コード例 #1
0
ファイル: lastfm.php プロジェクト: azuya/mmi-api
 /**
  * Configure the request parameters as specified in the configuration file.
  * When processing additions, if a parameter value exists, it will not be
  * overwritten.
  *
  * @param	array	an associative array of request parameters
  * @return	array
  */
 protected function _configure_parameters($parms)
 {
     $parms = parent::_configure_parameters($parms);
     $name = 'format';
     $temp = Arr::get($parms, $name);
     if (empty($temp)) {
         $parms[$name] = $this->_format;
     }
     return $parms;
 }
コード例 #2
0
ファイル: scribd.php プロジェクト: azuya/mmi-api
 /**
  * Customize the request parameters as specified in the configuration file.
  * When processing additions, if a parameter value exists, it will not be
  * overwritten.
  *
  * @param	array	an associative array of request parameters
  * @return	array
  */
 protected function _configure_parameters($parms)
 {
     $parms = parent::_configure_parameters($parms);
     // Ensure the API key is set
     $api_key = $this->_api_key;
     $this->_ensure_parm('API key', $api_key);
     // Set the API and generate the signature
     $parms['api_key'] = $api_key;
     if ($this->_sign_requests) {
         $parms['api_sig'] = $this->_get_signature($parms);
     }
     return $parms;
 }
コード例 #3
0
ファイル: slideshare.php プロジェクト: azuya/mmi-api
 /**
  * Customize the request parameters as specified in the configuration file.
  * When processing additions, if a parameter value exists, it will not be overwritten.
  *
  * @param	array	an associative array of request parameters
  * @return	array
  */
 protected function _configure_parameters($parms)
 {
     $parms = parent::_configure_parameters($parms);
     // Ensure the API key and API secret are set
     $api_key = $this->_api_key;
     $this->_ensure_parm('API key', $api_key);
     $api_secret = $this->_api_secret;
     $this->_ensure_parm('API secret', $api_secret);
     // Set the API and generate the signature
     $ts = time();
     $parms['api_key'] = $api_key;
     $parms['ts'] = $ts;
     $parms['hash'] = sha1($api_secret . $ts);
     return $parms;
 }