You are here

public function dropbox::dropbox in Dropbox Client 7

Same name and namespace in other branches
  1. 7.4 dropbox.php \dropbox::dropbox()
  2. 7.2 dropbox.php \dropbox::dropbox()
  3. 7.3 dropbox.php \dropbox::dropbox()

Pass in a parameters array which should look as follows: array('key'=>'example.com', 'secret'=>'mysecret'); Note that the secret should either be a hash string for HMAC signatures or a file path string for RSA signatures.

Parameters

array $params:

File

./dropbox.php, line 60

Class

dropbox

Code

public function dropbox($params) {
  if (!array_key_exists('method', $params)) {
    $params['method'] = 'GET';
  }
  $params['algorithm'] = OAUTH_ALGORITHMS::HMAC_SHA1;

  //Only thing available in dropbox
  $this->_consumer = array_diff_key($params, array(
    'access' => 0,
  ));
  if (array_key_exists('access', $params)) {
    $this->_access = $params['access'];
  }
}