lib/fal/dropbox.php
protected function doOAuthCall($url, $method, $params=null,
								   $type=NULL, $file=NULL, $content=NULL) {
		if(is_null($params)) $params = array();
		$method = strtoupper($method);
		$options = array('method' => $method);
		if ($method == 'GET') {
			if($file)
				$url .= $type.'/'.$file;
			$url .= '?'.http_build_query($this->authParams + $params);
		}
		elseif ($method == 'POST') {
			$params = $this->authParams + $params + array('root' => $type);
			$options['content'] = http_build_query($params);
		}
		elseif ($method == 'PUT') {
			$url .= $type.'/'.$file.'?'.http_build_query($this->authParams + $params);
			$options['content'] = $content;
			$options['header'] = array('Content-Type: application/octet-stream');
		}
		else {
			trigger_error(sprintf(self::E_METHODNOTSUPPORTED,$method));
			return false;
		}
		return $this->web->request($url, $options);
	}
protected function doOAuthCall($url, $method, $params=null,
								   $type=NULL, $file=NULL, $content=NULL) {
		if(is_null($params)) $params = array();
		$method = strtoupper($method);
		$options = array('method' => $method);
		if ($method == 'GET') {
			if($file)
				$url .= $type.'/'.$file;
			$url .= '?'.http_build_query($this->authParams + $params);
		}
		elseif ($method == 'POST') {
			$params = $this->authParams + $params + array('root' => $type);
			$options['content'] = http_build_query($params);
		}
		elseif ($method == 'PUT') {
			$url .= $type.'/'.$file.'?'.http_build_query($this->authParams + $params);
			$options['content'] = $content;
			$options['header'] = array('Content-Type: application/octet-stream');
		}
		else {
			trigger_error(sprintf(self::E_METHODNOTSUPPORTED,$method));
			return false;
		}
		return $this->web->request($url, $options);
	}
protected function doOAuthCall ( $ url , $ method , $ params = null , $ type = NULL , $ file = NULL , $ content = NULL ) { if ( is_null ( $ params ) ) $ params = array ( ) ; $ method = strtoupper ( $ method ) ; $ options = array ( 'method' => $ method ) ; if ( $ method == 'GET' ) { if ( $ file ) $ url .= $ type . '/' . $ file ; $ url .= '?' . http_build_query ( $ this -> authParams + $ params ) ; } elseif ( $ method == 'POST' ) { $ params = $ this -> authParams + $ params + array ( 'root' => $ type ) ; $ options [ 'content' ] = http_build_query ( $ params ) ; } elseif ( $ method == 'PUT' ) { $ url .= $ type . '/' . $ file . '?' . http_build_query ( $ this -> authParams + $ params ) ; $ options [ 'content' ] = $ content ; $ options [ 'header' ] = array ( 'Content-Type: application/octet-stream' ) ; } else { trigger_error ( sprintf ( self :: E_METHODNOTSUPPORTED , $ method ) ) ; return false ; } return $ this -> web -> request ( $ url , $ options ) ; }
perform a signed oauth request
@param string $url      request url
@param string $method   method type
@param array  $params   additional params
@param null   $type     storage type [sandbox|dropbox]
@param null   $file     full file pathname
@param null   $content  file content
@return bool
perform a signed oauth request